Sha256: 6d77fdfba84b59c75bc5edc78ec8329bdf8ff4b2cbd11fb2b28ee99ecc4ad6a0
Contents?: true
Size: 322 Bytes
Versions: 4
Compression:
Stored size: 322 Bytes
Contents
# frozen_string_literal: true 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.16.0 | examples/simple/ping_pong.rb |
discorb-0.15.1 | examples/simple/ping_pong.rb |
discorb-0.15.0 | examples/simple/ping_pong.rb |
discorb-0.14.0 | examples/simple/ping_pong.rb |