class SlackRespondent::Commands::Help

Public Class Methods

call(client, data, match) click to toggle source
# File lib/slack_respondent/commands/help.rb, line 9
def self.call(client, data, match)

  command = match[:expression]

  text = if command.present?
           Support::Help.instance.command_full_desc(command)
         else
           general_text
         end

  client.say(channel: data.channel, text: text)
end

Private Class Methods

general_text() click to toggle source
# File lib/slack_respondent/commands/help.rb, line 25
        def general_text
          bot_desc = Support::Help.instance.bot_desc_and_commands
          other_commands_descs = Support::Help.instance.other_commands_descs
          <<TEXT
#{bot_desc.join("\n")}

*Other commands:*
#{other_commands_descs.join("\n")}

For getting description of the command use: *help <command>*

For more information see https://github.com/slack-ruby/slack-ruby-bot, please.
TEXT
        end