depot/packages/servers/ircbot/hooks/roll.py

9 lines
237 B
Python
Raw Permalink Normal View History

2022-09-24 23:30:10 +03:00
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)