Files
autoficher/app/telegram_bot.py
Omar Sánchez Pizarro d09c66b125 particionado
2023-10-09 14:13:36 +02:00

15 lines
386 B
Python

import telegram
from app import config_parser
config = config_parser.ConfigParser().loadConfig()
class telegramBot:
bot = None
def __init__(self):
self.bot = telegram.Bot(token=config['telegram']['token'])
def sendMessage(self, message):
self.bot.sendMessage(chat_id=config['telegram']['chat_id'], text=str(message), parse_mode=telegram.ParseMode.HTML)