diff options
| author | 2019-11-25 12:15:43 +0000 | |
|---|---|---|
| committer | 2019-11-25 12:18:07 +0000 | |
| commit | 985e4704a0465b2ab5d5c6b0805029c2844c2fa7 (patch) | |
| tree | bcb19ea6562b39c2825efc80dec9abb1fb45164a /modules | |
| parent | update CHANGELOG.md (diff) | |
| signature | ||
switch !to to !tell, add !to as an alias of !tell
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/tell.py (renamed from modules/to.py) | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/to.py b/modules/tell.py index eb0ad03a..93aaba0c 100644 --- a/modules/to.py +++ b/modules/tell.py @@ -15,13 +15,14 @@ class Module(ModuleManager.BaseModule): if messages: event["channel"].del_user_setting(event["user"].get_id(), "to") - @utils.hook("received.command.to", min_args=2, channel_only=True) - def to(self, event): - """ - :help: Relay a message to a user the next time they talk in this - channel - :usage: <nickname> <message> - """ + @utils.hook("received.command.to", alias_of="tell") + @utils.hook("received.command.tell") + @utils.kwarg("min_args", 2) + @utils.kwarg("channel_only", True) + @utils.kwarg("help", + "Relay a message to a user the next time they talk in this channel") + @utils.kwarg("usage", "<nickname> <message>") + def tell(self, event): target_name = event["args_split"][0] if not event["server"].has_user_id(target_name): raise utils.EventError("I've never seen %s before" % target_name) |
