Skip to content

Commit

Permalink
Sudo fix (TgCatUB#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy1709 authored Jun 1, 2021
1 parent 8c53474 commit 976e03d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion userbot/plugins/externalplugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ async def install():
break
except ModuleNotFoundError as e:
install_pip(e.name)
check += 1
if check > 5:
check += 1
break
if BOTLOG:
await catub.send_message(
Expand Down
6 changes: 4 additions & 2 deletions userbot/plugins/pmpermit.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,17 @@ async def pmpermit_on(event):
event, "__Pmpermit has been enabled for your account succesfully.__"
)
else:
await edit_delete(event, "__Pmpermit is already enabled for your account")
await edit_delete(event, "__Pmpermit is already enabled for your account__")
else:
if gvarstatus("pmpermit") is not None:
delgvar("pmpermit")
await edit_delete(
event, "__Pmpermit has been disabled for your account succesfully__"
)
else:
await edit_delete(event, "__Pmpermit is already disabled for your account")
await edit_delete(
event, "__Pmpermit is already disabled for your account__"
)


@catub.cat_cmd(
Expand Down
3 changes: 2 additions & 1 deletion userbot/plugins/sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ async def _(event): # sourcery no-metrics
if error != "":
return await edit_delete(event, error, 10)
pkeys = clist.keys()
pkeys = sorted(pkeys)
n_pkeys = [i for i in pkeys if i is not None]
pkeys = sorted(n_pkeys)
output = ""
for plugin in pkeys:
output += f"• {plugin}\n"
Expand Down

0 comments on commit 976e03d

Please sign in to comment.