Put moderation notification in right channel
This commit is contained in:
parent
c8df4a0b90
commit
e8f7fd2184
1 changed files with 19 additions and 15 deletions
|
@ -95,9 +95,13 @@ class ModcaseCog(Extension):
|
||||||
if not modlog:
|
if not modlog:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
channel = await ctx.guild.fetch_channel(modlog.value)
|
||||||
|
if channel:
|
||||||
fields = (
|
fields = (
|
||||||
EmbedField(name="Action Type", value=name, inline=False),
|
EmbedField(name="Action Type", value=name, inline=False),
|
||||||
EmbedField(name="Reason", value=kwargs.get("reason", None) or "N/A", inline=False),
|
EmbedField(
|
||||||
|
name="Reason", value=kwargs.get("reason", None) or "N/A", inline=False
|
||||||
|
),
|
||||||
EmbedField(name="Admin", value=ctx.author.mention, inline=False),
|
EmbedField(name="Admin", value=ctx.author.mention, inline=False),
|
||||||
)
|
)
|
||||||
embed = build_embed(
|
embed = build_embed(
|
||||||
|
@ -109,7 +113,7 @@ class ModcaseCog(Extension):
|
||||||
name=f"{user.username}#{user.discriminator}", icon_url=user.display_avatar.url
|
name=f"{user.username}#{user.discriminator}", icon_url=user.display_avatar.url
|
||||||
)
|
)
|
||||||
embed.set_footer(text=f"User ID: {user.id}")
|
embed.set_footer(text=f"User ID: {user.id}")
|
||||||
await ctx.send(embed=embed)
|
await channel.send(embeds=embed)
|
||||||
|
|
||||||
lookup_key = f"{user.id}|{ctx.guild.id}"
|
lookup_key = f"{user.id}|{ctx.guild.id}"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue