Sha256: fdb07f6cc90c6ce261a3abe0c971fe69e1fbfb78a688aaac02430ce6bfe28b80

Contents?: true

Size: 290 Bytes

Versions: 26

Compression:

Stored size: 290 Bytes

Contents

require "discorb"

client = Discorb::Client.new

client.once :ready 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

26 entries across 26 versions & 1 rubygems

Version Path
discorb-0.7.6 examples/simple/ping_pong.rb
discorb-0.7.3 examples/simple/ping_pong.rb
discorb-0.7.2 examples/simple/ping_pong.rb
discorb-0.7.1 examples/simple/ping_pong.rb
discorb-0.7.0 examples/simple/ping_pong.rb
discorb-0.6.1 examples/simple/ping_pong.rb
discorb-0.6.0 examples/simple/ping_pong.rb
discorb-0.5.6 examples/simple/ping_pong.rb
discorb-0.5.5 examples/simple/ping_pong.rb
discorb-0.5.4 examples/simple/ping_pong.rb
discorb-0.5.3 examples/simple/ping_pong.rb
discorb-0.5.2 examples/simple/ping_pong.rb
discorb-0.5.1 examples/simple/ping_pong.rb
discorb-0.5.0 examples/simple/ping_pong.rb
discorb-0.4.2 examples/simple/ping_pong.rb
discorb-0.4.1 examples/simple/ping_pong.rb
discorb-0.4.0 examples/simple/ping_pong.rb
discorb-0.3.1 examples/simple/ping_pong.rb
discorb-0.3.0 examples/simple/ping_pong.rb
discorb-0.2.5 examples/simple/ping_pong.rb