qwtf_discord_bot 5.5.15 → 5.5.16

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: b813d466ddbf8c36a783f042850df267dc0669497e109abd2216c32a39c6e41e
4
- data.tar.gz: 2fc6dcf207ed665bc51a5a54d1173512236eca9842a7998e270d6f21f6cad70d
3
+ metadata.gz: bb00493577fe32e4a2f0a73fd049bec1c195d08f710d559d3bc61f3c399f8e9a
4
+ data.tar.gz: b9fe1647ba8814b8f2d25c5dbcaacd8c52c930f891f27fdded26028dae2ee392
5
5
  SHA512:
6
- metadata.gz: b856f195e9ec4e47c660d7463192a76ba669d58216edea8b7bc93e2a9e9ded6283de6183ebdf8bc526e88c092fd9d0637d39a6286dbd83d5264ab059aba18081
7
- data.tar.gz: 15fb7c42819c3cff35a02b2971502225b8218b442277cbcf042fd20d31756638b1e073f374169c59b7e3c084311cc844a0f731efff98f89e68b6122a1009153a
6
+ metadata.gz: 03be912e0aa6aa8a46f9edad585bb4512aa1f22cf78689faabb4be646ba99bffe50cc03cddaf88e308c4fb40893d3d8107431dc2da3c7b59a809cec500d68381
7
+ data.tar.gz: 73bd5b3b894f3e422d983f1295959cb6cd12f165d47f5ce9f86481e6ff6731226fdc9b909051d0d00df67c6b586fa124bd880d72d992ca2406a00c7e91a2bc40
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.15
1
+ 5.5.16
@@ -8,7 +8,7 @@ class QwtfDiscordBotPug # :nodoc:
8
8
 
9
9
  MSG_SNIPPET_DELIMITER = ' · '
10
10
  TEAM_NAMES = { 1 => "Blue", 2 => "Red" }
11
- ONE_MINUTE = 60
11
+ TEN_MINUTES = 10 * 60
12
12
 
13
13
  def run
14
14
  bot = Discordrb::Commands::CommandBot.new(
@@ -390,11 +390,9 @@ class QwtfDiscordBotPug # :nodoc:
390
390
  )
391
391
  end
392
392
 
393
- if pug.last_result_time && pug.last_result_time > one_minute_ago
394
- time_ago = Time.now.to_i - pug.last_result_time
395
-
393
+ if pug.last_result_time && pug.last_result_time > ten_minutes_ago
396
394
  return send_embedded_message(
397
- description: "Please wait #{ONE_MINUTE - time_ago} more seconds before reporting",
395
+ description: "A match was reported less than 10 minutes ago",
398
396
  channel: event.channel
399
397
  )
400
398
  end
@@ -431,8 +429,6 @@ class QwtfDiscordBotPug # :nodoc:
431
429
  }.to_json
432
430
  ).body
433
431
 
434
- pug.unteam_all_players
435
-
436
432
  send_embedded_message(
437
433
  description: "#{TEAM_NAMES[winning_team_no]} wins game ##{id}. `!choose` again. [Ratings](http://ratings.fortressone.org)",
438
434
  channel: e.channel
@@ -470,11 +466,11 @@ class QwtfDiscordBotPug # :nodoc:
470
466
  )
471
467
  end
472
468
 
473
- if pug.last_result_time && pug.last_result_time > one_minute_ago
469
+ if pug.last_result_time && pug.last_result_time > ten_minutes_ago
474
470
  time_ago = Time.now.to_i - pug.last_result_time
475
471
 
476
472
  return send_embedded_message(
477
- description: "Please wait #{ONE_MINUTE - time_ago} more seconds before reporting",
473
+ description: "A match was reported less than 10 minutes ago",
478
474
  channel: event.channel
479
475
  )
480
476
  end
@@ -501,8 +497,6 @@ class QwtfDiscordBotPug # :nodoc:
501
497
  }.to_json
502
498
  ).body
503
499
 
504
- pug.unteam_all_players
505
-
506
500
  send_embedded_message(
507
501
  description: "Match ##{id} drawn. `!choose` again. [Ratings](http://ratings.fortressone.org)",
508
502
  channel: e.channel
@@ -850,7 +844,7 @@ class QwtfDiscordBotPug # :nodoc:
850
844
  JSON.parse(res.body).map(&:to_h)
851
845
  end
852
846
 
853
- def one_minute_ago
854
- Time.now.to_i - ONE_MINUTE
847
+ def ten_minutes_ago
848
+ Time.now.to_i - TEN_MINUTES
855
849
  end
856
850
  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: 5.5.15
4
+ version: 5.5.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-06 00:00:00.000000000 Z
11
+ date: 2020-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: discordrb