Random Coffee alternative - random meetings for Telegram chats https://t.me/ranteabot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
596 B

2 years ago
from bot import Bot
from views import views
from threading import Thread
2 years ago
import traceback
import os
2 years ago
config = {
'mongo': os.getenv('DB'),
'name': 'ranteabot' if not os.getenv('DEBUG') else 'flazhokbot',
'token': os.getenv('TOKEN'),
2 years ago
'template_files': ['templates.txt'],
'main_keyboard': {'en': [[' About']], 'ru': [[' О боте']]}
}
bot = Bot(config)
views(bot)
if __name__ == '__main__':
Thread(target=bot.actions_loop).start()
2 years ago
while True:
try:
bot.polling(none_stop=True)
except:
print(traceback.format_exc())