discordrb 3.3.0 → 3.4.0

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.

Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +126 -0
  3. data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
  6. data/.github/pull_request_template.md +37 -0
  7. data/.rubocop.yml +34 -37
  8. data/.travis.yml +5 -6
  9. data/CHANGELOG.md +472 -347
  10. data/Gemfile +2 -0
  11. data/LICENSE.txt +1 -1
  12. data/README.md +61 -79
  13. data/Rakefile +2 -0
  14. data/bin/console +1 -0
  15. data/discordrb-webhooks.gemspec +6 -6
  16. data/discordrb.gemspec +17 -17
  17. data/lib/discordrb.rb +73 -0
  18. data/lib/discordrb/allowed_mentions.rb +36 -0
  19. data/lib/discordrb/api.rb +40 -15
  20. data/lib/discordrb/api/channel.rb +57 -39
  21. data/lib/discordrb/api/invite.rb +3 -3
  22. data/lib/discordrb/api/server.rb +55 -50
  23. data/lib/discordrb/api/user.rb +8 -8
  24. data/lib/discordrb/api/webhook.rb +6 -6
  25. data/lib/discordrb/await.rb +0 -1
  26. data/lib/discordrb/bot.rb +164 -72
  27. data/lib/discordrb/cache.rb +4 -2
  28. data/lib/discordrb/colour_rgb.rb +43 -0
  29. data/lib/discordrb/commands/command_bot.rb +22 -6
  30. data/lib/discordrb/commands/container.rb +20 -23
  31. data/lib/discordrb/commands/parser.rb +18 -18
  32. data/lib/discordrb/commands/rate_limiter.rb +3 -2
  33. data/lib/discordrb/container.rb +77 -17
  34. data/lib/discordrb/data.rb +25 -4180
  35. data/lib/discordrb/data/activity.rb +264 -0
  36. data/lib/discordrb/data/application.rb +50 -0
  37. data/lib/discordrb/data/attachment.rb +56 -0
  38. data/lib/discordrb/data/audit_logs.rb +345 -0
  39. data/lib/discordrb/data/channel.rb +849 -0
  40. data/lib/discordrb/data/embed.rb +251 -0
  41. data/lib/discordrb/data/emoji.rb +82 -0
  42. data/lib/discordrb/data/integration.rb +83 -0
  43. data/lib/discordrb/data/invite.rb +137 -0
  44. data/lib/discordrb/data/member.rb +297 -0
  45. data/lib/discordrb/data/message.rb +334 -0
  46. data/lib/discordrb/data/overwrite.rb +102 -0
  47. data/lib/discordrb/data/profile.rb +91 -0
  48. data/lib/discordrb/data/reaction.rb +33 -0
  49. data/lib/discordrb/data/recipient.rb +34 -0
  50. data/lib/discordrb/data/role.rb +191 -0
  51. data/lib/discordrb/data/server.rb +1002 -0
  52. data/lib/discordrb/data/user.rb +204 -0
  53. data/lib/discordrb/data/voice_region.rb +45 -0
  54. data/lib/discordrb/data/voice_state.rb +41 -0
  55. data/lib/discordrb/data/webhook.rb +145 -0
  56. data/lib/discordrb/errors.rb +2 -1
  57. data/lib/discordrb/events/bans.rb +7 -5
  58. data/lib/discordrb/events/channels.rb +2 -0
  59. data/lib/discordrb/events/guilds.rb +16 -9
  60. data/lib/discordrb/events/invites.rb +125 -0
  61. data/lib/discordrb/events/members.rb +6 -2
  62. data/lib/discordrb/events/message.rb +69 -27
  63. data/lib/discordrb/events/presence.rb +14 -4
  64. data/lib/discordrb/events/raw.rb +1 -3
  65. data/lib/discordrb/events/reactions.rb +49 -3
  66. data/lib/discordrb/events/typing.rb +6 -4
  67. data/lib/discordrb/events/voice_server_update.rb +47 -0
  68. data/lib/discordrb/events/voice_state_update.rb +15 -10
  69. data/lib/discordrb/events/webhooks.rb +9 -6
  70. data/lib/discordrb/gateway.rb +72 -57
  71. data/lib/discordrb/id_object.rb +39 -0
  72. data/lib/discordrb/light/integrations.rb +1 -1
  73. data/lib/discordrb/light/light_bot.rb +1 -1
  74. data/lib/discordrb/logger.rb +4 -4
  75. data/lib/discordrb/paginator.rb +57 -0
  76. data/lib/discordrb/permissions.rb +103 -8
  77. data/lib/discordrb/version.rb +1 -1
  78. data/lib/discordrb/voice/encoder.rb +3 -3
  79. data/lib/discordrb/voice/network.rb +84 -43
  80. data/lib/discordrb/voice/sodium.rb +96 -0
  81. data/lib/discordrb/voice/voice_bot.rb +34 -26
  82. metadata +93 -55
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Discordrb::Voice
4
+ # @!visibility private
5
+ module Sodium
6
+ extend FFI::Library
7
+
8
+ ffi_lib(['sodium', 'libsodium.so.18', 'libsodium.so.23'])
9
+
10
+ # Encryption & decryption
11
+ attach_function(:crypto_secretbox_xsalsa20poly1305, %i[pointer pointer ulong_long pointer pointer], :int)
12
+ attach_function(:crypto_secretbox_xsalsa20poly1305_open, %i[pointer pointer ulong_long pointer pointer], :int)
13
+
14
+ # Constants
15
+ attach_function(:crypto_secretbox_xsalsa20poly1305_keybytes, [], :size_t)
16
+ attach_function(:crypto_secretbox_xsalsa20poly1305_noncebytes, [], :size_t)
17
+ attach_function(:crypto_secretbox_xsalsa20poly1305_zerobytes, [], :size_t)
18
+ attach_function(:crypto_secretbox_xsalsa20poly1305_boxzerobytes, [], :size_t)
19
+ end
20
+
21
+ # Utility class for interacting with required `xsalsa20poly1305` functions for voice transmission
22
+ # @!visibility private
23
+ class SecretBox
24
+ # Exception raised when a key or nonce with invalid length is used
25
+ class LengthError < RuntimeError
26
+ end
27
+
28
+ # Exception raised when encryption or decryption fails
29
+ class CryptoError < RuntimeError
30
+ end
31
+
32
+ # Required key length
33
+ KEY_LENGTH = Sodium.crypto_secretbox_xsalsa20poly1305_keybytes
34
+
35
+ # Required nonce length
36
+ NONCE_BYTES = Sodium.crypto_secretbox_xsalsa20poly1305_noncebytes
37
+
38
+ # Zero byte padding for encryption
39
+ ZERO_BYTES = Sodium.crypto_secretbox_xsalsa20poly1305_zerobytes
40
+
41
+ # Zero byte padding for decryption
42
+ BOX_ZERO_BYTES = Sodium.crypto_secretbox_xsalsa20poly1305_boxzerobytes
43
+
44
+ # @param key [String] Crypto key of length {KEY_LENGTH}
45
+ def initialize(key)
46
+ raise(LengthError, 'Key length') if key.bytesize != KEY_LENGTH
47
+
48
+ @key = key
49
+ end
50
+
51
+ # Encrypts a message using this box's key
52
+ # @param nonce [String] encryption nonce for this message
53
+ # @param message [String] message to be encrypted
54
+ def box(nonce, message)
55
+ raise(LengthError, 'Nonce length') if nonce.bytesize != NONCE_BYTES
56
+
57
+ message_padded = prepend_zeroes(ZERO_BYTES, message)
58
+ buffer = zero_string(message_padded.bytesize)
59
+
60
+ success = Sodium.crypto_secretbox_xsalsa20poly1305(buffer, message_padded, message_padded.bytesize, nonce, @key)
61
+ raise(CryptoError, "Encryption failed (#{success})") unless success.zero?
62
+
63
+ remove_zeroes(BOX_ZERO_BYTES, buffer)
64
+ end
65
+
66
+ # Decrypts the given ciphertext using this box's key
67
+ # @param nonce [String] encryption nonce for this ciphertext
68
+ # @param ciphertext [String] ciphertext to decrypt
69
+ def open(nonce, ciphertext)
70
+ raise(LengthError, 'Nonce length') if nonce.bytesize != NONCE_BYTES
71
+
72
+ ct_padded = prepend_zeroes(BOX_ZERO_BYTES, ciphertext)
73
+ buffer = zero_string(ct_padded.bytesize)
74
+
75
+ success = Sodium.crypto_secretbox_xsalsa20poly1305_open(buffer, ct_padded, ct_padded.bytesize, nonce, @key)
76
+ raise(CryptoError, "Decryption failed (#{success})") unless success.zero?
77
+
78
+ remove_zeroes(ZERO_BYTES, buffer)
79
+ end
80
+
81
+ private
82
+
83
+ def zero_string(size)
84
+ str = "\0" * size
85
+ str.force_encoding('ASCII-8BIT') if str.respond_to?(:force_encoding)
86
+ end
87
+
88
+ def prepend_zeroes(size, string)
89
+ zero_string(size) + string
90
+ end
91
+
92
+ def remove_zeroes(size, string)
93
+ string.slice!(size, string.bytesize - size)
94
+ end
95
+ end
96
+ end
@@ -6,7 +6,7 @@ require 'discordrb/logger'
6
6
 
