qwtf_discord_bot 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7f38a56cd0deee24b921ec3d9c0c002da8936cf10681197c2663eba97fcb66d
4
- data.tar.gz: 2827cd8f642c3339e0e3f2baed06fe6c722d6fcdbc1e691f933b930967679c98
3
+ metadata.gz: '0989489e22f9720bb4d8e94a84a931f51127dd610b6abf9c6ed93b32353f93cb'
4
+ data.tar.gz: 5791e08db5e473dc20aaaf47f26c426d5201f83d7e389f680bb85c75f74cc60b
5
5
  SHA512:
6
- metadata.gz: 69d996e55938128e7ce0504854425f9c5e2691de450ded94c786b12fdaf7621c7e502caf67031cc0a6f2694aee3aa1d819614dbf309f03f4e3ad84a72a293d8b
7
- data.tar.gz: 751965e1f052fa0f443c1828de268d986342401f5075466d7760004f8bc6e2e9608dd09f1fd9cab35cb1b439d5bfb0e4fb872ea2b4a57ab8eff1a1b651c145c1
6
+ metadata.gz: 70d31f2b3fc3da34587b57bfe3241963f1d4b4f77a0e53dc244f044f3b323d343bd86ef89b326fd161e0d1311a55b9dac6abc7afd04364a3991bd8691fa319f6
7
+ data.tar.gz: 1dcfe209e62ab29c3fcb812751d5664c54aaad1540fe89506d705e3b4e19befc1b195b18b00ede875e47bee4caa6bb36ae6faee592a95202298dcda17135014e
data/.env.example ADDED
@@ -0,0 +1,3 @@
1
+ export QWTF_DISCORD_BOT_TOKEN="lsadASDakslndasDsaNDKSamDSAMDLKASmDK.asmLDKASMDksaKMDasLKMD"
2
+ export QWTF_DISCORD_BOT_CLIENT_ID="370341285576923743"
3
+ export QWTF_DISCORD_BOT_CHANNEL_ID="120378917238730177"
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in qwtf_discord_bot.gemspec
6
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,20 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qwtf_discord_bot (0.3.2)
5
- activesupport
4
+ qwtf_discord_bot (0.3.3)
6
5
  discordrb
7
6
  thor (~> 0)
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
- activesupport (5.2.1)
13
- concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- concurrent-ruby (1.0.5)
18
11
  diff-lcs (1.3)
19
12
  discordrb (3.2.1)
20
13
  discordrb-webhooks (~> 3.2.0.1)
@@ -30,12 +23,9 @@ GEM
30
23
  ffi (1.9.25)
31
24
  http-cookie (1.0.3)
32
25
  domain_name (~> 0.5)
33
- i18n (1.1.0)
34
- concurrent-ruby (~> 1.0)
35
26
  mime-types (3.1)
36
27
  mime-types-data (~> 3.2015)
37
28
  mime-types-data (3.2016.0521)
38
- minitest (5.11.3)
39
29
  netrc (0.11.0)
40
30
  opus-ruby (1.0.1)
41
31
  ffi
@@ -60,9 +50,6 @@ GEM
60
50
  rspec-support (~> 3.7.0)
61
51
  rspec-support (3.7.1)
62
52
  thor (0.20.0)
63
- thread_safe (0.3.6)
64
- tzinfo (1.2.5)
65
- thread_safe (~> 0.1)
66
53
  unf (0.1.4)
67
54
  unf_ext
68
55
  unf_ext (0.0.7.5)
data/README.md CHANGED
@@ -20,12 +20,56 @@ A Discord bot for checking the status of QuakeWorld Team Fortress servers
20
20
 
21
21
  Create a bot on discord.
22
22
 
23
- Edit the `.env.example` file, update with your bot's `client_id` and `token` and save as `.env`. Then:
23
+ Edit the `.env.example` file, update with your bot's `client_id` and `token` and save as `.env`.
24
24
 
25
25
  $ source .env
26
- $ bundle exec exe\qwtf-discord-bot server
27
26
 
28
27
 
28
+ ### List commands
29
+
30
+ $ bundle exec exe/qwtf-discord-bot server help
31
+
32
+ There are two features:
33
+
34
+
35
+ ### Server
36
+
37
+ This responds to `!server` messages by providing information about your game
38
+ server. E.G.
39
+
40
+ $ bundle exec exe/qwtf-discord-bot server --hostname fortressone.ga --port 27501
41
+
42
+ ```
43
+ Usage:
44
+ qwtf_discord_bot server
45
+
46
+ Options:
47
+ [--hostname=HOSTNAME]
48
+ # Default: localhost
49
+ [--port=N]
50
+ # Default: 27500
51
+ ```
52
+
53
+
54
+ ### Watcher
55
+
56
+ This watches the game server and announces if anyone has joined the server. It
57
+ polls the server once every 30 seconds and will only report a player joining if
58
+ they haven't been connected for more than ten minutes. E.G.
59
+
60
+ $ bundle exec exe/qwtf-discord-bot watcher --hostname fortressone.ga --port 27501
61
+
62
+ ```
63
+ Usage:
64
+ qwtf_discord_bot watcher
65
+
66
+ Options:
67
+ [--hostname=HOSTNAME]
68
+ # Default: localhost
69
+ [--port=N]
70
+ # Default: 27500
71
+ ```
72
+
29
73
  ## License
30
74
 
