2020-02-05 18:18:32 +00:00
|
|
|
import random
|
|
|
|
from src import EventManager, ModuleManager, utils
|
|
|
|
|
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("get.command")
|
|
|
|
@utils.kwarg("priority", EventManager.PRIORITY_HIGH)
|
|
|
|
def get_command(self, event):
|
2020-04-07 18:30:32 +00:00
|
|
|
event["kwargs"]["CTRIGGER"] = event["command_prefix"]
|
|
|
|
|
|
|
|
event["kwargs"]["BNICK"] = event["server"].nickname
|
2020-02-05 18:18:32 +00:00
|
|
|
event["kwargs"]["NICK"] = event["user"].nickname
|
2020-04-07 18:30:32 +00:00
|
|
|
|
2020-02-05 18:18:32 +00:00
|
|
|
if event["is_channel"]:
|
|
|
|
event["kwargs"]["CHAN"] = event["target"].name
|
|
|
|
random_user = random.choice(list(event["target"].users))
|
|
|
|
event["kwargs"]["RNICK"] = random_user.nickname
|