lunarflu HF staff commited on
Commit
0aa24a3
1 Parent(s): 48a9b21

fixing empty avatar issue avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -215,7 +215,8 @@ async def on_member_unban(guild, unbanned_user):
215
  async def on_member_join(member):
216
  try:
217
  embed = Embed(color=Color.blue())
218
- embed.set_author(name=f"{member} ID: {member.id}", icon_url=member.avatar.url)
 
219
  embed.title = "User Joined"
220
  embed.add_field(name="Mention", value=member.mention, inline=True)
221
  embed.add_field(name="Nickname", value=member.nick, inline=True)
 
215
  async def on_member_join(member):
216
  try:
217
  embed = Embed(color=Color.blue())
218
+ avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url
219
+ embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)
220
  embed.title = "User Joined"
221
  embed.add_field(name="Mention", value=member.mention, inline=True)
222
  embed.add_field(name="Nickname", value=member.nick, inline=True)