diff --git a/sukuinote/plugins/anilist.py b/sukuinote/plugins/anilist.py index f15c6a4..6eb4cd4 100644 --- a/sukuinote/plugins/anilist.py +++ b/sukuinote/plugins/anilist.py @@ -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: diff --git a/sukuinote/plugins/ud.py b/sukuinote/plugins/ud.py index 450f97b..ba339e4 100644 --- a/sukuinote/plugins/ud.py +++ b/sukuinote/plugins/ud.py @@ -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: diff --git a/sukuinote/plugins/wikipedia.py b/sukuinote/plugins/wikipedia.py index c4513cf..e4141fd 100644 --- a/sukuinote/plugins/wikipedia.py +++ b/sukuinote/plugins/wikipedia.py @@ -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: