Skip to content

Commit

Permalink
fix(Randimals): remove raccoon
Browse files Browse the repository at this point in the history
  • Loading branch information
tmercswims committed Jun 18, 2024
1 parent 304c365 commit 3343d64
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions randimals/randimals.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,24 +232,6 @@ async def fetcher() -> str:
log.warning("API call failed; unable to get kangaroo picture")
await ctx.send("I was unable to get a kangaroo picture.")

@commands.hybrid_command()
async def raccoon(self, ctx: commands.Context) -> None:
"""Get a random raccoon."""

await ctx.typing()

async def fetcher() -> str:
url = "https://some-random-api.com/animal/raccoon"
async with self.__session.get(url) as response:
return (await response.json())["image"]

try:
file = await self.__get_image_carefully(fetcher)
await ctx.send(file=file)
except (aiohttp.ClientError, RetryLimitExceeded):
log.warning("API call failed; unable to get raccoon picture")
await ctx.send("I was unable to get a raccoon picture.")

@commands.hybrid_command()
async def redpanda(self, ctx: commands.Context) -> None:
"""Get a random red panda."""
Expand Down

0 comments on commit 3343d64

Please sign in to comment.