31
75
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "qwtf_discord_bot"
3
+ require 'bundler/setup'
4
+ require 'qwtf_discord_bot'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "qwtf_discord_bot"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start(__FILE__)
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/emoji/red_spy.png ADDED
Binary file
data/exe/qwtf_discord_bot CHANGED
@@ -1,24 +1,32 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'qwtf_discord_bot'
4
- require "thor"
5
-
6
- class QwtfDiscordBotExe < Thor
7
- def self.exit_on_failure?
8
- true
9
- end
10
-
11
- desc "server", "Runs the qwtf-discord-bot server"
12
- def server
13
- server_bot = QwtfDiscordBot::Server.new
14
- server_bot.run
15
- end
16
-
17
- desc "watcher", "Runs the qwtf-discord-bot watcher"
18
- def watcher
19
- watcher_bot = QwtfDiscordBot::Watcher.new
20
- watcher_bot.run
21
- end
22
- end
23
-
24
- QwtfDiscordBotExe.start
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'qwtf_discord_bot'
4
+ require 'thor'
5
+
6
+ class QwtfDiscordBotExe < Thor
7
+ def self.exit_on_failure?
8
+ true
9
+ end
10
+
11
+ desc 'server', 'Responds to `!server` with server information'
12
+ method_option :hostname, alias: '-h', default: 'localhost'
13
+ method_option :port, type: :numeric, alias: '-p', default: 27500
14
+ def server
15
+ hostname = options['hostname']
16
+ port = options['port']
17
+ server_bot = QwtfDiscordBot::Server.new(hostname: hostname, port: port)
18
+ server_bot.run
19
+ end
20
+
21
+ desc 'watcher', 'Watches server and accounces when a player joins'
22
+ method_option :hostname, alias: '-h', default: 'localhost'
23
+ method_option :port, type: :numeric, alias: '-p', default: 27500
24
+ def watcher
25
+ hostname = options['hostname']
26
+ port = options['port']
27
+ watcher_bot = QwtfDiscordBot::Watcher.new(hostname: hostname, port: port)
28
+ watcher_bot.run
29
+ end
30
+ end
31
+
32
+ QwtfDiscordBotExe.start
data/lib/emoji.rb CHANGED
@@ -1,41 +1,40 @@
1
- class Emoji
2
- LOOKUP = {
3
- "red" => {
4
- "scout" => "<:scout_red:424097703127941130>",
5
- "sniper" => "<:sniper_red:424097704076115978>",
6
- "soldier" => "<:soldier_red:424097704197619712>",
7
- "demoman" => "<:demoman_red:424097687739301919>",
8
- "medic" => "<:medic_red:424097695418941451>",
9
- "pyro" => "<:pyro_red:424097704403271691>",
10
- "hwguy" => "<:hwguy_red:424097694030757889>",
11
- "spy" => "<:spy_red:424097704138899466>",
12
- "engineer" => "<:engineer_red:424097694680612864>"
13
- },
14
- "blue" => {
15
- "scout" => "<:scout_blue:456062063983460353>",
16
- "sniper" => "<:sniper_blue:456062061953417216>",
17
- "soldier" => "<:soldier_blue:456062062997536801>",
18
- "demoman" => "<:demoman_blue:456061938636554240>",
19
- "medic" => "<:medic_blue:456062056710537217>",
20
- "pyro" => "<:pyro_blue:456062062460928010>",
21
- "hwguy" => "<:hwguy_blue:456062063190736926>",
22
- "spy" => "<:spy_blue:456062062032846849>",
23
- "engineer" => "<:engineer_blue:456062031125020683>"
24
- }
25
- }
26
-
27
- def initialize(player)
28
- @player = player
29
- end
30
-
31
- def to_s
32
- id || ""
33
-
34
- end
35
-
36
- private
37
-
38
- def id
39
- @id ||= LOOKUP[@player.team.to_s] && LOOKUP[@player.team.to_s][@player.player_class]
40
- end
41
- end
1
+ class Emoji
2
+ LOOKUP = {
3
+ 'red' => {
4
+ 'scout' => '<:scout_red:424097703127941130>',
5
+ 'sniper' => '<:sniper_red:424097704076115978>',
6
+ 'soldier' => '<:soldier_red:424097704197619712>',
7
+ 'demoman' => '<:demoman_red:424097687739301919>',
8
+ 'medic' => '<:medic_red:424097695418941451>',
9
+ 'pyro' => '<:pyro_red:424097704403271691>',
10
+ 'hwguy' => '<:hwguy_red:424097694030757889>',
11
+ 'spy' => '<:spy_red:424097704138899466>',
12
+ 'engineer' => '<:engineer_red:424097694680612864>'
13
+ },
14
+ 'blue' => {
15
+ 'scout' => '<:scout_blue:456062063983460353>',
16
+ 'sniper' => '<:sniper_blue:456062061953417216>',
17
+ 'soldier' => '<:soldier_blue:456062062997536801>',
18
+ 'demoman' => '<:demoman_blue:456061938636554240>',
19
+ 'medic' => '<:medic_blue:456062056710537217>',
20
+ 'pyro' => '<:pyro_blue:456062062460928010>',
21
+ 'hwguy' => '<:hwguy_blue:456062063190736926>',
22
+ 'spy' => '<:spy_blue:456062062032846849>',
23
+ 'engineer' => '<:engineer_blue:456062031125020683>'
24
+ }
25
+ }.freeze
26
+
27
+ def initialize(player)
28
+ @player = player
29
+ end
30
+
31
+ def to_s
32
+ id || ''
33
+ end
34
+
35
+ private
36
+
37
+ def id
38
+ @id ||= LOOKUP[@player.team.to_s] && LOOKUP[@player.team.to_s][@player.player_class]
39
+ end
40
+ end
data/lib/player.rb CHANGED
@@ -1,47 +1,47 @@
1
- class Player
2
- PLAYER_CLASSES = {
3
- "sco" => "scout",
4
- "sni" => "sniper",
5
- "sol" => "soldier",
6
- "dem" => "demoman",
7
- "med" => "medic",
8
- "pyr" => "pyro",
9
- "hwg" => "hwguy",
10
- "spy" => "spy",
11
- "eng" => "engineer"
12
- }
13
-
14
- def initialize(data)
15
- @data = data
16
- end
17
-
18
- def name
19
- @data["name"]
20
- end
21
-
22
- def to_row
23
- "#{emoji}#{name}"
24
- end
25
-
26
- def team
27
- @team ||= Team.new(@data["team"].to_sym)
28
- end
29
-
30
- def player_class
31
- PLAYER_CLASSES[short_class]
32
- end
33
-
34
- private
35
-
36
- def emoji
37
- Emoji.new(self).to_s
38
- end
39
-
40
- def short_class
41
- skin.split("_").last
42
- end
43
-
44
- def skin
45
- @data["skin"]
46
- end
47
- end
1
+ class Player
2
+ PLAYER_CLASSES = {
3
+ 'sco' => 'scout',
4
+ 'sni' => 'sniper',
5
+ 'sol' => 'soldier',
6
+ 'dem' => 'demoman',
7
+ 'med' => 'medic',
8
+ 'pyr' => 'pyro',
9
+ 'hwg' => 'hwguy',
10
+ 'spy' => 'spy',
11
+ 'eng' => 'engineer'
12
+ }.freeze
13
+
14
+ def initialize(data)
15
+ @data = data
16
+ end
17
+
18
+ def name
19
+ @data['name']
20
+ end
21
+
22
+ def to_row
23
+ "#{emoji}#{name}"
24
+ end
25
+
26
+ def team
27
+ @team ||= Team.new(@data['team'].to_sym)
28
+ end
29
+
30
+ def player_class
31
+ PLAYER_CLASSES[short_class]
32
+ end
33
+
34
+ private
35
+
36
+ def emoji
37
+ Emoji.new(self).to_s
38
+ end
39
+
40
+ def short_class
41
+ skin.split('_').last
42
+ end
43
+
44
+ def skin
45
+ @data['skin']
46
+ end
47
+ end
data/lib/qstat_request.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class QstatRequest
2
- def initialize(hostname)
3
- @result = JSON.parse(%x[qstat -json -P -qws #{hostname}]).first
2
+ def initialize(endpoint)
3
+ @result = JSON.parse(%x[qstat -json -P -qws #{endpoint}]).first
4
4
  end
5
5
 
6
6
  def output
@@ -1,3 +1,3 @@
1
1
  class QwtfDiscordBot
2
- VERSION = "0.3.3"
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -1,32 +1,44 @@
1
- require "qwtf_discord_bot/version"
2
- require "discordrb"
1
+ require 'qwtf_discord_bot/version'
2
+ require 'discordrb'
3
3
 
4
- require "qstat_request"
5
- require "player"
6
- require "team"
7
- require "emoji"
4
+ require 'qstat_request'
5
+ require 'player'
6
+ require 'team'
7
+ require 'emoji'
8
8
 
9
9
  class QwtfDiscordBot
10
- TOKEN = ENV["QWTF_DISCORD_BOT_TOKEN"].strip
11
- CLIENT_ID = ENV["QWTF_DISCORD_BOT_CLIENT_ID"].strip
12
- CHANNEL_ID = ENV["QWTF_DISCORD_BOT_CHANNEL_ID"].strip
13
- HOSTNAME = "fortressone.ga"
10
+ TOKEN = ENV['QWTF_DISCORD_BOT_TOKEN'].strip
11
+ CLIENT_ID = ENV['QWTF_DISCORD_BOT_CLIENT_ID'].strip
12
+ CHANNEL_ID = ENV['QWTF_DISCORD_BOT_CHANNEL_ID'].strip
14
13
 
15
14
  class Server
16
- def initialize
17
- @bot ||= Discordrb::Commands::CommandBot.new(
15
+ def initialize(hostname:, port:)
16
+ @hostname = hostname
17
+ @port = port
18
+ end
19
+
20
+ def run
21
+ bot = Discordrb::Commands::CommandBot.new(
18
22
  token: TOKEN,
19
23
  client_id: CLIENT_ID,
20
- prefix: "!"
24
+ prefix: '!'
21
25
  )
22
26
 
23
- @bot.command :server do |event|
24
- QstatRequest.new(HOSTNAME).output
27
+ bot.command :server do |_event|
28
+ QstatRequest.new(endpoint).output
25
29
  end
30
+
31
+ bot.run
26
32
  end
27
33
 
28
- def run
29
- @bot.run
34
+ private
35
+
36
+ def endpoint
37
+ @endpoint ||= if @port == 27500
38
+ @hostname
39
+ else
40
+ "#{@hostname}:#{@port}"
41
+ end
30
42
  end
31
43
  end
32
44
 
@@ -34,13 +46,15 @@ class QwtfDiscordBot
34
46
  THIRTY_SECONDS = 30
35
47
  TEN_MINUTES = 10 * 60
36
48
 
37
- def initialize
49
+ def initialize(hostname:, port:)
50
+ @hostname = hostname
51
+ @port = port
38
52
  @history = {}
39
53
  end
40
54
 
41
55
  def run
42
56
  every(THIRTY_SECONDS) do
43
- request = QstatRequest.new(HOSTNAME)
57
+ request = QstatRequest.new(endpoint)
44
58
  numplayers = request.numplayers
45
59
  maxplayers = request.maxplayers
46
60
  map = request.map
@@ -64,26 +78,34 @@ class QwtfDiscordBot
64
78
 
65
79
  private
66
80
 
67
- def report_joined(name:, map:, numplayers:, maxplayers:)
68
- Discordrb::API::Channel.create_message(
69
- "Bot #{TOKEN}",
70
- CHANNEL_ID,
71
- "**#{name}** has joined **#{HOSTNAME} | #{map} | #{numplayers}/#{maxplayers}**"
72
- )
73
- end
81
+ def endpoint
82
+ @endpoint ||= if @port == 27500
83
+ @hostname
84
+ else
85
+ "#{@hostname}:#{@port}"
86
+ end
87
+ end
74
88
 
75
- def seen_recently?(name)
76
- last_seen = @history[name]
77
- last_seen && (Time.now - last_seen < TEN_MINUTES)
78
- end
89
+ def report_joined(name:, map:, numplayers:, maxplayers:)
90
+ Discordrb::API::Channel.create_message(
91
+ "Bot #{TOKEN}",
92
+ CHANNEL_ID,
93
+ "**#{name}** has joined **#{endpoint} | #{map} | #{numplayers}/#{maxplayers}**"
94
+ )
95
+ end
79
96
 
80
- def every(n)
81
- loop do
82
- before = Time.now
83
- yield
84
- interval = n-(Time.now-before)
85
- sleep(interval) if interval > 0
86
- end
97
+ def seen_recently?(name)
98
+ last_seen = @history[name]
99
+ last_seen && (Time.now - last_seen < TEN_MINUTES)
100
+ end
101
+
102
+ def every(n_seconds)
103
+ loop do
104
+ before = Time.now
105
+ yield
106
+ interval = n_seconds - (Time.now - before)
107
+ sleep(interval) if interval > 0
87
108
  end
109
+ end
88
110
  end
89
111
  end
data/lib/team.rb CHANGED
@@ -1,13 +1,13 @@
1
- class Team
2
- attr_accessor :number
3
-
4
- TEAMS = { spec: 0, blue: 1, red: 2, yell: 3, gren: 4 }
5
-
6
- def initialize(sym)
7
- @number = TEAMS[sym] || 0
8
- end
9
-
10
- def to_s
11
- TEAMS.key(@number).to_s
12
- end
13
- end
1
+ class Team
2
+ attr_accessor :number
3
+
4
+ TEAMS = { spec: 0, blue: 1, red: 2, yell: 3, gren: 4 }.freeze
5
+
6
+ def initialize(sym)
7
+ @number = TEAMS[sym] || 0
8
+ end
9
+
10
+ def to_s
11
+ TEAMS.key(@number).to_s
12
+ end
13
+ end
@@ -1,36 +1,36 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "qwtf_discord_bot/version"
3
+ require 'qwtf_discord_bot/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "qwtf_discord_bot"
6
+ spec.name = 'qwtf_discord_bot'
7
7
  spec.version = QwtfDiscordBot::VERSION
8
- spec.authors = ["Sheldon Johnson"]
9
- spec.email = ["shayolden@hotmail.com"]
8
+ spec.authors = ['Sheldon Johnson']
9
+ spec.email = ['shayolden@hotmail.com']
10
10
 
11
- spec.description = "A Discord bot for reporting on QuakeWorld Team " \
12
- "Fortress game servers"
11
+ spec.description = 'A Discord bot for reporting on QuakeWorld Team ' \
12
+ 'Fortress game servers'
13
13
 
14
- spec.summary = "Works by wrapping the excellent CLI server query tool" \
15
- "qstat. Accepts the !server command from users and " \
16
- "also periodically checks for new players on the " \
17
- "server and reports about them."
14
+ spec.summary = 'Works by wrapping the excellent CLI server query tool' \
15
+ 'qstat. Accepts the !server command from users and ' \
16
+ 'also periodically checks for new players on the ' \
17
+ 'server and reports about them.'
18
18
 
19
- spec.homepage = "https://github.com/drzel/qwtf_discord_bot.git"
20
- spec.license = "MIT"
19
+ spec.homepage = 'https://github.com/drzel/qwtf_discord_bot.git'
20
+ spec.license = 'MIT'
21
21
 
22
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
23
  f.match(%r{^(test|spec|features)/})
24
24
  end
25
25
 
26
- spec.bindir = "exe"
26
+ spec.bindir = 'exe'
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
28
+ spec.require_paths = ['lib']
29
29
 
30
- spec.add_dependency "discordrb"
31
- spec.add_dependency "thor", '~> 0'
30
+ spec.add_dependency 'discordrb'
31
+ spec.add_dependency 'thor', '~> 0'
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.16"
34
- spec.add_development_dependency "rake", "~> 10.0"
35
- spec.add_development_dependency "rspec", "~> 3.0"
33
+ spec.add_development_dependency 'bundler', '~> 1.16'
34
+ spec.add_development_dependency 'rake', '~> 10.0'
35
+ spec.add_development_dependency 'rspec', '~> 3.0'
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwtf_discord_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: discordrb
@@ -88,6 +88,7 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
+ - ".env.example"
91
92
  - ".gitignore"
92
93
  - ".rspec"
93
94
  - ".travis.yml"
@@ -98,12 +99,29 @@ files:
98
99
  - Rakefile
99
100
  - bin/console
100
101
  - bin/setup
102
+ - emoji/blue_demoman.png
103
+ - emoji/blue_engineer.png
104
+ - emoji/blue_hwguy.png
105
+ - emoji/blue_medic.png
106
+ - emoji/blue_pyro.png
107
+ - emoji/blue_scout.png
108
+ - emoji/blue_sniper.png
109
+ - emoji/blue_soldier.png
110
+ - emoji/blue_spy.png
111
+ - emoji/red_demoman.png
112
+ - emoji/red_engineer.png
113
+ - emoji/red_hwguy.png
114
+ - emoji/red_medic.png
115
+ - emoji/red_pyro.png
116
+ - emoji/red_scout.png
117
+ - emoji/red_sniper.png
118
+ - emoji/red_soldier.png
119
+ - emoji/red_spy.png
101
120
  - exe/qwtf_discord_bot
102
121
  - lib/emoji.rb
103
122
  - lib/player.rb
104
123
  - lib/qstat_request.rb
105
124
  - lib/qwtf_discord_bot.rb
106
- - lib/qwtf_discord_bot/cli.rb
107
125
  - lib/qwtf_discord_bot/version.rb
108
126
  - lib/team.rb
109
127
  - qwtf_discord_bot.gemspec
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'qwtf_discord_bot'
4
- require "thor"
5
-
6
- class QwtfDiscordBot < Thor
7
- def self.exit_on_failure?
8
- true
9
- end
10
-
11
- desc "server", "Runs the qwtf-discord-bot server"
12
- def server
13
- QwtfDiscordBot::Server.run
14
- end
15
-
16
- desc "watcher", "Runs the qwtf-discord-bot watcher"
17
- def watcher
18
- QwtfDiscordBot::Watcher.run
19
- end
20
- end
21
-
22
- QwtfDiscordBot.start