1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 06:37:29 +00:00

Added redundant check for image position input (> 0)

This commit is contained in:
Myned 2017-10-21 16:44:05 -04:00
parent 82729dc6c1
commit f96b5270c9

View file

@ -530,7 +530,7 @@ class MsG:
def on_message(msg): def on_message(msg):
if msg.content.isdigit(): if msg.content.isdigit():
if int(msg.content) <= len(posts) and msg.author is ctx.author and msg.channel is ctx.channel: if 1 <= int(msg.content) <= len(posts) and msg.author is ctx.author and msg.channel is ctx.channel:
return True return True
return False return False
@ -715,7 +715,7 @@ class MsG:
def on_message(msg): def on_message(msg):
if msg.content.isdigit(): if msg.content.isdigit():
if int(msg.content) <= len(posts) and msg.author is ctx.author and msg.channel is ctx.channel: if 1 <= int(msg.content) <= len(posts) and msg.author is ctx.author and msg.channel is ctx.channel:
return True return True
return False return False