Skip to content

Commit

Permalink
Merge pull request #52 from discordextremelist/TheMoksej-v2.0.2
Browse files Browse the repository at this point in the history
adding embed_colour in admin cog
  • Loading branch information
carolinaisslaying authored Nov 6, 2020
2 parents 840d134 + 709b5dd commit 96bad86
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cogs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ class AdminCog(commands.Cog, name="Admin"):
def __init__(self, bot):
self.bot = bot
self.help_icon = f"{self.bot.settings['emoji']['coder']}"

async def embed_colour(self, ctx):
global colour

bot_guild_member = await ctx.guild.fetch_member(ctx.bot.user.id)
if len(str(bot_guild_member.colour.value)) == 1:
colour = 0xFFFFFA
else:
colour = bot_guild_member.colour.value

return colour

@commands.command(name="admintoken", usage="admintoken",
description="Allows you to get your temporary DELADMIN access token.")
Expand Down Expand Up @@ -70,4 +81,4 @@ async def admin_token(self, ctx):


def setup(bot):
bot.add_cog(AdminCog(bot))
bot.add_cog(AdminCog(bot))

0 comments on commit 96bad86

Please sign in to comment.