+10
-3
@@ -37,8 +37,15 @@ class KaehmyHandler:
|
||||
for id in channels_started:
|
||||
bot.sendMessage(id, 'Uusi kaehmy/New kaehmy! {} -> {}'.format(name, url))
|
||||
|
||||
|
||||
kaehmy_handler = KaehmyHandler()
|
||||
|
||||
bot.message_loop(kaehmy_handler.handle)
|
||||
logging.debug('Telepot listening...')
|
||||
|
||||
def main():
|
||||
bot.message_loop(kaehmy_handler.handle)
|
||||
logging.debug('Telepot listening...')
|
||||
|
||||
try:
|
||||
bot.getMe()
|
||||
main()
|
||||
except Exception as ex:
|
||||
logging.exception('Failed to create Telegram bot with token "{}"'.format(TOKEN))
|
||||
|
||||
Reference in New Issue
Block a user