Skip to content

Commit

Permalink
Say 'I am sending you a private message of all my commands' only if t…
Browse files Browse the repository at this point in the history
…here is not a priv msg yet
  • Loading branch information
NachE committed Jan 19, 2014
1 parent d50309f commit 0a408df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion help.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def help(bot, trigger):
def commands(bot, trigger):
"""Return a list of bot's commands"""
names = ', '.join(sorted(bot.doc.iterkeys()))
bot.reply("I am sending you a private message of all my commands!")
if not trigger.is_privmsg:
bot.reply("I am sending you a private message of all my commands!")
bot.msg(trigger.nick, 'Commands I recognise: ' + names + '.', max_messages=10)
bot.msg(trigger.nick, ("For help, do '%s: help example' where example is the " +
"name of the command you want help for.") % bot.nick)
Expand Down

0 comments on commit 0a408df

Please sign in to comment.