discorb 0.12.3 → 0.12.4

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: 97e8934c0d9286dcc626010c68600a4a60526e2e63a6446a7b641a52c839f611
4
- data.tar.gz: 4da595714d4957e17f2fa2a8f2d62001a4194ef1c78b3ef72ae88337c0df92fd
3
+ metadata.gz: bb6441bf1c3ae4d181aa1a6048b72bc60bea0d0894e1da00c79a2648dd59c13e
4
+ data.tar.gz: 835bb57c283b00f9e4863f026f6500ddd81345d51f3b1482ac1c68e23f3debdd
5
5
  SHA512:
6
- metadata.gz: '09ae808debab6b7372df86f62a32c2fc2a55f64bd8ac5c85d39aee62f10e9e9cb4351cf07ae91a6a493b1874062e92aaa4dbed7da61665ca1718426615145035'
7
- data.tar.gz: b62074077a30a3577a34174c4b4183196734df8b6ef9ee4b05bb037bbe04e7c67019460b4558caf6d815a1569779cade308bb26d476daa89d06087736cd86a4f
6
+ metadata.gz: 1af485b0c8476e5e538c70d146ef2819587148a813a31d55cefe7d727e6060462b9e063ab8eb7fad8e1249d0e6d77214a65d4aa7b8843e149b38bc4c21d588b4
7
+ data.tar.gz: f50a9468ceed0d21e753867a5c42177022792a1550477272843d1a26fa5339d59b3b2c0cf1493edc84627856258aea05a8342531fc620b27c02c149e696169a2
data/Changelog.md CHANGED
@@ -4,6 +4,12 @@
4
4
 
5
5
  ## v0.12
6
6
 
7
+ ### v0.12.4
8
+
9
+ - Update: Update emoji table
10
+ - Add: Support min_value and max_value for numeric options in slash command
11
+ - Fix: Fix sending images
12
+
7
13
  ### v0.12.3
8
14
 
9
15
  - Fix: Fix NoMethodError in command interaction
data/discorb.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["sevenc-nanashi"]
9
9
  spec.email = ["sevenc-nanashi@sevenbot.jp"]
10
10
 
11
- spec.summary = "discorb is a Discord API wrapper for Ruby."
11
+ spec.summary = "A discord API wrapper written in Ruby"
12
12
  spec.homepage = "https://github.com/discorb-lib/discorb"
13
13
  spec.license = "MIT"
14
14
  spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
@@ -70,6 +70,7 @@ In `options`, hash should be like this:
70
70
  | `:default` | `Object` | Default value of the option. |
71
71
  | `:channel_types` | `Array<Class<Discorb::Channel>>` | Type of the channel option. |
72
72
  | `:autocomplete` | `Proc` | Autocomplete function. |
73
+ | `:range` | `Range` | Range of the option. Only valid for numeric options. (`:int`, `:float`) |
73
74
 
74
75
  `choices` should be unspecified if you don't want to use it.
75
76
  `choices` is hash like this:
@@ -27,6 +27,7 @@ module Discorb
27
27
  # | `:default` | `Object` | Default value of the option. |
28
28
  # | `:channel_types` | `Array<Class<Discorb::Channel>>` | Type of the channel option. |
29
29
  # | `:autocomplete` | `Proc` | Autocomplete function. |
30
+ # | `:range` | `Range` | Range of the option. Only valid for numeric options. (`:int`, `:float`) |
30
31
  #
31
32
  # @param [Array<#to_s>, false, nil] guild_ids Guild IDs to set the command to. `false` to global command, `nil` to use default.
32
33
  # @param [Proc] block Command block.
@@ -251,6 +252,10 @@ module Discorb
251
252
  ret[:channel_types] = value[:channel_types].map(&:channel_type) if value[:channel_types]
252
253
 
253
254
  ret[:autocomplete] = !!value[:autocomplete] if value[:autocomplete]
255
+ if value[:range]
256
+ ret[:min_value] = value[:range].begin
257
+ ret[:max_value] = value[:range].end
258
+ end
254
259
  ret
255
260
  end
256
261
  {
@@ -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.3"
7
+ VERSION = "0.12.4"
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