[Mod] Add default bot color to kick & ban DM (#4822)

This commit is contained in:
aleclol 2021-02-14 19:34:05 -05:00 committed by GitHub
parent d64944d5c3
commit acec5c6efe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,8 @@ class KickBanMixin(MixinMeta):
if toggle: if toggle:
with contextlib.suppress(discord.HTTPException): with contextlib.suppress(discord.HTTPException):
em = discord.Embed( em = discord.Embed(
title=bold(_("You have been banned from {guild}.").format(guild=guild)) title=bold(_("You have been banned from {guild}.").format(guild=guild)),
color=await self.bot.get_embed_color(user),
) )
em.add_field( em.add_field(
name=_("**Reason**"), name=_("**Reason**"),
@ -309,7 +310,8 @@ class KickBanMixin(MixinMeta):
if toggle: if toggle:
with contextlib.suppress(discord.HTTPException): with contextlib.suppress(discord.HTTPException):
em = discord.Embed( em = discord.Embed(
title=bold(_("You have been kicked from {guild}.").format(guild=guild)) title=bold(_("You have been kicked from {guild}.").format(guild=guild)),
color=await self.bot.get_embed_color(user),
) )
em.add_field( em.add_field(
name=_("**Reason**"), name=_("**Reason**"),