Merge pull request #6 from stijndcl/active_reminds

Remind now shows active categories
pull/8/head
Stijn De Clercq 2020-10-24 17:19:07 +02:00 committed by GitHub
commit 998fbe06db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -20,9 +20,12 @@ class Remind(commands.Cog):
Command group to remind the user of a certain thing every day. Command group to remind the user of a certain thing every day.
:param ctx: Discord Context :param ctx: Discord Context
""" """
categories = ["Les", "Nightly"] rows = remind.getOrAddUser(ctx.author.id)
embed = discord.Embed(colour=discord.Colour.blue())
# TODO use a loop for this when not lazy
categories = [remind.getIcon(rows[1]) + " Nightly", remind.getIcon(rows[2]) + " Les"]
embed = discord.Embed(colour=discord.Colour.blue())
embed.set_author(name="Remind Categorieën") embed.set_author(name="Remind Categorieën")
embed.description = "\n".join(sorted(categories)) embed.description = "\n".join(sorted(categories))

View File

@ -41,3 +41,8 @@ def switchReminder(userid, column):
return to return to
# Function that returns a red or green circle depending on
# whether or not a value is True or False
def getIcon(val):
return ":green_circle:" if val else ":red_circle:"