diff --git a/slack-mathbot/commands/calculate.rb b/slack-mathbot/commands/calculate.rb index 9261b23..d39aaea 100644 --- a/slack-mathbot/commands/calculate.rb +++ b/slack-mathbot/commands/calculate.rb @@ -5,7 +5,7 @@ module SlackMathbot command 'calculate' def self.call(client, data, match) - send_message client, data.channel, match[:expression] + 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