16 lines
373 B
Python
16 lines
373 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):
|
|
print(message)
|
|
self.bot.sendMessage(chat_id=config['telegram']['chat_id'], text=str(message))
|