def help_message(sender, command_name) #:nodoc:
      if command_name.nil? || command_name.length == 0
        # Display help for all commands
        help_message = "I understand the following commands:\n\n"

        @commands[:meta].sort.each do |command|
          # Thank you, Hash.sort
          command = command[1]

          if !command[:is_alias] && (command[:is_public] || master?(sender))
            command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
            help_message += "  #{command[:description]}\n\n"
          end
        end
      else
        # Display help for the given command
        command = @commands[:meta][command_name]

        if command.nil?
          help_message = "I don't understand '#{command_name}' Try saying" +
              " 'help' to see what commands I understand."
        else
          help_message = ''
          command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
          help_message += "  #{command[:description]} "
        end
      end

      help_message
    end
def help_message(sender, command_name) #:nodoc:
      if command_name.nil? || command_name.length == 0
        # Display help for all commands
        help_message = "I understand the following commands:\n\n"

        @commands[:meta].sort.each do |command|
          # Thank you, Hash.sort
          command = command[1]

          if !command[:is_alias] && (command[:is_public] || master?(sender))
            command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
            help_message += "  #{command[:description]}\n\n"
          end
        end
      else
        # Display help for the given command
        command = @commands[:meta][command_name]

        if command.nil?
          help_message = "I don't understand '#{command_name}' Try saying" +
              " 'help' to see what commands I understand."
        else
          help_message = ''
          command[:syntax].each { |syntax| help_message += "#{syntax}\n" }
          help_message += "  #{command[:description]} "
        end
      end

      help_message
    end
Returns the default help message describing the bot's command repertoire.
 Commands are sorted alphabetically by name, and are displayed according
 to the bot's and the commands's _public_ attribute.