mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-16 02:30:11 +00:00
Fix clear avatar bug
Fixes a bug in member_avatar() where the bot will try to check for an attachment via list index when attachments do not exist.
This commit is contained in:
parent
15ccc4e27a
commit
214a6d5a49
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ async def member_avatar(ctx: CommandContext, member: Member):
|
|||
if user:
|
||||
new_avatar_url = user.avatar_url_as(format="png")
|
||||
|
||||
if not new_avatar_url and ctx.message.attachments[0]:
|
||||
if not new_avatar_url and ctx.message.attachments:
|
||||
new_avatar_url = ctx.message.attachments[0].url
|
||||
|
||||
await member.set_avatar(ctx.conn, new_avatar_url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue