Sha256: 75ac0f834e6f8eb8c29aa97842d52700b2c9e505930a7e3c65189dc7a0984da5

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 Bytes

Contents

class QwtfDiscordBotServer < QwtfDiscordBot
  def run
    bot = Discordrb::Commands::CommandBot.new(
      token: TOKEN,
      client_id: CLIENT_ID,
      prefix: '!'
    )

    bot.command :server do |event|
      qstat_request = QstatRequest.new(endpoint)
      message = qstat_request.server_summary
      embed = qstat_request.to_embed

      if embed
        event.channel.send_embed(message, embed)
      else
        event.channel.send_message(message)
      end
    end

    bot.run
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qwtf_discord_bot-0.5.9 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.8 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.7 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.6 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.5 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.4 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb
qwtf_discord_bot-0.5.3 lib/qwtf_discord_bot/qwtf_discord_bot_server.rb