diff --git a/plugins/commands.py b/plugins/commands.py index 354f0a4..02bbaa7 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -401,22 +401,28 @@ async def settings(client, message): return settings = await get_settings(grp_id) + try: + if settings['auto_delete']: + settings = await get_settings(grp_id) + except KeyError: + await save_group_settings(grp_id, 'auto_delete', True) + settings = await get_settings(grp_id) if settings is not None: buttons = [ [ InlineKeyboardButton( - 'Filter Button', + 'Fɪʟᴛᴇʀ Bᴜᴛᴛᴏɴ', callback_data=f'setgs#button#{settings["button"]}#{grp_id}', ), InlineKeyboardButton( - 'Single' if settings["button"] else 'Double', + 'Sɪɴɢʟᴇ' if settings["button"] else 'Double', callback_data=f'setgs#button#{settings["button"]}#{grp_id}', ), ], [ InlineKeyboardButton( - 'Bot PM', + 'Bᴏᴛ PM', callback_data=f'setgs#botpm#{settings["botpm"]}#{grp_id}', ), InlineKeyboardButton( @@ -426,7 +432,7 @@ async def settings(client, message): ], [ InlineKeyboardButton( - 'File Secure', + 'Fɪʟᴇ Sᴇᴄᴜʀᴇ', callback_data=f'setgs#file_secure#{settings["file_secure"]}#{grp_id}', ), InlineKeyboardButton( @@ -446,7 +452,7 @@ async def settings(client, message): ], [ InlineKeyboardButton( - 'Spell Check', + 'Sᴘᴇʟʟ Cʜᴇᴄᴋ', callback_data=f'setgs#spell_check#{settings["spell_check"]}#{grp_id}', ), InlineKeyboardButton( @@ -456,7 +462,7 @@ async def settings(client, message): ], [ InlineKeyboardButton( - 'Welcome', + 'Wᴇʟᴄᴏᴍᴇ', callback_data=f'setgs#welcome#{settings["welcome"]}#{grp_id}', ), InlineKeyboardButton( @@ -464,6 +470,16 @@ async def settings(client, message): callback_data=f'setgs#welcome#{settings["welcome"]}#{grp_id}', ), ], + [ + InlineKeyboardButton( + 'Aᴜᴛᴏ Dᴇʟᴇᴛᴇ', + callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{grp_id}', + ), + InlineKeyboardButton( + '10 Mins' if settings["auto_delete"] else 'OFF', + callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{grp_id}', + ), + ], ] reply_markup = InlineKeyboardMarkup(buttons)