Merge pull request #15 from Fluffy-Bean/deepsource-autofix-16d41e08

refactor unnecessary `else` / `elif` when `if` block has a `return` statement
This commit is contained in:
Michał Gdula 2023-09-11 22:26:21 +01:00 committed by GitHub
commit 33109396b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,10 +19,10 @@ class Img(commands.Cog):
async def get_image_attachments(ctx):
if ctx.message.attachments:
return ctx.message.attachments[0]
elif ctx.message.reference:
if ctx.message.reference:
if ctx.message.reference.resolved.attachments:
return ctx.message.reference.resolved.attachments[0]
elif (
if (
ctx.message.reference.resolved.embeds
and ctx.message.reference.resolved.embeds[0].image
):