diff options
author | 2019-02-17 14:25:34 -0500 | |
---|---|---|
committer | 2019-02-17 14:25:34 -0500 | |
commit | cb5f8a878bcf7417d5309f5f9b76ea12a53fd09d (patch) | |
tree | 96194efad03264427eeb3b1a1164412ec405490d | |
parent | Merge pull request #111 from astieman/RollMethod (diff) |
Add direct reference to terning emoji to constants, fun cog
-rw-r--r-- | bot/constants.py | 7 | ||||
-rw-r--r-- | bot/seasons/evergreen/fun.py | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bot/constants.py b/bot/constants.py index ec8a1a4d..cb191da9 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -72,6 +72,13 @@ class Emojis: christmas_tree = "\U0001F384" check = "\u2611" + terning1 = "<:terning1:431249668983488527>" + terning2 = "<:terning2:462339216987127808>" + terning3 = "<:terning3:431249694467948544>" + terning4 = "<:terning4:431249704769290241>" + terning5 = "<:terning5:431249716328792064>" + terning6 = "<:terning6:431249726705369098>" + class Lovefest: channel_id = int(environ.get("LOVEFEST_CHANNEL_ID", 542272993192050698)) diff --git a/bot/seasons/evergreen/fun.py b/bot/seasons/evergreen/fun.py index afe37b75..4da01dd1 100644 --- a/bot/seasons/evergreen/fun.py +++ b/bot/seasons/evergreen/fun.py @@ -3,6 +3,8 @@ import random from discord.ext import commands +from bot.constants import Emojis + log = logging.getLogger(__name__) @@ -25,7 +27,8 @@ class Fun: elif num_rolls < 1: output = ":no_entry: You must roll at least once." for _ in range(num_rolls): - output += ":terning%d: " % random.randint(1, 6) + terning = f"terning{random.randint(1, 6)}" + output += getattr(Emojis, terning, '') await ctx.send(output) |