2013-01-07 11:22:07 +00:00
|
|
|
# coding=utf-8
|
|
|
|
|
|
|
|
import random
|
|
|
|
|
|
|
|
nemubotversion = 3.3
|
|
|
|
|
|
|
|
def load(context):
|
|
|
|
from hooks import Hook
|
|
|
|
add_hook("cmd_hook", Hook(cmd_choice, "choice"))
|
|
|
|
|
|
|
|
def cmd_choice(msg):
|
2014-07-10 21:35:41 +00:00
|
|
|
return Response(msg.sender, random.choice(msg.cmds[1:]), channel=msg.channel, nick=msg.nick)
|