7
7
  # Voice support
8
8
  module Discordrb::Voice
9
- # How long one voice packet should ideally be (20 ms as defined by Discord)
9
+ # How long one voice packet should ideally be (20ms as defined by Discord)
10
10
  IDEAL_LENGTH = 20.0
11
11
 
12
12
  # How many bytes of data to read (1920 bytes * 2 channels) from audio PCM data
@@ -22,7 +22,10 @@ module Discordrb::Voice
22
22
  # {VoiceBot#adjust_offset}, and {VoiceBot#adjust_average}.
23
23
  class VoiceBot
24
24
  # @return [Channel] the current voice channel
25
- attr_reader :channel
25
+ attr_reader :channel # rubocop:disable Style/BisectedAttrAccessor
26
+
27
+ # @!visibility private
28
+ attr_writer :channel # rubocop:disable Style/BisectedAttrAccessor
26
29
 
27
30
  # @return [Integer, nil] the amount of time the stream has been playing, or `nil` if nothing has been played yet.
28
31
  attr_reader :stream_time
@@ -36,7 +39,7 @@ module Discordrb::Voice
36
39
  # play parts back too fast. How often these measurements should be done depends a lot on the system, and if it's
37
40
  # done too quickly, especially on slow connections, the playback speed will vary wildly; if it's done too slowly
