diff --git a/ubot/modules/sudo.py b/ubot/modules/sudo.py index 8da1f77..850c462 100644 --- a/ubot/modules/sudo.py +++ b/ubot/modules/sudo.py @@ -60,6 +60,11 @@ async def shutdown(event): @ldr.add("blacklist", sudo=True) async def add_blacklist(event): if event.args: + try: + event.args = int(event.args) + except: + pass + try: user_entity = await event.client.get_entity(event.args) except (ValueError, TypeError): @@ -92,6 +97,11 @@ async def add_blacklist(event): @ldr.add("unblacklist", sudo=True) async def rem_blacklist(event): if event.args: + try: + event.args = int(event.args) + except: + pass + try: user_entity = await event.client.get_entity(event.args) except (ValueError, TypeError): @@ -134,6 +144,11 @@ async def show_blacklist(event): @ldr.add("sudo", owner=True) async def add_sudo(event): if event.args: + try: + event.args = int(event.args) + except: + pass + try: user_entity = await event.client.get_entity(event.args) except (ValueError, TypeError): @@ -166,6 +181,11 @@ async def add_sudo(event): @ldr.add("unsudo", owner=True) async def rem_sudo(event): if event.args: + try: + event.args = int(event.args) + except: + pass + try: user_entity = await event.client.get_entity(event.args) except (ValueError, TypeError):