Spaces:
Paused
Paused
Merge branch 'main' of https://github.com/Gojo-Bots/Gojo_Satarou
Browse files
.github/{PULL_REQUEST_TEMPLATE/pull_request_template.mdPULL_REQUEST_TEMPLATE.md → PULL_REQUEST_TEMPLATE.md}
RENAMED
|
File without changes
|
Powers/plugins/start.py
CHANGED
|
@@ -145,12 +145,10 @@ Join my [News Channel](http://t.me/gojo_updates) to get information on all the l
|
|
| 145 |
|
| 146 |
@Gojo.on_callback_query(filters.regex("^commands$"))
|
| 147 |
async def commands_menu(_, q: CallbackQuery):
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
],
|
| 153 |
-
)
|
| 154 |
try:
|
| 155 |
cpt = f"""
|
| 156 |
Hey **[{q.from_user.first_name}](http://t.me/{q.from_user.username})**! My name is Gojo✨.
|
|
@@ -220,12 +218,10 @@ async def help_menu(_, m: Message):
|
|
| 220 |
else:
|
| 221 |
|
| 222 |
if m.chat.type == ChatType.PRIVATE:
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
],
|
| 228 |
-
)
|
| 229 |
msg = f"""
|
| 230 |
Hey **[{m.from_user.first_name}](http://t.me/{m.from_user.username})**!My name is Gojo✨.
|
| 231 |
I'm here to help you manage your groups!
|
|
@@ -247,7 +243,7 @@ Commands available:
|
|
| 247 |
return
|
| 248 |
|
| 249 |
|
| 250 |
-
@Gojo.on_callback_query(filters.regex("^
|
| 251 |
async def get_module_info(_, q: CallbackQuery):
|
| 252 |
module = q.data.split(".", 1)[1]
|
| 253 |
|
|
|
|
| 145 |
|
| 146 |
@Gojo.on_callback_query(filters.regex("^commands$"))
|
| 147 |
async def commands_menu(_, q: CallbackQuery):
|
| 148 |
+
cmds = sorted(list(HELP_COMMANDS.keys()))
|
| 149 |
+
kb = [cmd.lower() for cmd in cmds]
|
| 150 |
+
ou = [kb[i : i + 3] for i in range(0, len(kb), 3)]
|
| 151 |
+
keyboard = ikb(ou, True)
|
|
|
|
|
|
|
| 152 |
try:
|
| 153 |
cpt = f"""
|
| 154 |
Hey **[{q.from_user.first_name}](http://t.me/{q.from_user.username})**! My name is Gojo✨.
|
|
|
|
| 218 |
else:
|
| 219 |
|
| 220 |
if m.chat.type == ChatType.PRIVATE:
|
| 221 |
+
cmds = sorted(list(HELP_COMMANDS.keys()))
|
| 222 |
+
kb = [cmd.lower() for cmd in cmds]
|
| 223 |
+
ou = [kb[i : i + 3] for i in range(0, len(kb), 3)]
|
| 224 |
+
keyboard = ikb(ou, True)
|
|
|
|
|
|
|
| 225 |
msg = f"""
|
| 226 |
Hey **[{m.from_user.first_name}](http://t.me/{m.from_user.username})**!My name is Gojo✨.
|
| 227 |
I'm here to help you manage your groups!
|
|
|
|
| 243 |
return
|
| 244 |
|
| 245 |
|
| 246 |
+
@Gojo.on_callback_query(filters.regex("^plugins."))
|
| 247 |
async def get_module_info(_, q: CallbackQuery):
|
| 248 |
module = q.data.split(".", 1)[1]
|
| 249 |
|
Powers/utils/kbhelpers.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
| 2 |
|
| 3 |
|
| 4 |
-
def ikb(rows=None):
|
| 5 |
if rows is None:
|
| 6 |
rows = []
|
| 7 |
lines = []
|
|
@@ -12,6 +12,9 @@ def ikb(rows=None):
|
|
| 12 |
button = btn(btn_text, button) # InlineKeyboardButton
|
| 13 |
line.append(button)
|
| 14 |
lines.append(line)
|
|
|
|
|
|
|
|
|
|
| 15 |
return InlineKeyboardMarkup(inline_keyboard=lines)
|
| 16 |
|
| 17 |
|
|
|
|
| 1 |
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
| 2 |
|
| 3 |
|
| 4 |
+
def ikb(rows=None, back=False):
|
| 5 |
if rows is None:
|
| 6 |
rows = []
|
| 7 |
lines = []
|
|
|
|
| 12 |
button = btn(btn_text, button) # InlineKeyboardButton
|
| 13 |
line.append(button)
|
| 14 |
lines.append(line)
|
| 15 |
+
if back:
|
| 16 |
+
back_btn = [(btn("Back", "start_back"))]
|
| 17 |
+
lines.append(back_btn)
|
| 18 |
return InlineKeyboardMarkup(inline_keyboard=lines)
|
| 19 |
|
| 20 |
|