From a4a787830af89e74ad615486dfea56ea99c1bfab Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 30 Apr 2020 14:23:33 -0400 Subject: [PATCH] Fix leaver get_embed_color issue (#84) * Fix embed color * Gotta await it --- leaver/leaver.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/leaver/leaver.py b/leaver/leaver.py index 13ff0e0..83e8f1f 100644 --- a/leaver/leaver.py +++ b/leaver/leaver.py @@ -15,7 +15,9 @@ class Leaver(Cog): def __init__(self, bot: Red): self.bot = bot - self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True) + self.config = Config.get_conf( + self, identifier=9811198108111121, force_registration=True + ) default_guild = {"channel": ""} self.config.register_guild(**default_guild) @@ -41,9 +43,15 @@ class Leaver(Cog): if channel != "": channel = guild.get_channel(channel) - out = "{}{} has left the server".format(member, member.nick if member.nick is not None else "") + out = "{}{} has left the server".format( + member, member.nick if member.nick is not None else "" + ) if await self.bot.embed_requested(channel, member): - await channel.send(embed=discord.Embed(description=out, color=self.bot.color)) + await channel.send( + embed=discord.Embed( + description=out, color=(await self.bot.get_embed_color(channel)) + ) + ) else: await channel.send(out) else: