Skip to content

Commit

Permalink
Update misc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Spyderzz committed Dec 22, 2019
1 parent fe9ddb3 commit 5b574bb
Showing 1 changed file with 2 additions and 39 deletions.
41 changes: 2 additions & 39 deletions userbot/modules/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def repeat(rep):
async def repo_is_here(wannasee):
""" For .repo command, just returns the repo URL. """
await wannasee.edit(
f"Click [here]({UPSTREAM_REPO_URL}) to open my userbot's repository.")
f"Click [here]({UPSTREAM_REPO_URL}) to open my Lit userbot's repository.")


@register(outgoing=True, pattern="^.raw$")
Expand All @@ -116,43 +116,6 @@ async def raw(event):
allow_cache=False,
reply_to=reply_to_id,
caption="`Here's the decoded message data !!`")

@register(outgoing=True, pattern="^.myusernames$")
async def _(event):
if event.fwd_from:
return
result = await bot(functions.channels.GetAdminedPublicChannelsRequest())
output_str = ""
for channel_obj in result.chats:
output_str += f"- {channel_obj.title} @{channel_obj.username} \n"
await event.edit(output_str)


@register(outgoing=True, pattern="^.community$")
async def bot_community(community):
""" For .support command, just returns the group link. """
if not community.text[0].isalpha() and community.text[0] not in ("/", "#", "@", "!"):
await community.edit("Join the awesome Paperplane UserBot Community: @Crackers_xD\nBe warned that this is a fork of their project and you may get limited support for bugs.")

@register(outgoing=True, pattern="^.support$")
async def bot_support(wannahelp):
""" For .support command, just returns the group link. """
if not wannahelp.text[0].isalpha() and wannahelp.text[0] not in ("/", "#", "@", "!"):
await wannahelp.edit("Join the Paperplane Extended Channel: @PaperplaneExtended")

@register(outgoing=True, pattern="^.creator$")
async def creator(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
await e.edit("[Spyder #DerpGang](https://t.me/Spyderzzz/)")

@register(outgoing=True, pattern="^.readme$")
async def reedme(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
await e.edit("You might want to have a look at the [README.md](https://github.com/spyderzz/Userbot/blob/master/README.md) file.")

#
# Copyright (c) Gegham Zakaryan | 2019
#


CMD_HELP.update({
Expand Down Expand Up @@ -199,4 +162,4 @@ async def reedme(e):
"raw":
".raw\
\nUsage: Get detailed JSON-like formatted data about replied message."
})
})

0 comments on commit 5b574bb

Please sign in to comment.