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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/discordrb/bot.rb +2 -0
- data/lib/discordrb/events/presence.rb +1 -1
- data/lib/discordrb/version.rb +1 -1
- data/lib/discordrb/voice/network.rb +2 -2
- data/lib/discordrb/voice/voice_bot.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c9854234e0127b9b2bd32b57c4e342e24911dc2
|
4
|
+
data.tar.gz: 965f0876a53079a4a088f42e7a585262d8aef148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1878554378580ab9de645ca98f999b3860c92e29930d46728cea22903b192202b72ace7090a632206cf0b4838d0c764fcbeb611a138d7b3ff6131e9ece54c7
|
7
|
+
data.tar.gz: e974aed5669570e2ea03cbd85748b96d3b024eb66395d8005747311fd312e85a71906f17fd6936cefc208d1a1889e542936441a0d41b6ca69e093bcf022ae921
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/discordrb/bot.rb
CHANGED
@@ -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
|
data/lib/discordrb/version.rb
CHANGED
@@ -303,8 +303,8 @@ module Discordrb::Voice
|
|
303
303
|
host,
|
304
304
|
method(:websocket_open),
|
305
305
|
method(:websocket_message),
|
306
|
-
proc { |e|
|
307
|
-
proc { |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.
|
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
|
-
|
344
|
-
|
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.
|
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-
|
11
|
+
date: 2016-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|