From bf5a058af5f80b7f2fa63e3fcf52a3f834b526e9 Mon Sep 17 00:00:00 2001 From: Pyrrhic Date: Fri, 22 Apr 2022 15:40:23 -0500 Subject: [PATCH] Add donuts to random reactions Reduce chance of random reactions --- src/donut.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/donut.py b/src/donut.py index 04c9294..468d075 100644 --- a/src/donut.py +++ b/src/donut.py @@ -18,8 +18,24 @@ async def on_message(message, conf, client): global chance if random.randint(0, 100) < chance: - await message.add_reaction(emoji[random.randrange(0, len(emoji))]) - chance = random.uniform(0, conf.random_reaction_base_chance * 2) + choice = random.randrange(0, len(emoji) + 1) + if choice == len(emoji): + await message.add_reaction("🇱") + await message.add_reaction("🇮") + await message.add_reaction("🇬") + await message.add_reaction("🇲") + await message.add_reaction("🇦") + await message.add_reaction("🇩") + await message.add_reaction("🇴") + await message.add_reaction("🇳") + await message.add_reaction("🇺") + await message.add_reaction("🇹") + await message.add_reaction("🇸") + await message.add_reaction("🍩") + await message.add_reaction("👅") + else: + await message.add_reaction(emoji[choice]) + chance = random.uniform(0, conf.random_reaction_base_chance) else: chance += conf.random_reaction_chance_increment if message.author.id in conf.donut_ids: