Class: StallmanBot::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/stallman_bot/commands/base.rb

Direct Known Subclasses

Start, Status, Stop

Class Method Summary collapse

Class Method Details

.run(bot, id, message) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/stallman_bot/commands/base.rb', line 4

def self.run(bot, id, message)
  if bot.nil? || id.nil?
    puts message
  else
    bot.api.send_message(chat_id: id, text: message)
  end
end