Apparently session hashes can be negative integers too
This commit is contained in:
@@ -106,9 +106,7 @@ async def session(evt: CommandEvent) -> Optional[Dict]:
|
|||||||
try:
|
try:
|
||||||
session_hash = int(evt.args[1])
|
session_hash = int(evt.args[1])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return await evt.reply("Hash must be a positive integer")
|
return await evt.reply("Hash must be an integer")
|
||||||
if session_hash <= 0:
|
|
||||||
return await evt.reply("Hash must be a positive integer")
|
|
||||||
try:
|
try:
|
||||||
ok = await evt.sender.client(ResetAuthorizationRequest(hash=session_hash))
|
ok = await evt.sender.client(ResetAuthorizationRequest(hash=session_hash))
|
||||||
except HashInvalidError:
|
except HashInvalidError:
|
||||||
|
|||||||
Reference in New Issue
Block a user