Browse Source

Maybe this time?

master
Daniel Muckerman 9 years ago
parent
commit
82ba015700
2 changed files with 14 additions and 1 deletions
  1. +1
    -1
      slack-mathbot/commands.rb
  2. +13
    -0
      slack-mathbot/commands/echo.rb

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

@ -1,4 +1,4 @@
require 'slack-mathbot/commands/calculate'
require 'slack-mathbot/commands/echo'
require 'slack-mathbot/commands/about'
require 'slack-mathbot/commands/help'
require 'slack-mathbot/commands/echo'

+ 13
- 0
slack-mathbot/commands/echo.rb View File

@ -0,0 +1,13 @@
module SlackMathbot
module Commands
class Echo < SlackRubyBot::Commands::Base
command 'echo'
def self.call(client, data, match)
send_message client, data.channel, match[:expression]
rescue StandardError => e
send_message client, data.channel, "Sorry, #{e.message}."
end
end
end
end

Loading…
Cancel
Save