feat(fun): add more reactions

This commit is contained in:
Ryan 2025-03-28 21:13:06 -04:00
parent 062676df26
commit b0c96a11cd
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
2 changed files with 13 additions and 4 deletions

View File

@ -24,6 +24,12 @@ SPONSORBLOCK_CATEGORY_NAMES = {
"selfpromo": "self promotion", "selfpromo": "self promotion",
"sponsor": "sponsored", "sponsor": "sponsored",
} }
REACTIONS = {
"cat": ["🐈"],
"dog": ["🐕"],
"gn": ["💤", "😪", "😴", "🛌"],
"pizza": ["🍕"],
}
RELOADABLE_MODULES = [ RELOADABLE_MODULES = [
"arguments", "arguments",
"audio", "audio",

11
fun.py
View File

@ -1,10 +1,13 @@
import random import random
import commands import commands
from constants import REACTIONS
async def on_message(message): async def on_message(message):
if random.random() < 0.01 and "gn" in commands.tokenize( if random.random() < 0.01:
message.content, remove_prefix=False tokens = commands.tokenize(message.content, remove_prefix=False)
): for keyword, options in REACTIONS.items():
await message.add_reaction(random.choice(["💤", "😪", "😴", "🛌"])) if keyword in tokens:
await message.add_reaction(random.choice(options))
break