Skip to content

Commit

Permalink
resolve dependabot issues (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiTheModder authored Dec 4, 2024
1 parent fdd3546 commit 1394aec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 5 additions & 7 deletions modules/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
total_pages = 0


async def send_page(message, module_list, page, total_pages):
async def send_page(message, module_list, page, total_page):
start_index = (page - 1) * 10
end_index = start_index + 10
page_modules = module_list[start_index:end_index]
text = f"<b>Help for <a href=https://t.me/Moonub_chat>Moon-Userbot</a></b>\n"
text = "<b>Help for <a href=https://t.me/Moonub_chat>Moon-Userbot</a></b>\n"
text += f"For more help on how to use a command, type <code>{prefix}help [module]</code>\n\n"
text += f"Page {page}/{total_pages}\n\n"
text += f"Page {page}/{total_page}\n\n"
for module_name in page_modules:
commands = modules_help[module_name]
text += f"<b>• {module_name.title()}:</b> {', '.join([f'<code>{prefix + cmd_name.split()[0]}</code>' for cmd_name in commands.keys()])}\n"
Expand Down Expand Up @@ -77,17 +77,15 @@ async def handle_navigation(_, message: Message):
message, list(modules_help.keys()), current_page, total_pages
)
return await message.reply_to_message.delete()
else:
await message.edit("No more pages available.")
await message.edit("No more pages available.")
elif message.command[0].lower() == "pp":
if current_page > 1:
current_page -= 1
await send_page(
message, list(modules_help.keys()), current_page, total_pages
)
return await message.reply_to_message.delete()
else:
return await message.edit("This is the first page.")
return await message.edit("This is the first page.")
elif message.command[0].lower() == "pq":
await message.reply_to_message.delete()
return await message.edit("Help closed.")
Expand Down
4 changes: 1 addition & 3 deletions utils/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
import sys
import time
import traceback
from PIL import Image, ImageEnhance
from PIL import Image
from io import BytesIO
import aiohttp
from types import ModuleType
from typing import Dict, Tuple

from PIL import Image
import psutil
from pyrogram import Client, errors, enums
from pyrogram.errors import FloodWait, MessageNotModified, UserNotParticipant
Expand Down

0 comments on commit 1394aec

Please sign in to comment.