lunarflu HF staff commited on
Commit
69cdc49
1 Parent(s): 0b9f133

add role.mention to role additions/deletions

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -258,11 +258,11 @@ async def on_member_update(before, after):
258
  else:
259
  moderator = "Unknown"
260
 
261
- embed = Embed(color=Color.green())
262
  embed.set_author(name=f"{after} ID: {after.id}", icon_url=after.avatar.url if after.avatar else bot.user.avatar.url)
263
  embed.title = "Role Added"
264
  embed.add_field(name="User", value=after.mention, inline=True)
265
- embed.add_field(name="Role", value=role.name, inline=True)
266
  embed.add_field(name="Added By", value=moderator.mention if isinstance(moderator, discord.Member) else "Unknown", inline=True)
267
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
268
  await bot.log_channel.send(embed=embed)
@@ -277,11 +277,11 @@ async def on_member_update(before, after):
277
  else:
278
  moderator = "Unknown"
279
 
280
- embed = Embed(color=Color.red())
281
  embed.set_author(name=f"{after} ID: {after.id}", icon_url=after.avatar.url if after.avatar else bot.user.avatar.url)
282
  embed.title = "Role Removed"
283
  embed.add_field(name="User", value=after.mention, inline=True)
284
- embed.add_field(name="Role", value=role.name, inline=True)
285
  embed.add_field(name="Removed By", value=moderator.mention if isinstance(moderator, discord.Member) else "Unknown", inline=True)
286
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
287
  await bot.log_channel.send(embed=embed)
 
258
  else:
259
  moderator = "Unknown"
260
 
261
+ embed = Embed(color=Color.orange())
262
  embed.set_author(name=f"{after} ID: {after.id}", icon_url=after.avatar.url if after.avatar else bot.user.avatar.url)
263
  embed.title = "Role Added"
264
  embed.add_field(name="User", value=after.mention, inline=True)
265
+ embed.add_field(name="Role", value=f"{role.name} ({role.mention})", inline=True)
266
  embed.add_field(name="Added By", value=moderator.mention if isinstance(moderator, discord.Member) else "Unknown", inline=True)
267
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
268
  await bot.log_channel.send(embed=embed)
 
277
  else:
278
  moderator = "Unknown"
279
 
280
+ embed = Embed(color=Color.orange())
281
  embed.set_author(name=f"{after} ID: {after.id}", icon_url=after.avatar.url if after.avatar else bot.user.avatar.url)
282
  embed.title = "Role Removed"
283
  embed.add_field(name="User", value=after.mention, inline=True)
284
+ embed.add_field(name="Role", value=f"{role.name} ({role.mention})", inline=True)
285
  embed.add_field(name="Removed By", value=moderator.mention if isinstance(moderator, discord.Member) else "Unknown", inline=True)
286
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
287
  await bot.log_channel.send(embed=embed)