Skip to content

Commit

Permalink
Add donuts to random reactions
Browse files Browse the repository at this point in the history
Reduce chance of random reactions
  • Loading branch information
nfaltermeier committed Apr 22, 2022
1 parent f33fd2c commit bf5a058
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/donut.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bf5a058

Please sign in to comment.