Class: MoonBot::Plugin::Ping

Inherits:
Object
  • Object
show all
Defined in:
lib/MoonBot/plugins/ping.rb

Instance Method Summary collapse

Constructor Details

#initialize(bot) ⇒ Ping

Returns a new instance of Ping.



3
4
5
# File 'lib/MoonBot/plugins/ping.rb', line 3

def initialize bot
  @bot = bot
end

Instance Method Details

#on_ping(message) ⇒ Object



7
8
9
10
# File 'lib/MoonBot/plugins/ping.rb', line 7

def on_ping message
  pong = "PONG #{message[:args]}"
  @bot.command pong
end