Skip to content

Commit

Permalink
Made kang module treat custom pack names better
Browse files Browse the repository at this point in the history
  • Loading branch information
user838492843 committed Jul 31, 2020
1 parent a3f1b5a commit 0bb1e73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions modules/kang.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
)



@client.on(register(pattern="kang ?(.*)"))
async def handler(event):
if event.fwd_from:
Expand All @@ -37,7 +36,7 @@ async def handler(event):
await event.edit("```Using a crack in the fabric of time to kang this sticker...```")
reply_message = await event.get_reply_message()
sticker_emoji = "🔥"
pack_id = 1
pack_id = ""
input_str = event.pattern_match.group(1)
if input_str:
input_str = input_str.split()
Expand All @@ -55,10 +54,14 @@ async def handler(event):
botuser = f"@{botuser.username}"
userid = event.from_id
if Config.STICKER_PACK is None:
if not pack_id:
pack_id = 1
packname = f"{botuser}'s kang pack vol.{pack_id}"
packshortname = f"thetgbot_kang_pack_vol{pack_id}_{userid}"
else:
packname = f"{Config.STICKER_PACK} {pack_id}"
if pack_id:
pack_id = f" {pack_id}"
packname = f"{Config.STICKER_PACK}{pack_id}"
packshortname = f"Uniborg_Pack{pack_id}_{userid}"

is_a_s = is_it_animated_sticker(reply_message)
Expand Down
2 changes: 1 addition & 1 deletion modules/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@client.on(register(pattern="restart ?(.*)", allow_sudo=True))
async def handler(message):
await message.edit("The-TG-Bot v3 has been restarted.\nTry .alive to if its alive")
await message.edit("The-TG-Bot v3 has been restarted.\nTry .alive or .ping to check if its alive.")
asyncio.get_event_loop().create_task(restart())


Expand Down
1 change: 0 additions & 1 deletion userbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from .userbot import *
syntax = {}

0 comments on commit 0bb1e73

Please sign in to comment.