diff --git a/sopel/builtins/tell.py b/sopel/builtins/tell.py index 6bc427d69..436d9b3f2 100644 --- a/sopel/builtins/tell.py +++ b/sopel/builtins/tell.py @@ -170,19 +170,28 @@ def _format_safe_lstrip(text): @plugin.command('tell', 'ask') @plugin.nickname_command('tell', 'ask') @plugin.example('$nickname, tell dgw he broke it again.', user_help=True) +@plugin.example('.ask ', 'ask whom?') @plugin.example('.tell ', 'tell whom?') +@plugin.example('.ask @', 'ask whom?') +@plugin.example('.tell @', 'tell whom?') @plugin.example('.ask Exirel ', 'ask Exirel what?') +@plugin.example('.tell Exirel ', 'tell Exirel what?') +@plugin.example('.ask @Exirel ', 'ask Exirel what?') +@plugin.example('.tell @Exirel ', 'tell Exirel what?') def f_remind(bot, trigger): """Give someone a message the next time they're seen""" teller = trigger.nick verb = trigger.group(1) if not trigger.group(3): + tellee = "" + else: + tellee = trigger.group(3).rstrip('.,:;').lstrip('@') + + if not tellee: bot.reply("%s whom?" % verb) return - tellee = trigger.group(3).rstrip('.,:;') - # all we care about is having at least one non-whitespace # character after the name if not trigger.group(4): @@ -204,9 +213,6 @@ def f_remind(bot, trigger): bot.reply('That nickname is too long.') return - if tellee[0] == '@': - tellee = tellee[1:] - if tellee == bot.nick: bot.reply("I'm here now; you can %s me whatever you want!" % verb) return