thehamkercat пре 5 година
родитељ
комит
018c73a71a
2 измењених фајлова са 42 додато и 9 уклоњено
  1. 38 6
      wbb/__main__.py
  2. 4 3
      wbb/modules/stickers.py

+ 38 - 6
wbb/__main__.py

@@ -100,19 +100,41 @@ async def help_command(_, message):
         )
         await message.reply("Pm Me For More Details.", reply_markup=keyboard)
         return
-    text, keyboard = await help_parser(message)
-    await message.reply_photo(
-        caption=text,
-        photo="https://static2.aniimg.com/upload/20170515/414/c/d/7/cd7EEF.jpg",
-        reply_markup=keyboard
+    keyboard = InlineKeyboardMarkup(
+        [    
+            [
+                InlineKeyboardButton(
+                    text="Commands",
+                    callback_data="bot_commands"
+                ),
+                InlineKeyboardButton(
+                    text="Repo",
+                    url="https://github.com/thehamkercat/WilliamButcherBot"
+                )
+            ],
+            [
+                InlineKeyboardButton(   
+                    text="System Stats",
+                    callback_data="stats_callback"
+                ),
+                InlineKeyboardButton(
+                    text="Support",
+                    url="t.me/PatheticProgrammers"
+                )
+            ]
+        ]
     )
+    await message.reply("Hello, Choose An Option From Below.", reply_markup=keyboard)
+
+
+
 
 
 async def help_parser(message, keyboard=None):
     if not keyboard:
         keyboard = InlineKeyboardMarkup(paginate_modules(0, HELPABLE, "help"))
     return (
-        "Hi {first_name}, I am {bot_name}, A well written telegram group manager bot, Invite me to your chat.".format(
+        "Hi {first_name}, I am {bot_name}, Here is the list of all possible commands:".format(
             first_name=message.from_user.first_name,
             bot_name=botinfo.BOT_NAME,
         ),
@@ -120,6 +142,16 @@ async def help_parser(message, keyboard=None):
     )
 
 
+@app.on_callback_query(filters.regex("bot_commands"))
+async def end_callbacc(_, CallbackQuery):
+    text, keyboard = await help_parser(message)
+    await app.send_message(
+            CallbackQuery.message.chat.id
+            text=text,
+            reply_markup=keyboard
+            )
+
+
 @app.on_callback_query(filters.regex("stats_callback"))
 async def end_callbacc(_, CallbackQuery):
     text = await bot_sys_stats()

+ 4 - 3
wbb/modules/stickers.py

@@ -1,3 +1,4 @@
+"""
 import os
 import math
 import imghdr
@@ -11,8 +12,8 @@ from pyrogram import filters
 from wbb.utils.errors import capture_err
 
 __MODULE__ = "Stickers"
-__HELP__ = """/sticker_id - To Get File ID of A Sticker.
-/kang - To Kang A Sticker or Image."""
+__HELP__ = "/sticker_id - To Get File ID of A Sticker.
+/kang - To Kang A Sticker or Image."
 
 
 
@@ -162,4 +163,4 @@ async def makepack_internal(msg, user, png_sticker, emoji, updater, packname, pa
     if success:
         await msg.edit("Sticker pack successfully created. Get it [here](t.me/addstickers/%s)" % packname)
     else:
-        await msg.edit("Failed to create sticker pack.")
+        await msg.edit("Failed to create sticker pack.")"""