simplify dale
This commit is contained in:
parent
ac0a6e52a9
commit
452554a27c
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user