Add whitelist to bot

This commit is contained in:
seel2304 committed 2023-05-03 15:50:15 +00:00
1 parent c129c7bc60
commit 2dda780d3f
6 files changed
+86 -2

No files matched your search

+4
View File
@@ -18,6 +18,10 @@ async def generate_command(message: types.Message):
await message.reply('💔 Generation is disabled by admins now. Try again later')
await temp_message.delete()
return
elif (message.chat.id not in db[DBTables.config]['whitelist'] and message.from_id not in db[DBTables.config]['whitelist']):
await message.reply('❌You are not on the white list, access denied. Contact admin @kilisauros for details')
await temp_message.delete()
return
try:
prompt = get_prompt(user_id=message.from_id,