Files
autoficher/app/telegram_bot.py
Omar Sánchez Pizarro e9ec438183 cosas bonitas con el fiching
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
2023-11-09 18:48:07 +01:00

15 lines
378 B
Python

from app import config_parser
import telegram
import random
config = config_parser.ConfigParser().loadConfig()
class telegramBot:
bot = None
async def sendMessage(self, message):
self.bot = telegram.Bot(config['telegram']['token'])
async with self.bot:
await self.bot.sendMessage(chat_id=config['telegram']['chat_id'], text=str(message))