Browse Source

testing

master
Daniel Muckerman 9 years ago
parent
commit
8ed18c4564
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      slack-mathbot/commands/about.rb
  2. +1
    -0
      slack-mathbot/commands/calculate.rb
  3. +1
    -1
      slack-mathbot/commands/help.rb

+ 1
- 1
slack-mathbot/commands/about.rb View File

@ -4,7 +4,7 @@ module SlackMathbot
match(/^(?<bot>\w*)$/)
def self.call(client, data, _match)
send_message_with_gif client, data.channel, SlackMathbot::ABOUT, 'math'
send_message client, data.channel, SlackMathbot::ABOUT
end
end
end

+ 1
- 0
slack-mathbot/commands/calculate.rb View File

@ -5,6 +5,7 @@ module SlackMathbot
command 'calculate'
def self.call(client, data, match)
send_message client, data.channel, match
result = Dentaku::Calculator.new.evaluate(match[:expression]) if match.names.include?('expression')
result = result.to_s if result
if result && result.length > 0

+ 1
- 1
slack-mathbot/commands/help.rb View File

@ -2,7 +2,7 @@ module SlackMathbot
module Commands
class Help < SlackRubyBot::Commands::Base
def self.call(client, data, _match)
send_message_with_gif client, data.channel, 'See https://github.com/dblock/slack-mathbot, please.', 'help'
send_message client, data.channel, 'See https://github.com/dblock/slack-mathbot, please.'
end
end
end

Loading…
Cancel
Save