discorb 0.12.2 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 315ee0cc7e7f3415979c83b2520c55d28ce302e9df53b039841c04731ff4da0b
4
- data.tar.gz: a77e159f9f41d03378424cc83cfa0908feb74edd6bbc0af9ee71edc68bd17da2
3
+ metadata.gz: 97e8934c0d9286dcc626010c68600a4a60526e2e63a6446a7b641a52c839f611
4
+ data.tar.gz: 4da595714d4957e17f2fa2a8f2d62001a4194ef1c78b3ef72ae88337c0df92fd
5
5
  SHA512:
6
- metadata.gz: 3a4d325d86c0b451a063712dade9f0facfe9db7f40f8629bb07ef3716483bfcd6357d1d392eb0367e5752befb3b09244bb78133d302ea8ed2d593d457a360727
7
- data.tar.gz: 4b6f6ad5620f4602eddfc0f9d90fd85901311d26e28550d7c16d289885e4718f31d901651641ecabf117f0cb79a822b1ac0f990288774531afd3e24e620e86fe
6
+ metadata.gz: '09ae808debab6b7372df86f62a32c2fc2a55f64bd8ac5c85d39aee62f10e9e9cb4351cf07ae91a6a493b1874062e92aaa4dbed7da61665ca1718426615145035'
7
+ data.tar.gz: b62074077a30a3577a34174c4b4183196734df8b6ef9ee4b05bb037bbe04e7c67019460b4558caf6d815a1569779cade308bb26d476daa89d06087736cd86a4f
data/Changelog.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  ## v0.12
6
6
 
7
+ ### v0.12.3
8
+
9
+ - Fix: Fix NoMethodError in command interaction
10
+ - Fix: Fix NoMethodError in Integration#initialize
11
+
7
12
  ### v0.12.2
8
13
 
9
14
  - Fix: Fix `Message#type`
@@ -4,7 +4,7 @@ module Discorb
4
4
  # @return [String] The API base URL.
5
5
  API_BASE_URL = "https://discord.com/api/v9"
6
6
  # @return [String] The version of discorb.
7
- VERSION = "0.12.2"
7
+ VERSION = "0.12.3"
8
8
  # @return [String] The user agent for the bot.
9
9
  USER_AGENT = "DiscordBot (https://discorb-lib.github.io #{VERSION}) Ruby/#{RUBY_VERSION}"
10
10
 
@@ -84,7 +84,7 @@ module Discorb
84
84
  @account = Account.new(data[:account])
85
85
  @subscriber_count = data[:subscriber_count]
86
86
  @revoked = data[:revoked]
87
- @application = Application.new(@client, data[:application])
87
+ @application = data[:application] and Application.new(@client, data[:application])
88
88
  end
89
89
 
90
90
  class << self
@@ -18,7 +18,7 @@ module Discorb
18
18
  end
19
19
 
20
20
  option_map = command.options.map { |k, v| [k.to_s, v[:default]] }.to_h
21
- Discorb::CommandInteraction::SlashCommand.modify_option_map(option_map, options)
21
+ Discorb::CommandInteraction::SlashCommand.modify_option_map(option_map, options, guild)
22
22
  focused_index = options.find_index { |o| o[:focused] }
23
23
  val = command.options.values[focused_index][:autocomplete]&.call(self, *command.options.map { |k, v| option_map[k.to_s] })
24
24
  send_complete_result(val)
@@ -26,7 +26,7 @@ module Discorb
26
26
  end
27
27
 
28
28
  option_map = command.options.map { |k, v| [k.to_s, v[:default]] }.to_h
29
- SlashCommand.modify_option_map(option_map, options)
29
+ SlashCommand.modify_option_map(option_map, options, guild)
30
30
 
31
31
  command.block.call(self, *command.options.map { |k, v| option_map[k.to_s] })
32
32
  end
@@ -59,7 +59,7 @@ module Discorb
59
59
  end
60
60
 
61
61
  # @private
62
- def modify_option_map(option_map, options)
62
+ def modify_option_map(option_map, options, guild)
63
63
  options ||= []
64
64
  options.each_with_index do |option|
65
65
  val = case option[:type]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discorb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sevenc-nanashi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-24 00:00:00.000000000 Z
11
+ date: 2021-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async