Sha256: 56a560e24a6cf6c4e93c8f52feba8c2903987aae1864655ec66445f9d1c862fe
Contents?: true
Size: 548 Bytes
Versions: 8
Compression:
Stored size: 548 Bytes
Contents
class QwtfDiscordBotServer < QwtfDiscordBot def run bot = Discordrb::Commands::CommandBot.new( token: TOKEN, client_id: CLIENT_ID, prefix: '!' ) bot.command :server do |event, *args| hostname = args.first || endpoint qstat_request = QstatRequest.new(hostname) 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
8 entries across 8 versions & 1 rubygems