Skeleton of project - database loading

This commit is contained in:
BarsTiger
2023-02-13 19:51:25 +02:00
commit f778d3f71c
23 changed files with 348 additions and 0 deletions

23
main.py Normal file
View File

@@ -0,0 +1,23 @@
from bot.config import BARS_APP_ID
from rich import print
async def main():
print(BARS_APP_ID)
import bot.handlers.register
from bot.common import dp
from bot.utils.commands import set_commands
bot.handlers.register.import_handlers()
await set_commands()
print('[green]Bot will start now[/]')
await dp.skip_updates()
await dp.start_polling()
if __name__ == '__main__':
import asyncio
try:
asyncio.run(main())
except (KeyboardInterrupt, SystemExit, RuntimeError):
print('[red]Bot stopped[/]')