2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 14:38:04 +00:00

add an easier flags variable

this also fixes a bug
This commit is contained in:
Nick80835
2020-06-22 21:53:11 -04:00
parent b28abaec50
commit 65fbed1480
10 changed files with 23 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ async def pokemon_image(event):
async with ldr.aioclient.get("https://pokeapi.co/api/v2/pokemon/" + event.args) as response:
if response.status == 200:
sprite_url = (await response.json())["sprites"]["front_shiny" if event.pattern_match.group(1) else "front_default"]
sprite_url = (await response.json())["sprites"]["front_shiny" if event.other_args[0] else "front_default"]
else:
await event.reply(f"An error occurred: **{response.status}**")
return