config command now works fully
This commit is contained in:
@@ -5,12 +5,15 @@ from bot.utils.cooldown import throttle
|
||||
|
||||
|
||||
@throttle(5)
|
||||
async def resetqueue(message: types.Message):
|
||||
async def resetqueue(message: types.Message, is_command: bool = True):
|
||||
if message.from_id not in db[DBTables.config].get('admins') and message.from_id != ADMIN:
|
||||
await message.reply('❌ You are not permitted to do that. '
|
||||
'It is only for this bot instance maintainers and admins')
|
||||
return
|
||||
|
||||
if is_command and message.text.lower() != 'reset':
|
||||
return
|
||||
|
||||
db[DBTables.queue]['n'] = 0
|
||||
|
||||
await db[DBTables.config].write()
|
||||
|
||||
Reference in New Issue
Block a user