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 +4 -4
- data/Changelog.md +6 -0
- data/discorb.gemspec +1 -1
- data/docs/application_command.md +1 -0
- data/lib/discorb/app_command.rb +5 -0
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/emoji_table.rb +3891 -3806
- data/lib/discorb/http.rb +11 -4
- data/template-replace/scripts/yard_replace.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb6441bf1c3ae4d181aa1a6048b72bc60bea0d0894e1da00c79a2648dd59c13e
|
4
|
+
data.tar.gz: 835bb57c283b00f9e4863f026f6500ddd81345d51f3b1482ac1c68e23f3debdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af485b0c8476e5e538c70d146ef2819587148a813a31d55cefe7d727e6060462b9e063ab8eb7fad8e1249d0e6d77214a65d4aa7b8843e149b38bc4c21d588b4
|
7
|
+
data.tar.gz: f50a9468ceed0d21e753867a5c42177022792a1550477272843d1a26fa5339d59b3b2c0cf1493edc84627856258aea05a8342531fc620b27c02c149e696169a2
|
data/Changelog.md
CHANGED
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 = "
|
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")
|
data/docs/application_command.md
CHANGED
@@ -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:
|
data/lib/discorb/app_command.rb
CHANGED
@@ -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
|
{
|
data/lib/discorb/common.rb
CHANGED
@@ -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.
|
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
|
|