Sha256: 3f499d8cd41d92a7eafd3a0efcdcc14fd263302d5ab266ce1b4fe88f54d36164

Contents?: true

Size: 292 Bytes

Versions: 28

Compression:

Stored size: 292 Bytes

Contents

require "discorb"

client = Discorb::Client.new

client.once :standby do
  puts "Logged in as #{client.user}"
end

client.on :message do |message|
  next if message.author.bot?
  next unless message.content == "ping"

  message.channel.post("Pong!")
end

client.run(ENV["DISCORD_BOT_TOKEN"])

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
discorb-0.9.5 examples/simple/ping_pong.rb
discorb-0.9.4 examples/simple/ping_pong.rb
discorb-0.9.3 examples/simple/ping_pong.rb
discorb-0.9.1 examples/simple/ping_pong.rb
discorb-0.9.0 examples/simple/ping_pong.rb
discorb-0.8.2 examples/simple/ping_pong.rb
discorb-0.8.1 examples/simple/ping_pong.rb
discorb-0.8.0 examples/simple/ping_pong.rb