Sha256: 152c856a5db80888cea64834a04f5dad8c480624c08c48b60284d682c5318ebb

Contents?: true

Size: 450 Bytes

Versions: 4

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

require "discorb"

client = Discorb::Client.new(logger: Logger.new($stderr))

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 == "!inspect"

  message.channel.post("I'm #{client.user}, running on shard #{client.shard_id}!")
end

client.run(ENV.fetch("DISCORD_BOT_TOKEN", nil), shards: [0, 1], shard_count: 2)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
discorb-0.20.0 examples/simple/shard.rb
discorb-0.19.0 examples/simple/shard.rb
discorb-0.18.1 examples/simple/shard.rb
discorb-0.18.0 examples/simple/shard.rb