38
41
  # however, small errors will cause quality problems for a longer time.
39
- # @return [Integer] how frequently audio length adjustments should be done, in ideal packets (20 ms).
42
+ # @return [Integer] how frequently audio length adjustments should be done, in ideal packets (20ms).
40
43
  attr_accessor :adjust_interval
41
44
 
42
45
  # This particular value is also important because ffmpeg may take longer to process the first few packets. It is
@@ -44,7 +47,7 @@ module Discordrb::Voice
44
47
  # shouldn't be any higher than {#adjust_interval}, otherwise no adjustments will take place. If {#adjust_interval}
45
48
  # is at a value higher than 10, this value should not be changed at all.
46
49
  # @see #adjust_interval
47
- # @return [Integer] the packet number (1 packet = 20 ms) at which length adjustments should start.
50
+ # @return [Integer] the packet number (1 packet = 20ms) at which length adjustments should start.
48
51
  attr_accessor :adjust_offset
49
52
 
50
53
  # This value determines whether or not the adjustment length should be averaged with the previous value. This may
@@ -60,8 +63,8 @@ module Discordrb::Voice
60
63
  attr_accessor :adjust_debug
61
64
 
62
65
  # If this value is set, no length adjustments will ever be done and this value will always be used as the length
63
- # (i. e. packets will be sent every N seconds). Be careful not to set it too low as to not spam Discord's servers.
64
- # The ideal length is 20 ms (accessible by the {Discordrb::Voice::IDEAL_LENGTH} constant), this value should be
66
+ # (i.e. packets will be sent every N seconds). Be careful not to set it too low as to not spam Discord's servers.
67
+ # The ideal length is 20ms (accessible by the {Discordrb::Voice::IDEAL_LENGTH} constant), this value should be
65
68
  # slightly lower than that because encoding + sending takes time. Note that sending DCA files is significantly
66
69
  # faster than sending regular audio files (usually about four times as fast), so you might want to set this value
