diff options
| author | 2022-01-01 23:44:42 +0000 | |
|---|---|---|
| committer | 2022-01-01 23:44:42 +0000 | |
| commit | 21cca969fab2582b51190468b8810c0157c8d7a7 (patch) | |
| tree | ee77a61d57b4d46f0e3ebdfadab760896986db2d /bot/exts/holidays/halloween/candy_collection.py | |
| parent | Add Better Support For Whitelisting DM Commands (diff) | |
| parent | Merge pull request #997 from Sn4u/fix-995 (diff) | |
Merge branch 'main' into dm-check
Diffstat (limited to 'bot/exts/holidays/halloween/candy_collection.py')
| -rw-r--r-- | bot/exts/holidays/halloween/candy_collection.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/bot/exts/holidays/halloween/candy_collection.py b/bot/exts/holidays/halloween/candy_collection.py index bb9c93be..729bbc97 100644 --- a/bot/exts/holidays/halloween/candy_collection.py +++ b/bot/exts/holidays/halloween/candy_collection.py @@ -187,6 +187,12 @@ class CandyCollection(commands.Cog):                  for index, record in enumerate(top_five)              ) if top_five else "No Candies" +        def get_user_candy_score() -> str: +            for user_id, score in records: +                if user_id == ctx.author.id: +                    return f"{ctx.author.mention}: {score}" +            return f"{ctx.author.mention}: 0" +          e = discord.Embed(colour=discord.Colour.og_blurple())          e.add_field(              name="Top Candy Records", @@ -194,6 +200,11 @@ class CandyCollection(commands.Cog):              inline=False          )          e.add_field( +            name="Your Candy Score", +            value=get_user_candy_score(), +            inline=False +        ) +        e.add_field(              name="\u200b",              value="Candies will randomly appear on messages sent. "                    "\nHit the candy when it appears as fast as possible to get the candy! " | 
