mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
flake8 fix, server back
This commit is contained in:
parent
2e61640f5a
commit
ea8d251142
2
main.py
2
main.py
@ -47,7 +47,7 @@ def main():
|
|||||||
loop.run_until_complete(initialization())
|
loop.run_until_complete(initialization())
|
||||||
|
|
||||||
loop.create_task(dp.start_polling())
|
loop.create_task(dp.start_polling())
|
||||||
# loop.create_task(server_main().start())
|
loop.create_task(server_main().start())
|
||||||
|
|
||||||
loop.run_forever()
|
loop.run_forever()
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ async def bot_added(message: types.Message, state: FSMContext):
|
|||||||
return await on_unknown_error()
|
return await on_unknown_error()
|
||||||
|
|
||||||
user, _ = await User.get_or_create(telegram_id=message.from_user.id)
|
user, _ = await User.get_or_create(telegram_id=message.from_user.id)
|
||||||
bot = Bot(token=Bot.encrypted_token(token), owner=user, name=test_bot_info.username, super_chat_id=message.from_user.id)
|
bot = Bot(token=Bot.encrypted_token(token), owner=user, name=test_bot_info.username,
|
||||||
|
super_chat_id=message.from_user.id)
|
||||||
try:
|
try:
|
||||||
await bot.save()
|
await bot.save()
|
||||||
except IntegrityError:
|
except IntegrityError:
|
||||||
|
Loading…
Reference in New Issue
Block a user