67
70
  # to something else if you're sending a DCA file.
@@ -74,13 +77,12 @@ module Discordrb::Voice
74
77
  attr_accessor :volume
75
78
 
76
79
  # @!visibility private
77
- def initialize(channel, bot, token, session, endpoint, encrypted)
80
+ def initialize(channel, bot, token, session, endpoint)
78
81
  @bot = bot
79
82
  @channel = channel
80
83
 
81
84
  @ws = VoiceWS.new(channel, bot, token, session, endpoint)
82
85
  @udp = @ws.udp
83
- @udp.encrypted = encrypted
84
86
 
85
87
  @sequence = @time = 0
86
88
  @skips = 0
@@ -95,14 +97,15 @@ module Discordrb::Voice
95
97
 
96
98
  @encoder = Encoder.new
97
99
  @ws.connect
98
- rescue => e
100
+ rescue StandardError => e
99
101
  Discordrb::LOGGER.log_exception(e)
100
102
  raise
101
103
  end
102
104
 
103
105
  # @return [true, false] whether audio data sent will be encrypted.
106
+ # @deprecated Discord no longer supports unencrypted voice communication.
104
107
  def encrypted?
105
- @udp.encrypted?
108
+ true
106
109
  end
107
110
 
108
111
  # Set the filter volume. This volume is applied as a filter for decoded audio data. It has the advantage that using
@@ -132,7 +135,7 @@ module Discordrb::Voice
132
135
 
133
136
  alias_method :isplaying?, :playing?
134
137
 
135
- # Continue playback. This change may take up to 100 ms to take effect, which is usually negligible.
138
+ # Continue playback. This change may take up to 100ms to take effect, which is usually negligible.
136
139
  def continue
137
140
  @paused = false
138
141
  end
@@ -145,7 +148,8 @@ module Discordrb::Voice
145
148
  end
146
149
 
147
150
  # Sets whether or not the bot is speaking (green circle around user).
148
- # @param value [true, false] whether or not the bot should be speaking.
151
+ # @param value [true, false, Integer] whether or not the bot should be speaking, or a bitmask denoting the audio type
152
+ # @note https://discordapp.com/developers/docs/topics/voice-connections#speaking for information on the speaking bitmask
149
153
  def speaking=(value)
150
154
  @playing = value
151
155
  @ws.send_speaking(value)
@@ -161,6 +165,7 @@ module Discordrb::Voice
161
165
  sleep IDEAL_LENGTH / 1000.0 if @was_playing_before
162
166
 
163
167
  return unless wait_for_confirmation
168
+
164
169
  @has_stopped_playing = false
165
170
  sleep IDEAL_LENGTH / 1000.0 until @has_stopped_playing
166
171
  @has_stopped_playing = false
@@ -173,7 +178,7 @@ module Discordrb::Voice
173
178
  @ws.destroy
174
179
  end
175
180
 
176
- # Plays a stream of raw data to the channel. All playback methods are blocking, i. e. they wait for the playback to
181
+ # Plays a stream of raw data to the channel. All playback methods are blocking, i.e. they wait for the playback to
177
182
  # finish before exiting the method. This doesn't cause a problem if you just use discordrb events/commands to
178
183
  # play stuff, as these are fully threaded, but if you don't want this behaviour anyway, be sure to call these
179
184
  # methods in separate threads.
@@ -206,7 +211,7 @@ module Discordrb::Voice
206
211
  end
207
212
 
208
213
  # Adjust volume
209
- buf = @encoder.adjust_volume(buf, @volume) if @volume != 1.0
214
+ buf = @encoder.adjust_volume(buf, @volume) if @volume != 1.0 # rubocop:disable Lint/FloatComparison
210
215
 
211
216
  @first_packet = false
212
217
 
@@ -215,12 +220,15 @@ module Discordrb::Voice
215
220
  end
216
221
 
217
222
  # If the stream is a process, kill it
218
- if encoded_io.respond_to? :pid
223
+ if encoded_io&.pid
219
224
  Discordrb::LOGGER.debug("Killing ffmpeg process with pid #{encoded_io.pid.inspect}")
220
225
 
221
226
  begin
222
- Process.kill('TERM', encoded_io.pid)
223
- rescue => e
227
+ pid = encoded_io.pid
228
+ # Windows does not support TERM as a kill signal, so we use KILL. `Process.waitpid` verifies that our
229
+ # child process has not already completed.
230
+ Process.kill(Gem.win_platform? ? 'KILL' : 'TERM', pid) if Process.waitpid(pid, Process::WNOHANG).nil?
231
+ rescue StandardError => e
224
232
  Discordrb::LOGGER.warn('Failed to kill ffmpeg process! You *might* have a process leak now.')
225
233
  Discordrb::LOGGER.warn("Reason: #{e}")
226
234
  end
@@ -255,13 +263,13 @@ module Discordrb::Voice
255
263
  stop_playing(true) if @playing
256
264
 
257
265
  @bot.debug "Reading DCA file #{file}"
258
- input_stream = open(file)
266
+ input_stream = File.open(file)
259
267
 
260
268
  magic = input_stream.read(4)
261
269
  raise ArgumentError, 'Not a DCA1 file! The file might have been corrupted, please recreate it.' unless magic == 'DCA1'
262
270
 
263
271
  # Read the metadata header, then read the metadata and discard it as we don't care about it
264
- metadata_header = input_stream.read(4).unpack('l<')[0]
272
+ metadata_header = input_stream.read(4).unpack1('l<')
265
273
  input_stream.read(metadata_header)
266
274
 
267
275
  # Play the data, without re-encoding it to opus
@@ -275,9 +283,9 @@ module Discordrb::Voice
275
283
  next :stop
276
284
  end
277
285
 
278
- header = header_str.unpack('s<')[0]
286
+ header = header_str.unpack1('s<')
279
287
 
280
- raise 'Negative header in DCA file! Your file is likely corrupted.' if header < 0
288
+ raise 'Negative header in DCA file! Your file is likely corrupted.' if header.negative?
281
289
  rescue EOFError
282
290
  @bot.debug 'Finished DCA parsing (EOFError)'
283
291
  next :stop
@@ -292,7 +300,7 @@ module Discordrb::Voice
292
300
 
293
301
  private
294
302
 
295
- # Plays the data from the @io stream as Discord requires it
303
+ # Plays the data from the IO stream as Discord requires it
296
304
  def play_internal
297
305
  count = 0
298
306
  @playing = true
@@ -311,7 +319,7 @@ module Discordrb::Voice
311
319
  break unless @playing
312
320
 
313
321
  # If we should skip, get some data, discard it and go to the next iteration
314
- if @skips > 0
322
+ if @skips.positive?
315
323
  @skips -= 1
316
324
  yield
317
325
  next
@@ -364,7 +372,7 @@ module Discordrb::Voice
364
372
  # If paused, wait
365
373
  sleep 0.1 while @paused
366
374
 
367
- if @length > 0
375
+ if @length.positive?
368
376
  # Wait `length` ms, then send the next packet
369
377
  sleep @length / 1000.0
370
378
  else
@@ -378,13 +386,13 @@ module Discordrb::Voice
378
386
  increment_packet_headers
379
387
  @udp.send_audio(Encoder::OPUS_SILENCE, @sequence, @time)
380
388
 
381
- # Length adjustments don't matter here, we can just wait 20 ms since nobody is going to hear it anyway
389
+ # Length adjustments don't matter here, we can just wait 20ms since nobody is going to hear it anyway
382
390
  sleep IDEAL_LENGTH / 1000.0
383
391
  end
384
392
 
385
393
  @bot.debug('Performing final cleanup after stream ended')
386
394
 
387
- # Final cleanup
395
+ # Final clean-up
388
396
  stop_playing
389
397
 
390
398
  # Notify any stop_playing methods running right now that we have actually stopped
metadata CHANGED
@@ -1,29 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discordrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - meew0
8
+ - swarley
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2018-10-28 00:00:00.000000000 Z
12
+ date: 2020-12-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: rest-client
15
+ name: ffi
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 2.1.0.rc1
20
+ version: 1.9.24
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 2.1.0.rc1
27
+ version: 1.9.24
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: opus-ruby
29
30
  requirement: !ruby/object:Gem::Requirement
@@ -39,47 +40,33 @@ dependencies:
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
42
  - !ruby/object:Gem::Dependency
42
- name: websocket-client-simple
43
+ name: rest-client
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
46
  - - ">="
46
47
  - !ruby/object:Gem::Version
47
- version: 0.3.0
48
+ version: 2.0.0
48
49
  type: :runtime
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
53
  - - ">="
53
54
  - !ruby/object:Gem::Version
54
- version: 0.3.0
55
+ version: 2.0.0
55
56
  - !ruby/object:Gem::Dependency
56
- name: rbnacl
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 3.4.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 3.4.0
69
- - !ruby/object:Gem::Dependency
70
- name: ffi
57
+ name: websocket-client-simple
71
58
  requirement: !ruby/object:Gem::Requirement
72
59
  requirements:
73
60
  - - ">="
74
61
  - !ruby/object:Gem::Version
75
- version: 1.9.24
62
+ version: 0.3.0
76
63
  type: :runtime
77
64
  prerelease: false
78
65
  version_requirements: !ruby/object:Gem::Requirement
79
66
  requirements:
80
67
  - - ">="
81
68
  - !ruby/object:Gem::Version
82
- version: 1.9.24
69
+ version: 0.3.0
83
70
  - !ruby/object:Gem::Dependency
84
71
  name: discordrb-webhooks
85
72
  requirement: !ruby/object:Gem::Requirement
@@ -98,122 +85,147 @@ dependencies:
98
85
  name: bundler
99
86
  requirement: !ruby/object:Gem::Requirement
100
87
  requirements:
101
- - - "~>"
88
+ - - ">="
102
89
  - !ruby/object:Gem::Version
103
90
  version: '1.10'
91
+ - - "<"
92
+ - !ruby/object:Gem::Version
93
+ version: '3'
104
94
  type: :development
105
95
  prerelease: false
106
96
  version_requirements: !ruby/object:Gem::Requirement
107
97
  requirements:
108
- - - "~>"
98
+ - - ">="
109
99
  - !ruby/object:Gem::Version
110
100
  version: '1.10'
101
+ - - "<"
102
+ - !ruby/object:Gem::Version
103
+ version: '3'
111
104
  - !ruby/object:Gem::Dependency
112
105
  name: rake
113
106
  requirement: !ruby/object:Gem::Requirement
114
107
  requirements:
115
108
  - - "~>"
116
109
  - !ruby/object:Gem::Version
117
- version: '10.0'
110
+ version: '13.0'
118
111
  type: :development
119
112
  prerelease: false
120
113
  version_requirements: !ruby/object:Gem::Requirement
121
114
  requirements:
122
115
  - - "~>"
123
116
  - !ruby/object:Gem::Version
124
- version: '10.0'
117
+ version: '13.0'
125
118
  - !ruby/object:Gem::Dependency
126
- name: yard
119
+ name: redcarpet
127
120
  requirement: !ruby/object:Gem::Requirement
128
121
  requirements:
129
122
  - - "~>"
130
123
  - !ruby/object:Gem::Version
131
- version: 0.9.9
124
+ version: 3.5.0
132
125
  type: :development
133
126
  prerelease: false
134
127
  version_requirements: !ruby/object:Gem::Requirement
135
128
  requirements:
136
129
  - - "~>"
137
130
  - !ruby/object:Gem::Version
138
- version: 0.9.9
131
+ version: 3.5.0
139
132
  - !ruby/object:Gem::Dependency
140
- name: redcarpet
133
+ name: rspec
141
134
  requirement: !ruby/object:Gem::Requirement
142
135
  requirements:
143
136
  - - "~>"
144
137
  - !ruby/object:Gem::Version
145
- version: 3.4.0
138
+ version: 3.10.0
146
139
  type: :development
147
140
  prerelease: false
148
141
  version_requirements: !ruby/object:Gem::Requirement
149
142
  requirements:
150
143
  - - "~>"
151
144
  - !ruby/object:Gem::Version
152
- version: 3.4.0
145
+ version: 3.10.0
153
146
  - !ruby/object:Gem::Dependency
154
- name: rspec
147
+ name: rspec-prof
155
148
  requirement: !ruby/object:Gem::Requirement
156
149
  requirements:
157
150
  - - "~>"
158
151
  - !ruby/object:Gem::Version
159
- version: 3.4.0
152
+ version: 0.0.7
160
153
  type: :development
