discordrb 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of discordrb might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2c02619526d20cdc2271007727d9d6dde54d99e
4
- data.tar.gz: 8ef9e1bb4e10d628c8700e77954d52b56e35dd13
3
+ metadata.gz: 3c9854234e0127b9b2bd32b57c4e342e24911dc2
4
+ data.tar.gz: 965f0876a53079a4a088f42e7a585262d8aef148
5
5
  SHA512:
6
- metadata.gz: e5379d34964d6c0b613cab7f7ea3867bf1ea34cd060aba580bdd457eb3a25fd143ef3825a8b5e4c2b81a98c8d431da50de552cf5631d04b5c489023232787964
7
- data.tar.gz: 84398d02eb4482b53cb1727caf418e548b9c9a1769352eb28a71671958a2a5b6f7c810d4c0ec3ee51acf7dec200eca3db0cb57913921dcfadb19150d828bd8a3
6
+ metadata.gz: de1878554378580ab9de645ca98f999b3860c92e29930d46728cea22903b192202b72ace7090a632206cf0b4838d0c764fcbeb611a138d7b3ff6131e9ece54c7
7
+ data.tar.gz: e974aed5669570e2ea03cbd85748b96d3b024eb66395d8005747311fd312e85a71906f17fd6936cefc208d1a1889e542936441a0d41b6ca69e093bcf022ae921
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.3
4
+
5
+ *Bugfix-only release.*
6
+
7
+ ### Bugfixes
8
+
9
+ - Various messages that were just printed to stdout that should have been using the `Logger` system now do ([#132](https://github.com/meew0/discordrb/issues/132) and [#133](https://github.com/meew0/discordrb/pull/133), thanks @PoVa)
10
+ - A mistake in the documentation was fixed ([#140](https://github.com/meew0/discordrb/issues/140))
11
+ - Handling of the `GUILD_MEMBER_DELETE` gateway event should now work even if, for whatever reason, Discord sends an invalid server ID ([#129](https://github.com/meew0/discordrb/issues/129))
12
+ - If the processing of a particular voice packet takes too long, the user will now be warned instead of an error being raised ([#134](https://github.com/meew0/discordrb/issues/134))
13
+
3
14
  ## 2.1.2
4
15
 
5
16
  - A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
@@ -752,6 +752,8 @@ module Discordrb
752
752
 
753
753
  user_id = data['user']['id'].to_i
754
754
  server.delete_member(user_id)
755
+ rescue Discordrb::Errors::NoPermission
756
+ Discordrb::LOGGER.warn("delete_guild_member attempted to access a server for which the bot doesn't have permission! Not sure what happened here, ignoring")
755
757
  end
756
758
 
757
759
  # Internal handler for GUILD_CREATE
@@ -12,7 +12,7 @@ module Discordrb::Events
12
12
  # @return [User] the user whose status got updated.
13
13
  attr_reader :user
14
14
 
15
- # @return [String] the new status.
15
+ # @return [Symbol] the new status.
16
16
  attr_reader :status
17
17
 
18
18
  def initialize(data, bot)
@@ -3,5 +3,5 @@
3
3
  # Discordrb and all its functionality, in this case only the version.
4
4
  module Discordrb
5
5
  # The current version of discordrb.
6
- VERSION = '2.1.2'.freeze
6
+ VERSION = '2.1.3'.freeze
7
7
  end
@@ -303,8 +303,8 @@ module Discordrb::Voice
303
303
  host,
304
304
  method(:websocket_open),
305
305
  method(:websocket_message),
306
- proc { |e| puts "VWS error: #{e}" },
307
- proc { |e| puts "VWS close: #{e}" }
306
+ proc { |e| Discordrb::Logger.error "VWS error: #{e}" },
307
+ proc { |e| Discordrb::Logger.warn "VWS close: #{e}" }
308
308
  )
309
309
 
310
310
  @bot.debug('VWS connected')
@@ -197,7 +197,7 @@ module Discordrb::Voice
197
197
 
198
198
  # If the stream is a process, kill it
199
199
  if encoded_io.respond_to? :pid
200
- Discordrb::LOGGER.info("Killing ffmpeg process with pid #{encoded_io.pid.inspect}")
200
+ Discordrb::LOGGER.debug("Killing ffmpeg process with pid #{encoded_io.pid.inspect}")
201
201
 
202
202
  begin
203
203
  Process.kill('TERM', encoded_io.pid)
@@ -340,8 +340,12 @@ module Discordrb::Voice
340
340
  # If paused, wait
341
341
  sleep 0.1 while @paused
342
342
 
343
- # Wait `length` ms, then send the next packet
344
- sleep @length / 1000.0
343
+ if @length > 0
344
+ # Wait `length` ms, then send the next packet
345
+ sleep @length / 1000.0
346
+ else
347
+ Discordrb::Logger.warn('Audio encoding and sending together took longer than Discord expects one packet to be (20 ms)! This may be indicative of network problems.')
348
+ end
345
349
  end
346
350
 
347
351
  @bot.debug('Sending five silent frames to clear out buffers')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discordrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - meew0
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-29 00:00:00.000000000 Z
11
+ date: 2016-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client