feat: add (incomplete) nix flake
dave.py isn't packaged yet. Will try to do this myself but dealing with vcpkg is a bit annoying.
This commit is contained in:
13
errornocord/fun.py
Normal file
13
errornocord/fun.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import random
|
||||
|
||||
from . import commands
|
||||
from .constants import REACTIONS
|
||||
|
||||
|
||||
async def on_message(message):
|
||||
if random.random() < 0.01:
|
||||
tokens = commands.tokenize(message.content, remove_prefix=False)
|
||||
for keyword, options in REACTIONS.items():
|
||||
if keyword in tokens:
|
||||
await message.add_reaction(random.choice(options))
|
||||
break
|
||||
Reference in New Issue
Block a user