discordrb 2.1.0 → 2.1.1
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 +9 -0
- data/README.md +9 -1
- data/lib/discordrb/commands/command_bot.rb +7 -2
- data/lib/discordrb/data.rb +2 -2
- data/lib/discordrb/version.rb +1 -1
- 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: c44d3aabc75cea8c55af00a64f2d8f095d1b0435
|
4
|
+
data.tar.gz: d0769329fa9175353b605ba4993d1be07a0c9927
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ccf838cda0542222deb998e4bc335fccabd479b15d34c7b7df51e437b142f04f05bda5c7b0d0f41c6f30503cbaeea80d90b8751187e8dfe72ed6e4a4f093c93
|
7
|
+
data.tar.gz: cb2cb4640fa336a79a17f22b90c913d8f88edcda6dad403e66530257f7a16756cac99461b7c1508ed21252555333274be8161546dd1667061af214681ecae295
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.1.1
|
4
|
+
|
5
|
+
*Bugfix-only release.*
|
6
|
+
|
7
|
+
### Bugfixes
|
8
|
+
|
9
|
+
- Fixed a caching error that occurred when deleting roles ([#113](https://github.com/meew0/discordrb/issues/113))
|
10
|
+
- Commands should no longer be triggered with nil authors ([#114](https://github.com/meew0/discordrb/issues/114))
|
11
|
+
|
3
12
|
## 2.1.0
|
4
13
|
|
5
14
|
- API support for the April 29 Discord update, which was the first feature update in a while with more than a few additions to the API, was added. This includes: ([#111](https://github.com/meew0/discordrb/pull/111))
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ See also: [Documentation](http://www.rubydoc.info/gems/discordrb), [Tutorials](h
|
|
21
21
|
## Dependencies
|
22
22
|
|
23
23
|
* Ruby 2.1+
|
24
|
-
* An installed build system for native extensions (on Windows, try the [DevKit](http://rubyinstaller.org/downloads/); installation instructions [here](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#quick-start))
|
24
|
+
* An installed build system for native extensions (on Windows, try the [DevKit](http://rubyinstaller.org/downloads/); installation instructions [here](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#quick-start) - you only need to do the quick start)
|
25
25
|
|
26
26
|
### Voice dependencies
|
27
27
|
|
@@ -65,6 +65,14 @@ Then reinstall discordrb:
|
|
65
65
|
gem uninstall discordrb
|
66
66
|
gem install discordrb
|
67
67
|
|
68
|
+
**If Ruby complains about `ffi_c` not being able to be found:**
|
69
|
+
|
70
|
+
For example
|
71
|
+
|
72
|
+
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ffi_c (LoadError)
|
73
|
+
|
74
|
+
Your ffi setup is screwed up, run `gem install ffi --platform=ruby` to fix it. If it says something about build tools, follow the steps in the first troubleshooting section.
|
75
|
+
|
68
76
|
**If you're having trouble getting voice playback to work**:
|
69
77
|
|
70
78
|
Look here: https://github.com/meew0/discordrb/wiki/Voice-sending#troubleshooting
|
@@ -161,14 +161,14 @@ module Discordrb::Commands
|
|
161
161
|
event.respond @attributes[:command_doesnt_exist_message].gsub('%command%', name.to_s) if @attributes[:command_doesnt_exist_message]
|
162
162
|
return
|
163
163
|
end
|
164
|
-
if permission?(event.
|
164
|
+
if permission?(event.author, command.attributes[:permission_level], event.server) &&
|
165
165
|
required_permissions?(event.author, command.attributes[:required_permissions], event.channel)
|
166
166
|
event.command = command
|
167
167
|
result = command.call(event, arguments, chained)
|
168
168
|
stringify(result)
|
169
169
|
else
|
170
170
|
event.respond command.attributes[:permission_message].gsub('%name%', name.to_s) if command.attributes[:permission_message]
|
171
|
-
|
171
|
+
nil
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
@@ -215,6 +215,11 @@ module Discordrb::Commands
|
|
215
215
|
message = Discordrb::Message.new(data, self)
|
216
216
|
return if message.from_bot? && !@should_parse_self
|
217
217
|
|
218
|
+
unless message.author
|
219
|
+
Discordrb::LOGGER.warn("Received a message (#{message.inspect}) with nil author! Ignoring, please report this if you can")
|
220
|
+
return
|
221
|
+
end
|
222
|
+
|
218
223
|
event = CommandEvent.new(message, self)
|
219
224
|
|
220
225
|
chain = trigger?(message.content)
|
data/lib/discordrb/data.rb
CHANGED
@@ -406,8 +406,8 @@ module Discordrb
|
|
406
406
|
# @note For internal use only.
|
407
407
|
# @!visibility private
|
408
408
|
def update_roles(roles)
|
409
|
-
@roles = roles.map do |
|
410
|
-
@server.role(
|
409
|
+
@roles = roles.map do |role|
|
410
|
+
role.is_a?(Role) ? role : @server.role(role.to_i)
|
411
411
|
end
|
412
412
|
end
|
413
413
|
|
data/lib/discordrb/version.rb
CHANGED
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.1
|
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-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|