diff --git a/packages/servers/ircbot/hooks/roll.py b/packages/servers/ircbot/hooks/roll.py new file mode 100644 index 0000000..2850f09 --- /dev/null +++ b/packages/servers/ircbot/hooks/roll.py @@ -0,0 +1,8 @@ +import main +import random + +class EventHandler(main.EventHandler): + def on_message(bot, e): + if e.message == '.roll': + msg = f'{e.sender}: rolled a {random.randint(1, 6)}' + bot.send_message(e.channel, msg)