simplify dale

This commit is contained in:
Luke Robles 2022-12-20 11:54:51 -08:00
parent 4cee6db969
commit fefe0e9090

View File

@ -88,15 +88,7 @@ class AnimalFunctions(commands.Cog):
) )
async def dale(self, ctx: commands.Context): async def dale(self, ctx: commands.Context):
# If the file picked is too large, try again await ctx.respond(file=discord.File(animals.dale()))
dale_pic = None
while not dale_pic:
try:
dale_pic = animals.dale()
await ctx.respond(file=discord.File(dale_pic))
except Exception:
print("File too large, trying again")
dale_pic = None
@commands.slash_command( @commands.slash_command(
guild_ids=None, name="rat", description="Posts a photo of a rat" guild_ids=None, name="rat", description="Posts a photo of a rat"