packages/ircbot: dice roll
This commit is contained in:
parent
dff97b97a5
commit
d54bcec082
1 changed files with 8 additions and 0 deletions
8
packages/servers/ircbot/hooks/roll.py
Normal file
8
packages/servers/ircbot/hooks/roll.py
Normal 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)
|
Loading…
Reference in a new issue