From d76aac181b16be85a15f0ffc2adb0b5655fdb34a Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Mon, 3 Jan 2022 13:55:51 +0100 Subject: [PATCH] flair cog --- cogs/flair.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cogs/flair.py diff --git a/cogs/flair.py b/cogs/flair.py new file mode 100644 index 0000000..e5379e5 --- /dev/null +++ b/cogs/flair.py @@ -0,0 +1,52 @@ +import discord +from discord.ext import commands +from logging import getLogger +import asyncio + + +# setup logging +log = getLogger(__name__) + + +e = discord.Embed() + + +class Flair(commands.Cog): + """ The Flair functionality enables the user to setup flair for their profile. + + Currently, the flair-roles available are: + - gender pronouns + - willingness to join mature discussions + - whether or not they are open for DMs + + """ + + def __init__(self, bot): + self.bot = bot + self.msg1 = ['✅', '❌', '❔'] + + @commands.command() + async def flair(self, ctx): + msg1 = ( + f'Welkom bij de flair-wizard! Gebruik onderstaande opties om verder te gaan. \n\n' + f'Druk op ✅ als je verder wil gaan met de wizard.\n' + f'Als je niet je flair opnieuw wilt instellen, druk dan op ❌.\n' + f'Gebruik ❔ als je wil weten hoe je via een tekstcommando alles kan instellen.\n\n' + ) + dm = await ctx.author.send(msg1) + log.info(f'{ctx.author} started the flair wizard') + for emoji in self.msg1: + await dm.add_reaction(emoji) + + + @commands.Cog.listener() + async def on_ready(self): + log.info(f'module active') + + +def setup(bot): + bot.add_cog(Flair(bot)) + + + + # numbers_reactions = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣']