packages/ircbot: dice roll

This commit is contained in:
Tiago Carvalho 2022-09-24 21:30:10 +01:00 committed by Max
parent dff97b97a5
commit d54bcec082

View file

@ -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)