Fix number queries with no page for anilist, Urban Dictionary and Wikipedia

This commit is contained in:
blank X 2020-11-16 15:56:36 +07:00
parent e55631bfb7
commit 0bfe376149
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ async def anilist(client, message):
query = message.command
page = 1
character = 'c' in query.pop(0)
if query and query[0].isnumeric():
if len(query) > 1 and query[0].isnumeric():
page = int(query.pop(0))
page -= 1
if page < 0:

View File

@ -10,7 +10,7 @@ async def ud(client, message):
query = message.command
page = 1
query.pop(0)
if query and query[0].isnumeric():
if len(query) > 1 and query[0].isnumeric():
page = int(query.pop(0))
page -= 1
if page < 0:

View File

@ -10,7 +10,7 @@ async def wikipedia(client, message):
query = message.command
page = 1
query.pop(0)
if query and query[0].isnumeric():
if len(query) > 1 and query[0].isnumeric():
page = int(query.pop(0))
page -= 1
if page < 0: