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))
