mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Use embed_color for embeds in Warnings cog (#4878)
* add ✨ color ✨ * add color on line 315, fix line 340 * Black style * fix color on line 341 * thanks jojo >_> * dont need i18n here * Black style again :D
This commit is contained in:
parent
49da854eb7
commit
a919610588
@ -312,6 +312,7 @@ class Warnings(commands.Cog):
|
|||||||
em = discord.Embed(
|
em = discord.Embed(
|
||||||
title=_("Reason: {name}").format(name=r),
|
title=_("Reason: {name}").format(name=r),
|
||||||
description=v["description"],
|
description=v["description"],
|
||||||
|
color=await ctx.embed_colour(),
|
||||||
)
|
)
|
||||||
em.add_field(name=_("Points"), value=str(v["points"]))
|
em.add_field(name=_("Points"), value=str(v["points"]))
|
||||||
msg_list.append(em)
|
msg_list.append(em)
|
||||||
@ -337,7 +338,10 @@ class Warnings(commands.Cog):
|
|||||||
async with guild_settings.actions() as registered_actions:
|
async with guild_settings.actions() as registered_actions:
|
||||||
for r in registered_actions:
|
for r in registered_actions:
|
||||||
if await ctx.embed_requested():
|
if await ctx.embed_requested():
|
||||||
em = discord.Embed(title=_("Action: {name}").format(name=r["action_name"]))
|
em = discord.Embed(
|
||||||
|
title=_("Action: {name}").format(name=r["action_name"]),
|
||||||
|
color=await ctx.embed_colour(),
|
||||||
|
)
|
||||||
em.add_field(name=_("Points"), value="{}".format(r["points"]), inline=False)
|
em.add_field(name=_("Points"), value="{}".format(r["points"]), inline=False)
|
||||||
em.add_field(
|
em.add_field(
|
||||||
name=_("Exceed command"),
|
name=_("Exceed command"),
|
||||||
@ -441,8 +445,7 @@ class Warnings(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
title = _("Warning")
|
title = _("Warning")
|
||||||
em = discord.Embed(
|
em = discord.Embed(
|
||||||
title=title,
|
title=title, description=reason_type["description"], color=await ctx.embed_colour()
|
||||||
description=reason_type["description"],
|
|
||||||
)
|
)
|
||||||
em.add_field(name=_("Points"), value=str(reason_type["points"]))
|
em.add_field(name=_("Points"), value=str(reason_type["points"]))
|
||||||
try:
|
try:
|
||||||
@ -470,8 +473,7 @@ class Warnings(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
title = _("Warning")
|
title = _("Warning")
|
||||||
em = discord.Embed(
|
em = discord.Embed(
|
||||||
title=title,
|
title=title, description=reason_type["description"], color=await ctx.embed_colour()
|
||||||
description=reason_type["description"],
|
|
||||||
)
|
)
|
||||||
em.add_field(name=_("Points"), value=str(reason_type["points"]))
|
em.add_field(name=_("Points"), value=str(reason_type["points"]))
|
||||||
warn_channel = self.bot.get_channel(guild_settings["warn_channel"])
|
warn_channel = self.bot.get_channel(guild_settings["warn_channel"])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user