161
154
  prerelease: false
162
155
  version_requirements: !ruby/object:Gem::Requirement
163
156
  requirements:
164
157
  - - "~>"
165
158
  - !ruby/object:Gem::Version
166
- version: 3.4.0
159
+ version: 0.0.7
167
160
  - !ruby/object:Gem::Dependency
168
- name: rspec-prof
161
+ name: rubocop
169
162
  requirement: !ruby/object:Gem::Requirement
170
163
  requirements:
171
164
  - - "~>"
172
165
  - !ruby/object:Gem::Version
173
- version: 0.0.7
166
+ version: 1.4.0
174
167
  type: :development
175
168
  prerelease: false
176
169
  version_requirements: !ruby/object:Gem::Requirement
177
170
  requirements:
178
171
  - - "~>"
179
172
  - !ruby/object:Gem::Version
180
- version: 0.0.7
173
+ version: 1.4.0
181
174
  - !ruby/object:Gem::Dependency
182
- name: rubocop
175
+ name: rubocop-performance
183
176
  requirement: !ruby/object:Gem::Requirement
184
177
  requirements:
185
- - - '='
178
+ - - "~>"
186
179
  - !ruby/object:Gem::Version
187
- version: 0.49.1
180
+ version: '1.0'
188
181
  type: :development
189
182
  prerelease: false
190
183
  version_requirements: !ruby/object:Gem::Requirement
191
184
  requirements:
192
- - - '='
185
+ - - "~>"
193
186
  - !ruby/object:Gem::Version
194
- version: 0.49.1
187
+ version: '1.0'
195
188
  - !ruby/object:Gem::Dependency
196
189
  name: simplecov
197
190
  requirement: !ruby/object:Gem::Requirement
198
191
  requirements:
199
192
  - - "~>"
200
193
  - !ruby/object:Gem::Version
201
- version: 0.16.0
194
+ version: 0.19.0
202
195
  type: :development
203
196
  prerelease: false
204
197
  version_requirements: !ruby/object:Gem::Requirement
205
198
  requirements:
206
199
  - - "~>"
207
200
  - !ruby/object:Gem::Version
