Skip to content

Commit

Permalink
removed /help from HELP_TEXT (UsergeTeam#409)
Browse files Browse the repository at this point in the history
* removed /help from HELP_TEXT

* fixed deepsource
  • Loading branch information
Krishna-Singhal authored Dec 8, 2021
1 parent e354cb6 commit e112806
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions userge/plugins/utils/botpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
_STATS: Dict[str, int] = {"incoming": 0, "outgoing": 0}

START_TEXT = " Hello {mention}, you can contact me using this Bot."
START_MEDIA = os.environ.get("START_MEDIA", None)
START_MEDIA = os.environ.get("START_MEDIA")

botPmFilter = filters.create(lambda _, __, ___: BOT_PM)
bannedFilter = filters.create(lambda _, __, ___: ___.chat.id in _BANNED_USERS)
Expand Down Expand Up @@ -172,7 +172,6 @@ async def set_text(_, msg: PyroMessage):

@bot.on_message(filters.user(userge_id) & filters.private & filters.command("pmban"), group=1)
async def pm_ban(_, msg: PyroMessage):
global _BANNED_USERS # pylint: disable=global-statement
replied = msg.reply_to_message
user_id = msg.text.split(' ', maxsplit=1)[1] if ' ' in msg.text else ''
if not (replied or user_id):
Expand Down Expand Up @@ -211,7 +210,6 @@ async def pm_ban(_, msg: PyroMessage):
@bot.on_message(
filters.user(userge_id) & filters.private & filters.command("pmunban"), group=1)
async def pm_unban(_, msg: PyroMessage):
global _BANNED_USERS # pylint: disable=global-statement
replied = msg.reply_to_message
user_id = msg.text.split(' ', maxsplit=1)[1] if ' ' in msg.text else ''
if not (replied or user_id):
Expand Down Expand Up @@ -275,7 +273,6 @@ async def bot_pm_handler(_, msg: PyroMessage):
HELP_TEXT = """**Here are the available commands for Bot PM:**
/start - Start the bot
/help -See this text again
/settext [text | reply to text] - Set Custom Start Text
/pmban [user_id | reply to user] - Ban User from Doing Pms
/pmunban [user_id | reply to user] - UnBan Banned user
Expand Down

0 comments on commit e112806

Please sign in to comment.