summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-10-16 00:03:23 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-10-16 00:03:23 +0100
commitc1ce94987ad73c811f8987d2330ca7d99933b7d7 (patch)
tree7cfa291a825ef7508a4bdc741e651b13be87e2da /plugins
parent453d8a8a6f8957ffe2e9654e494f2d0ba19305f1 (diff)
downloadpoezio-c1ce94987ad73c811f8987d2330ca7d99933b7d7.tar.gz
poezio-c1ce94987ad73c811f8987d2330ca7d99933b7d7.tar.bz2
poezio-c1ce94987ad73c811f8987d2330ca7d99933b7d7.tar.xz
poezio-c1ce94987ad73c811f8987d2330ca7d99933b7d7.zip
send_delayed plugin: Give feedback on using /send_delayed.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/send_delayed.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/send_delayed.py b/plugins/send_delayed.py
index 299de6e2..7a3ddc60 100644
--- a/plugins/send_delayed.py
+++ b/plugins/send_delayed.py
@@ -38,15 +38,19 @@ class Plugin(BasePlugin):
@command_args_parser.quoted(2)
def command_delayed(self, args):
if args is None:
+ self.core.command.help('send_delayed')
return
delay_str, txt = args
delay = common.parse_str_to_secs(delay_str)
- if not delay_str:
+ if not delay:
+ self.api.information('Failed to parse %s.' % delay_str, 'Error')
return
tab = self.api.current_tab()
timed_event = timed_events.DelayedEvent(delay, self.say, (tab, txt))
self.api.add_timed_event(timed_event)
+ self.api.information('Delayed message will be sent in %ds (%s).'
+ % (delay, delay_str), 'Info')
def completion_delay(self, the_input):
txt = the_input.get_text()