feat(telegram): add basic bot for sending messages

This commit is contained in:
2025-01-06 12:04:15 +01:00
parent 80ab4508e2
commit f2e0e78e43

11
telegram_bot.py Normal file
View File

@@ -0,0 +1,11 @@
import telegram
class Telegram:
def __init__(self, token, channel_id):
self.token = token
self.bot = telegram.Bot(token=token)
self.channel_id = channel_id
async def send_message(self, message: str):
print(await self.bot.send_message(chat_id=self.channel_id, text=message))