|
@@ -1,22 +1,21 @@
|
|
|
import asyncio
|
|
import asyncio
|
|
|
import re
|
|
import re
|
|
|
import importlib
|
|
import importlib
|
|
|
-import time
|
|
|
|
|
import uvloop
|
|
import uvloop
|
|
|
from pyrogram import filters, idle
|
|
from pyrogram import filters, idle
|
|
|
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
|
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
|
|
-from wbb import app, MOD_NOLOAD
|
|
|
|
|
|
|
+from wbb import app
|
|
|
from wbb.utils import get_info, paginate_modules
|
|
from wbb.utils import get_info, paginate_modules
|
|
|
-from wbb.utils import botinfo, formatter
|
|
|
|
|
|
|
+from wbb.utils import botinfo
|
|
|
from wbb.modules.sudoers import bot_sys_stats
|
|
from wbb.modules.sudoers import bot_sys_stats
|
|
|
from wbb.modules import ALL_MODULES
|
|
from wbb.modules import ALL_MODULES
|
|
|
-from wbb import bot_start_time
|
|
|
|
|
|
|
|
|
|
loop = asyncio.get_event_loop()
|
|
loop = asyncio.get_event_loop()
|
|
|
|
|
|
|
|
|
|
|
|
|
HELPABLE = {}
|
|
HELPABLE = {}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
async def start_bot():
|
|
async def start_bot():
|
|
|
global COMMANDS_COUNT
|
|
global COMMANDS_COUNT
|
|
|
await app.start()
|
|
await app.start()
|
|
@@ -90,7 +89,7 @@ async def help_command(_, message):
|
|
|
await message.reply("Pm Me For More Details.", reply_markup=keyboard)
|
|
await message.reply("Pm Me For More Details.", reply_markup=keyboard)
|
|
|
return
|
|
return
|
|
|
keyboard = InlineKeyboardMarkup(
|
|
keyboard = InlineKeyboardMarkup(
|
|
|
- [
|
|
|
|
|
|
|
+ [
|
|
|
[
|
|
[
|
|
|
InlineKeyboardButton(
|
|
InlineKeyboardButton(
|
|
|
text="Commands ❓",
|
|
text="Commands ❓",
|
|
@@ -102,7 +101,7 @@ async def help_command(_, message):
|
|
|
)
|
|
)
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
- InlineKeyboardButton(
|
|
|
|
|
|
|
+ InlineKeyboardButton(
|
|
|
text="System Stats 🖥",
|
|
text="System Stats 🖥",
|
|
|
callback_data="stats_callback"
|
|
callback_data="stats_callback"
|
|
|
),
|
|
),
|
|
@@ -119,10 +118,7 @@ async def help_command(_, message):
|
|
|
]
|
|
]
|
|
|
]
|
|
]
|
|
|
)
|
|
)
|
|
|
- await message.reply("fHey there! My name is {botinfo.BOT_NAME}. I can manage your group with lots of useful features, feel free to add me to your group.", reply_markup=keyboard)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ await message.reply(f"Hey there! My name is {botinfo.BOT_NAME}. I can manage your group with lots of useful features, feel free to add me to your group.", reply_markup=keyboard)
|
|
|
|
|
|
|
|
|
|
|
|
|
async def help_parser(name, keyboard=None):
|
|
async def help_parser(name, keyboard=None):
|
|
@@ -145,18 +141,19 @@ General command are:
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.on_callback_query(filters.regex("bot_commands"))
|
|
@app.on_callback_query(filters.regex("bot_commands"))
|
|
|
-async def end_callbacc(_, CallbackQuery):
|
|
|
|
|
|
|
+async def commands_callbacc(_, CallbackQuery):
|
|
|
text, keyboard = await help_parser(CallbackQuery.from_user.mention)
|
|
text, keyboard = await help_parser(CallbackQuery.from_user.mention)
|
|
|
await app.send_message(
|
|
await app.send_message(
|
|
|
- CallbackQuery.message.chat.id,
|
|
|
|
|
- text=text,
|
|
|
|
|
- reply_markup=keyboard
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ CallbackQuery.message.chat.id,
|
|
|
|
|
+ text=text,
|
|
|
|
|
+ reply_markup=keyboard
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
await CallbackQuery.message.delete()
|
|
await CallbackQuery.message.delete()
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@app.on_callback_query(filters.regex("stats_callback"))
|
|
@app.on_callback_query(filters.regex("stats_callback"))
|
|
|
-async def end_callbacc(_, CallbackQuery):
|
|
|
|
|
|
|
+async def stats_callbacc(_, CallbackQuery):
|
|
|
text = await bot_sys_stats()
|
|
text = await bot_sys_stats()
|
|
|
await app.answer_callback_query(CallbackQuery.id, text, show_alert=True)
|
|
await app.answer_callback_query(CallbackQuery.id, text, show_alert=True)
|
|
|
|
|
|