208
- version: 0.16.0
209
- description: A Ruby implementation of the Discord (https://discordapp.com) API.
201
+ version: 0.19.0
202
+ - !ruby/object:Gem::Dependency
203
+ name: yard
204
+ requirement: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: 0.9.9
209
+ type: :development
210
+ prerelease: false
211
+ version_requirements: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: 0.9.9
216
+ description: A Ruby implementation of the Discord (https://discord.com) API.
210
217
  email:
211
218
  - ''
212
219
  executables: []
213
220
  extensions: []
214
221
  extra_rdoc_files: []
215
222
  files:
223
+ - ".circleci/config.yml"
216
224
  - ".codeclimate.yml"
225
+ - ".github/CONTRIBUTING.md"
226
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
227
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
228
+ - ".github/pull_request_template.md"
217
229
  - ".gitignore"
218
230
  - ".overcommit.yml"
219
231
  - ".rspec"
@@ -221,7 +233,6 @@ files:
221
233
  - ".travis.yml"
222
234
  - ".yardopts"
223
235
  - CHANGELOG.md
224
- - CONTRIBUTING.md
225
236
  - Gemfile
226
237
  - LICENSE.txt
227
238
  - README.md
@@ -232,6 +243,7 @@ files:
232
243
  - discordrb-webhooks.gemspec
233
244
  - discordrb.gemspec
234
245
  - lib/discordrb.rb
246
+ - lib/discordrb/allowed_mentions.rb
235
247
  - lib/discordrb/api.rb
236
248
  - lib/discordrb/api/channel.rb
237
249
  - lib/discordrb/api/invite.rb
@@ -241,6 +253,7 @@ files:
241
253
  - lib/discordrb/await.rb
242
254
  - lib/discordrb/bot.rb
243
255
  - lib/discordrb/cache.rb
256
+ - lib/discordrb/colour_rgb.rb
244
257
  - lib/discordrb/commands/command_bot.rb
245
258
  - lib/discordrb/commands/container.rb
246
259
  - lib/discordrb/commands/events.rb
@@ -248,12 +261,34 @@ files:
248
261
  - lib/discordrb/commands/rate_limiter.rb
249
262
  - lib/discordrb/container.rb
250
263
  - lib/discordrb/data.rb
264
+ - lib/discordrb/data/activity.rb
265
+ - lib/discordrb/data/application.rb
266
+ - lib/discordrb/data/attachment.rb
267
+ - lib/discordrb/data/audit_logs.rb
268
+ - lib/discordrb/data/channel.rb
269
+ - lib/discordrb/data/embed.rb
270
+ - lib/discordrb/data/emoji.rb
271
+ - lib/discordrb/data/integration.rb
272
+ - lib/discordrb/data/invite.rb
273
+ - lib/discordrb/data/member.rb
274
+ - lib/discordrb/data/message.rb
275
+ - lib/discordrb/data/overwrite.rb
276
+ - lib/discordrb/data/profile.rb
277
+ - lib/discordrb/data/reaction.rb
278
+ - lib/discordrb/data/recipient.rb
279
+ - lib/discordrb/data/role.rb
280
+ - lib/discordrb/data/server.rb
281
+ - lib/discordrb/data/user.rb
282
+ - lib/discordrb/data/voice_region.rb
283
+ - lib/discordrb/data/voice_state.rb
284
+ - lib/discordrb/data/webhook.rb
251
285
  - lib/discordrb/errors.rb
252
286
  - lib/discordrb/events/await.rb
253
287
  - lib/discordrb/events/bans.rb
254
288
  - lib/discordrb/events/channels.rb
255
289
  - lib/discordrb/events/generic.rb
256
290
  - lib/discordrb/events/guilds.rb
291
+ - lib/discordrb/events/invites.rb
257
292
  - lib/discordrb/events/lifetime.rb
258
293
  - lib/discordrb/events/members.rb
259
294
  - lib/discordrb/events/message.rb
@@ -262,26 +297,30 @@ files:
262
297
  - lib/discordrb/events/reactions.rb
263
298
  - lib/discordrb/events/roles.rb
264
299
  - lib/discordrb/events/typing.rb
300
+ - lib/discordrb/events/voice_server_update.rb
265
301
  - lib/discordrb/events/voice_state_update.rb
266
302
  - lib/discordrb/events/webhooks.rb
267
303
  - lib/discordrb/gateway.rb
304
+ - lib/discordrb/id_object.rb
268
305
  - lib/discordrb/light.rb
269
306
  - lib/discordrb/light/data.rb
270
307
  - lib/discordrb/light/integrations.rb
271
308
  - lib/discordrb/light/light_bot.rb
272
309
  - lib/discordrb/logger.rb
310
+ - lib/discordrb/paginator.rb
273
311
  - lib/discordrb/permissions.rb
274
312
  - lib/discordrb/version.rb
275
313
  - lib/discordrb/voice/encoder.rb
276
314
  - lib/discordrb/voice/network.rb
315
+ - lib/discordrb/voice/sodium.rb
277
316
  - lib/discordrb/voice/voice_bot.rb
278
317
  - lib/discordrb/webhooks.rb
279
318
  - lib/discordrb/websocket.rb
280
- homepage: https://github.com/meew0/discordrb
319
+ homepage: https://github.com/shardlab/discordrb
281
320
  licenses:
282
321
  - MIT
283
322
  metadata:
284
- changelog_uri: https://github.com/meew0/discordrb/blob/master/CHANGELOG.md
323
+ changelog_uri: https://github.com/shardlab/discordrb/blob/master/CHANGELOG.md
285
324
  post_install_message:
286
325
  rdoc_options: []
287
326
  require_paths:
@@ -290,15 +329,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
329
  requirements:
291
330
  - - ">="
292
331
  - !ruby/object:Gem::Version
293
- version: 2.2.4
332
+ version: '2.5'
294
333
  required_rubygems_version: !ruby/object:Gem::Requirement
295
334
  requirements:
296
335
  - - ">="
297
336
  - !ruby/object:Gem::Version
298
337
  version: '0'
299
338
  requirements: []
300
- rubyforge_project:
301
- rubygems_version: 2.7.7
339
+ rubygems_version: 3.1.4
302
340
  signing_key:
303
341
  specification_version: 4
304
342
  summary: Discord API for Ruby