Disabling generation function

This commit is contained in:
BarsTiger
2023-03-11 23:59:05 +02:00
parent 66b6da88ad
commit fb57b11feb
6 changed files with 28 additions and 0 deletions

View File

@@ -18,6 +18,9 @@ async def start_command(message: types.Message):
await db[DBTables.config].write()
await message.reply(f'✅ Added {message.from_user.username} to admins. You can add other admins, '
f'check bot settings menu')
if db[DBTables.config].get('enabled') is None:
db[DBTables.config]['enabled'] = True
await message.reply(f'✅ Generation is enabled now')
return
await message.reply(f'👋 Hello, {message.from_user.username}. Use /help to see available commands.')