diff --git a/telebot/plugins/superfban.py b/telebot/plugins/superfban.py index cc92e0c4..13118749 100644 --- a/telebot/plugins/superfban.py +++ b/telebot/plugins/superfban.py @@ -41,31 +41,25 @@ async def _(event): fedList.append(line[:36]) except BaseException: pass - arg = event.pattern_match.group(1) - args = arg.split() - if len(args) > 1: - FBAN = args[0] - REASON = "" - for a in args[1:]: - REASON += a + " " + arg = event.text.split(" ", maxsplit=2) + if len(arg) > 2: + FBAN = arg[1] + REASON = arg[2] else: - FBAN = arg + FBAN = arg[1] REASON = " #TBMassBanned " else: FBAN = previous_message.sender_id - REASON = event.pattern_match.group(1) + REASON = event.text.split(" ", maxsplit=1)[1] if REASON.strip() == "": REASON = " #TBMassBanned " else: - arg = event.pattern_match.group(1) - args = arg.split() - if len(args) > 1: - FBAN = args[0] - REASON = "" - for a in args[1:]: - REASON += a + " " + arg = event.text.split(" ", maxsplit=2) + if len(arg) > 2: + FBAN = arg[1] + REASON = arg[2] else: - FBAN = arg + FBAN = arg[1] REASON = " #TBMassBanned " try: int(FBAN) @@ -242,7 +236,7 @@ async def _(event): "superban": ".superfban \ \n**Usage**: Mass-Ban in all feds you are admin in.\ \nSet `EXCLUDE_FED fedid1|fedid2` in heroku vars to exclude those feds.\ - \nSet var `FBAN_GROUP_ID` ti the group with rose, where you want FBan to take place.\ + \nSet var `FBAN_GROUP_ID` to the group with rose, where you want FBan to take place.\ \n\nGet help - @TeleBotSupport." } )