discorb 0.6.0 → 0.7.2
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/.github/ISSUE_TEMPLATE/bug_report.md +57 -0
- data/.github/ISSUE_TEMPLATE/config.yml +8 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +38 -0
- data/.gitignore +3 -3
- data/.yardopts +1 -0
- data/Changelog.md +43 -1
- data/README.md +9 -6
- data/assets/banner.svg +125 -0
- data/docs/application_command.md +19 -19
- data/docs/events.md +34 -0
- data/docs/extension.md +6 -6
- data/lib/discorb/{command.rb → app_command.rb} +29 -29
- data/lib/discorb/client.rb +25 -24
- data/lib/discorb/color.rb +59 -29
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/embed.rb +12 -12
- data/lib/discorb/error.rb +1 -1
- data/lib/discorb/event.rb +5 -5
- data/lib/discorb/extension.rb +9 -9
- data/lib/discorb/gateway.rb +23 -3
- data/lib/discorb/integration.rb +1 -1
- data/lib/discorb/intents.rb +2 -2
- data/lib/discorb/interaction.rb +80 -65
- data/lib/discorb/log.rb +16 -12
- data/lib/discorb/member.rb +13 -2
- data/lib/discorb/message.rb +3 -3
- data/lib/discorb.rb +1 -1
- data/po/yard.pot +37 -37
- data/sig/discorb.rbs +40 -40
- metadata +7 -4
- data/Gemfile.lock +0 -67
data/lib/discorb/interaction.rb
CHANGED
|
@@ -64,6 +64,7 @@ module Discorb
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
alias fired_by target
|
|
67
|
+
alias from target
|
|
67
68
|
|
|
68
69
|
def inspect
|
|
69
70
|
"#<#{self.class} id=#{@id}>"
|
|
@@ -99,6 +100,9 @@ module Discorb
|
|
|
99
100
|
#
|
|
100
101
|
# Response with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE`(`5`).
|
|
101
102
|
#
|
|
103
|
+
# @macro async
|
|
104
|
+
# @macro http
|
|
105
|
+
#
|
|
102
106
|
# @param [Boolean] ephemeral Whether to make the response ephemeral.
|
|
103
107
|
#
|
|
104
108
|
def defer_source(ephemeral: false)
|
|
@@ -116,6 +120,9 @@ module Discorb
|
|
|
116
120
|
#
|
|
117
121
|
# Response with `CHANNEL_MESSAGE_WITH_SOURCE`(`4`).
|
|
118
122
|
#
|
|
123
|
+
# @macro async
|
|
124
|
+
# @macro http
|
|
125
|
+
#
|
|
119
126
|
# @param [String] content The content of the response.
|
|
120
127
|
# @param [Boolean] tts Whether to send the message as text-to-speech.
|
|
121
128
|
# @param [Discorb::Embed] embed The embed to send.
|
|
@@ -125,45 +132,48 @@ module Discorb
|
|
|
125
132
|
# @param [Boolean] ephemeral Whether to make the response ephemeral.
|
|
126
133
|
#
|
|
127
134
|
def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil, components: nil, ephemeral: false)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
embeds
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
135
|
+
Async do
|
|
136
|
+
payload = {}
|
|
137
|
+
payload[:content] = content if content
|
|
138
|
+
payload[:tts] = tts
|
|
139
|
+
tmp_embed = if embed
|
|
140
|
+
[embed]
|
|
141
|
+
elsif embeds
|
|
142
|
+
embeds
|
|
143
|
+
end
|
|
144
|
+
payload[:embeds] = tmp_embed.map(&:to_hash) if tmp_embed
|
|
145
|
+
payload[:allowed_mentions] = allowed_mentions ? allowed_mentions.to_hash(@client.allowed_mentions) : @client.allowed_mentions.to_hash
|
|
146
|
+
if components
|
|
147
|
+
tmp_components = []
|
|
148
|
+
tmp_row = []
|
|
149
|
+
components.each do |c|
|
|
150
|
+
case c
|
|
151
|
+
when Array
|
|
152
|
+
tmp_components << tmp_row
|
|
153
|
+
tmp_row = []
|
|
154
|
+
tmp_components << c
|
|
155
|
+
when SelectMenu
|
|
156
|
+
tmp_components << tmp_row
|
|
157
|
+
tmp_row = []
|
|
158
|
+
tmp_components << [c]
|
|
159
|
+
else
|
|
160
|
+
tmp_row << c
|
|
161
|
+
end
|
|
153
162
|
end
|
|
163
|
+
tmp_components << tmp_row
|
|
164
|
+
payload[:components] = tmp_components.filter { |c| c.length.positive? }.map { |c| { type: 1, components: c.map(&:to_hash) } }
|
|
154
165
|
end
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
@
|
|
166
|
+
payload[:flags] = (ephemeral ? 1 << 6 : 0)
|
|
167
|
+
|
|
168
|
+
if @responded
|
|
169
|
+
@client.http.post("/webhooks/#{@application_id}/#{@token}", payload).wait
|
|
170
|
+
elsif @defered
|
|
171
|
+
@client.http.patch("/webhooks/#{@application_id}/#{@token}/messages/@original", payload).wait
|
|
172
|
+
else
|
|
173
|
+
@client.http.post("/interactions/#{@id}/#{@token}/callback", { type: 4, data: payload }).wait
|
|
174
|
+
end
|
|
175
|
+
@responded = true
|
|
165
176
|
end
|
|
166
|
-
@responded = true
|
|
167
177
|
end
|
|
168
178
|
end
|
|
169
179
|
|
|
@@ -190,6 +200,9 @@ module Discorb
|
|
|
190
200
|
#
|
|
191
201
|
# Response with `UPDATE_MESSAGE`(`7`).
|
|
192
202
|
#
|
|
203
|
+
# @macro async
|
|
204
|
+
# @macro http
|
|
205
|
+
#
|
|
193
206
|
# @param [String] content The content of the response.
|
|
194
207
|
# @param [Boolean] tts Whether to send the message as text-to-speech.
|
|
195
208
|
# @param [Discorb::Embed] embed The embed to send.
|
|
@@ -199,38 +212,40 @@ module Discorb
|
|
|
199
212
|
# @param [Boolean] ephemeral Whether to make the response ephemeral.
|
|
200
213
|
#
|
|
201
214
|
def edit(content, tts: false, embed: nil, embeds: nil, allowed_mentions: nil, components: nil, ephemeral: false)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
embeds
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
215
|
+
Async do
|
|
216
|
+
payload = {}
|
|
217
|
+
payload[:content] = content if content
|
|
218
|
+
payload[:tts] = tts
|
|
219
|
+
tmp_embed = if embed
|
|
220
|
+
[embed]
|
|
221
|
+
elsif embeds
|
|
222
|
+
embeds
|
|
223
|
+
end
|
|
224
|
+
payload[:embeds] = tmp_embed.map(&:to_hash) if tmp_embed
|
|
225
|
+
payload[:allowed_mentions] = allowed_mentions ? allowed_mentions.to_hash(@client.allowed_mentions) : @client.allowed_mentions.to_hash
|
|
226
|
+
if components
|
|
227
|
+
tmp_components = []
|
|
228
|
+
tmp_row = []
|
|
229
|
+
components.each do |c|
|
|
230
|
+
case c
|
|
231
|
+
when Array
|
|
232
|
+
tmp_components << tmp_row
|
|
233
|
+
tmp_row = []
|
|
234
|
+
tmp_components << c
|
|
235
|
+
when SelectMenu
|
|
236
|
+
tmp_components << tmp_row
|
|
237
|
+
tmp_row = []
|
|
238
|
+
tmp_components << [c]
|
|
239
|
+
else
|
|
240
|
+
tmp_row << c
|
|
241
|
+
end
|
|
227
242
|
end
|
|
243
|
+
tmp_components << tmp_row
|
|
244
|
+
payload[:components] = tmp_components.filter { |c| c.length.positive? }.map { |c| { type: 1, components: c.map(&:to_hash) } }
|
|
228
245
|
end
|
|
229
|
-
|
|
230
|
-
|
|
246
|
+
payload[:flags] = (ephemeral ? 1 << 6 : 0)
|
|
247
|
+
@client.http.post("/interactions/#{@id}/#{@token}/callback", { type: 6, data: payload }).wait
|
|
231
248
|
end
|
|
232
|
-
payload[:flags] = (ephemeral ? 1 << 6 : 0)
|
|
233
|
-
@client.http.post("/interactions/#{@id}/#{@token}/callback", { type: 6, data: payload }).wait
|
|
234
249
|
end
|
|
235
250
|
end
|
|
236
251
|
|
data/lib/discorb/log.rb
CHANGED
|
@@ -22,34 +22,34 @@ module Discorb
|
|
|
22
22
|
raise ArgumentError, "Invalid log level: #{level}" unless @level
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def debug(message)
|
|
25
|
+
def debug(message, fallback: nil)
|
|
26
26
|
return unless @level <= 0
|
|
27
27
|
|
|
28
|
-
write_output("DEBUG", "\e[90m", message)
|
|
28
|
+
write_output("DEBUG", "\e[90m", message, fallback)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
def info(message)
|
|
31
|
+
def info(message, fallback: nil)
|
|
32
32
|
return unless @level <= 1
|
|
33
33
|
|
|
34
|
-
write_output("INFO", "\e[94m", message)
|
|
34
|
+
write_output("INFO", "\e[94m", message, fallback)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def warn(message)
|
|
37
|
+
def warn(message, fallback: nil)
|
|
38
38
|
return unless @level <= 2
|
|
39
39
|
|
|
40
|
-
write_output("WARN", "\e[93m", message)
|
|
40
|
+
write_output("WARN", "\e[93m", message, fallback)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def error(message)
|
|
43
|
+
def error(message, fallback: nil)
|
|
44
44
|
return unless @level <= 3
|
|
45
45
|
|
|
46
|
-
write_output("ERROR", "\e[31m", message)
|
|
46
|
+
write_output("ERROR", "\e[31m", message, fallback)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
def fatal(message)
|
|
49
|
+
def fatal(message, fallback: nil)
|
|
50
50
|
return unless @level <= 4
|
|
51
51
|
|
|
52
|
-
write_output("FATAL", "\e[91m", message)
|
|
52
|
+
write_output("FATAL", "\e[91m", message, fallback)
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
class << self
|
|
@@ -58,8 +58,12 @@ module Discorb
|
|
|
58
58
|
|
|
59
59
|
private
|
|
60
60
|
|
|
61
|
-
def write_output(name, color, message)
|
|
62
|
-
|
|
61
|
+
def write_output(name, color, message, fallback)
|
|
62
|
+
unless @out
|
|
63
|
+
fallback.puts(message) if fallback
|
|
64
|
+
|
|
65
|
+
return
|
|
66
|
+
end
|
|
63
67
|
|
|
64
68
|
if @colorize_log
|
|
65
69
|
@out.puts("\e[2;90m[#{Time.now.iso8601}] #{color}#{name}\e[m -- #{message}")
|
data/lib/discorb/member.rb
CHANGED
|
@@ -59,6 +59,8 @@ module Discorb
|
|
|
59
59
|
# @!attribute [r] status
|
|
60
60
|
# @macro client_cache
|
|
61
61
|
# @return [Symbol] The status of the member. It's from the {#presence}.
|
|
62
|
+
# @!attribute [r] owner?
|
|
63
|
+
# @return [Boolean] Whether the member is the owner of the guild.
|
|
62
64
|
|
|
63
65
|
# @!visibility private
|
|
64
66
|
def initialize(client, guild_id, user_data, member_data)
|
|
@@ -99,18 +101,27 @@ module Discorb
|
|
|
99
101
|
guild.voice_states[@id]
|
|
100
102
|
end
|
|
101
103
|
|
|
104
|
+
def owner?
|
|
105
|
+
guild.owner_id == @id
|
|
106
|
+
end
|
|
107
|
+
|
|
102
108
|
def guild
|
|
103
109
|
@client.guilds[@guild_id]
|
|
104
110
|
end
|
|
105
111
|
|
|
106
112
|
def roles
|
|
107
|
-
@role_ids.map { |r| guild.roles[r] }
|
|
113
|
+
@role_ids.map { |r| guild.roles[r] }.sort_by(&:position).reverse + [guild.roles[guild.id]]
|
|
108
114
|
end
|
|
109
115
|
|
|
110
116
|
def permissions
|
|
117
|
+
if owner?
|
|
118
|
+
return Permission.new((1 << 38) - 1)
|
|
119
|
+
end
|
|
111
120
|
roles.map(&:permissions).sum(Permission.new(0))
|
|
112
121
|
end
|
|
113
122
|
|
|
123
|
+
alias guild_permissions permissions
|
|
124
|
+
|
|
114
125
|
def hoisted_role
|
|
115
126
|
@hoisted_role_id && guild.roles[@hoisted_role_id]
|
|
116
127
|
end
|
|
@@ -234,7 +245,7 @@ module Discorb
|
|
|
234
245
|
@custom_avatar = member_data[:avatar] && Asset.new(member_data[:avatar])
|
|
235
246
|
super(user_data)
|
|
236
247
|
@display_avatar = @avatar || @custom_avatar
|
|
237
|
-
@client.guilds[@guild_id].members[@id] = self unless @guild_id.nil?
|
|
248
|
+
@client.guilds[@guild_id].members[@id] = self unless @guild_id.nil? || @client.guilds[@guild_id].nil?
|
|
238
249
|
@_member_data.update(member_data)
|
|
239
250
|
end
|
|
240
251
|
end
|
data/lib/discorb/message.rb
CHANGED
|
@@ -522,11 +522,11 @@ module Discorb
|
|
|
522
522
|
if data[:member].nil? && data[:webhook_id]
|
|
523
523
|
@webhook_id = Snowflake.new(data[:webhook_id])
|
|
524
524
|
@author = Webhook::Message::Author.new(data[:author])
|
|
525
|
-
elsif data[:guild_id].nil? || data[:guild_id].empty?
|
|
525
|
+
elsif data[:guild_id].nil? || data[:guild_id].empty? || data[:member].nil?
|
|
526
526
|
@author = @client.users[data[:author][:id]] || User.new(@client, data[:author])
|
|
527
527
|
else
|
|
528
|
-
@author = guild
|
|
529
|
-
|
|
528
|
+
@author = guild&.members&.get(data[:author][:id]) || Member.new(@client,
|
|
529
|
+
@guild_id, data[:author], data[:member])
|
|
530
530
|
end
|
|
531
531
|
@content = data[:content]
|
|
532
532
|
@created_at = Time.iso8601(data[:timestamp])
|
data/lib/discorb.rb
CHANGED
|
@@ -44,7 +44,7 @@ require_order = %w[common flag dictionary error rate_limit http intents emoji_ta
|
|
|
44
44
|
%w[application audit_logs color components event] +
|
|
45
45
|
%w[file guild_template image integration interaction invite log permission] +
|
|
46
46
|
%w[presence reaction role sticker utils voice_state webhook] +
|
|
47
|
-
%w[gateway_requests gateway
|
|
47
|
+
%w[gateway_requests gateway app_command] +
|
|
48
48
|
%w[asset extension client extend]
|
|
49
49
|
require_order.each do |name|
|
|
50
50
|
require_relative "discorb/#{name}.rb"
|
data/po/yard.pot
CHANGED
|
@@ -322,7 +322,7 @@ msgid "## How do I register an application command?"
|
|
|
322
322
|
msgstr ""
|
|
323
323
|
|
|
324
324
|
#: ../docs/application_command.md:13
|
|
325
|
-
msgid "Use {Discorb::
|
|
325
|
+
msgid "Use {Discorb::ApplicationCommand::Handler#slash}, {Discorb::ApplicationCommand::Handler#group} for slash commands, {Discorb::ApplicationCommand::Handler#user_command} for user menu commands, and {Discorb::ApplicationCommand::Handler#message_command} for message menu commands."
|
|
326
326
|
msgstr ""
|
|
327
327
|
|
|
328
328
|
#: ../docs/application_command.md:15
|
|
@@ -349,7 +349,7 @@ msgid "client.slash(\"hello\", \"Greet for you\") do |interaction|\n"
|
|
|
349
349
|
msgstr ""
|
|
350
350
|
|
|
351
351
|
#: ../docs/application_command.md:36
|
|
352
|
-
msgid "{Discorb::
|
|
352
|
+
msgid "{Discorb::ApplicationCommand::Handler#slash} takes 5 arguments:"
|
|
353
353
|
msgstr ""
|
|
354
354
|
|
|
355
355
|
#: ../docs/application_command.md:38
|
|
@@ -441,7 +441,7 @@ msgid "### Group Slash Commands"
|
|
|
441
441
|
msgstr ""
|
|
442
442
|
|
|
443
443
|
#: ../docs/application_command.md:104
|
|
444
|
-
msgid "To register a group of slash commands, use {Discorb::
|
|
444
|
+
msgid "To register a group of slash commands, use {Discorb::ApplicationCommand::Handler#slash_group}."
|
|
445
445
|
msgstr ""
|
|
446
446
|
|
|
447
447
|
#: ../docs/application_command.md:106
|
|
@@ -473,7 +473,7 @@ msgid "group.slash(\"bump_alert\", \"Whether bot should notify DISBOARD bump.\",
|
|
|
473
473
|
msgstr ""
|
|
474
474
|
|
|
475
475
|
#: ../docs/application_command.md:128
|
|
476
|
-
msgid "You can make subcommand group by using {Discorb::
|
|
476
|
+
msgid "You can make subcommand group by using {Discorb::ApplicationCommand::GroupCommand#group}."
|
|
477
477
|
msgstr ""
|
|
478
478
|
|
|
479
479
|
#: ../docs/application_command.md:130
|
|
@@ -558,7 +558,7 @@ msgid "```ruby\n"
|
|
|
558
558
|
" interaction.post(\"Hello, #{user.name}!\")\n"
|
|
559
559
|
"end\n"
|
|
560
560
|
"```\n"
|
|
561
|
-
"{Discorb::
|
|
561
|
+
"{Discorb::ApplicationCommand::Handler#user_command} takes 3 arguments:"
|
|
562
562
|
msgstr ""
|
|
563
563
|
|
|
564
564
|
#: ../docs/application_command.md:216
|
|
@@ -595,7 +595,7 @@ msgid "```ruby\n"
|
|
|
595
595
|
msgstr ""
|
|
596
596
|
|
|
597
597
|
#: ../docs/application_command.md:238
|
|
598
|
-
msgid "{Discorb::
|
|
598
|
+
msgid "{Discorb::ApplicationCommand::Handler#message_command} takes 3 arguments:"
|
|
599
599
|
msgstr ""
|
|
600
600
|
|
|
601
601
|
#: ../docs/application_command.md:248
|
|
@@ -4592,7 +4592,7 @@ msgstr ""
|
|
|
4592
4592
|
msgid "The logger."
|
|
4593
4593
|
msgstr ""
|
|
4594
4594
|
|
|
4595
|
-
# @return [Array<Discorb::
|
|
4595
|
+
# @return [Array<Discorb::ApplicationCommand::Command>]
|
|
4596
4596
|
#: ../lib/discorb/client.rb:45
|
|
4597
4597
|
msgid "The commands that the client is using."
|
|
4598
4598
|
msgstr ""
|
|
@@ -5262,17 +5262,17 @@ msgstr ""
|
|
|
5262
5262
|
msgid "A Discord color name."
|
|
5263
5263
|
msgstr ""
|
|
5264
5264
|
|
|
5265
|
-
# Discorb::
|
|
5265
|
+
# Discorb::ApplicationCommand
|
|
5266
5266
|
#: ../lib/discorb/command.rb:5
|
|
5267
5267
|
msgid "Handles application commands."
|
|
5268
5268
|
msgstr ""
|
|
5269
5269
|
|
|
5270
|
-
# Discorb::
|
|
5270
|
+
# Discorb::ApplicationCommand::Handler
|
|
5271
5271
|
#: ../lib/discorb/command.rb:9
|
|
5272
5272
|
msgid "Module to handle commands."
|
|
5273
5273
|
msgstr ""
|
|
5274
5274
|
|
|
5275
|
-
# Discorb::
|
|
5275
|
+
# Discorb::ApplicationCommand::Handler#slash
|
|
5276
5276
|
#: ../lib/discorb/command.rb:13
|
|
5277
5277
|
msgid "Add new top-level command."
|
|
5278
5278
|
msgstr ""
|
|
@@ -5364,14 +5364,14 @@ msgstr ""
|
|
|
5364
5364
|
msgid "tag|param|options"
|
|
5365
5365
|
msgstr ""
|
|
5366
5366
|
|
|
5367
|
-
# Discorb::
|
|
5367
|
+
# Discorb::ApplicationCommand::Handler#slash_group
|
|
5368
5368
|
#: ../lib/discorb/command.rb:41
|
|
5369
5369
|
msgid "Add new command with group."
|
|
5370
5370
|
msgstr ""
|
|
5371
5371
|
|
|
5372
|
-
# @return [Discorb::
|
|
5373
|
-
# @return [Discorb::
|
|
5374
|
-
# @return [Discorb::
|
|
5372
|
+
# @return [Discorb::ApplicationCommand::Command::GroupCommand]
|
|
5373
|
+
# @return [Discorb::ApplicationCommand::Command::SubcommandGroup]
|
|
5374
|
+
# @return [Discorb::ApplicationCommand::Command]
|
|
5375
5375
|
#: ../lib/discorb/command.rb:51
|
|
5376
5376
|
#: ../lib/discorb/command.rb:69
|
|
5377
5377
|
#: ../lib/discorb/command.rb:87
|
|
@@ -5385,7 +5385,7 @@ msgstr ""
|
|
|
5385
5385
|
msgid "tag|see|file:docs/slash_command.md"
|
|
5386
5386
|
msgstr ""
|
|
5387
5387
|
|
|
5388
|
-
# Discorb::
|
|
5388
|
+
# Discorb::ApplicationCommand::Handler#message_command
|
|
5389
5389
|
#: ../lib/discorb/command.rb:58
|
|
5390
5390
|
msgid "Add message context menu command."
|
|
5391
5391
|
msgstr ""
|
|
@@ -5397,13 +5397,13 @@ msgstr ""
|
|
|
5397
5397
|
msgid "Block to execute."
|
|
5398
5398
|
msgstr ""
|
|
5399
5399
|
|
|
5400
|
-
# @yieldparam [Discorb::
|
|
5400
|
+
# @yieldparam [Discorb::ApplicationCommandInteraction::UserMenuCommand]
|
|
5401
5401
|
#: ../lib/discorb/command.rb:69
|
|
5402
5402
|
#: ../lib/discorb/command.rb:87
|
|
5403
5403
|
msgid "tag|yieldparam|Interaction"
|
|
5404
5404
|
msgstr ""
|
|
5405
5405
|
|
|
5406
|
-
# @yieldparam [Discorb::
|
|
5406
|
+
# @yieldparam [Discorb::ApplicationCommandInteraction::UserMenuCommand] Interaction
|
|
5407
5407
|
#: ../lib/discorb/command.rb:69
|
|
5408
5408
|
#: ../lib/discorb/command.rb:87
|
|
5409
5409
|
msgid "object."
|
|
@@ -5421,7 +5421,7 @@ msgstr ""
|
|
|
5421
5421
|
msgid "Message object."
|
|
5422
5422
|
msgstr ""
|
|
5423
5423
|
|
|
5424
|
-
# Discorb::
|
|
5424
|
+
# Discorb::ApplicationCommand::Handler#user_command
|
|
5425
5425
|
#: ../lib/discorb/command.rb:76
|
|
5426
5426
|
msgid "Add user context menu command."
|
|
5427
5427
|
msgstr ""
|
|
@@ -5431,7 +5431,7 @@ msgstr ""
|
|
|
5431
5431
|
msgid "User object."
|
|
5432
5432
|
msgstr ""
|
|
5433
5433
|
|
|
5434
|
-
# Discorb::
|
|
5434
|
+
# Discorb::ApplicationCommand::Handler#setup_commands
|
|
5435
5435
|
#: ../lib/discorb/command.rb:94
|
|
5436
5436
|
msgid "Setup commands."
|
|
5437
5437
|
msgstr ""
|
|
@@ -5456,7 +5456,7 @@ msgstr ""
|
|
|
5456
5456
|
msgid "tag|see|Client#initialize"
|
|
5457
5457
|
msgstr ""
|
|
5458
5458
|
|
|
5459
|
-
# Discorb::
|
|
5459
|
+
# Discorb::ApplicationCommand::Command
|
|
5460
5460
|
#: ../lib/discorb/command.rb:119
|
|
5461
5461
|
msgid "Represents a application command."
|
|
5462
5462
|
msgstr ""
|
|
@@ -5497,7 +5497,7 @@ msgstr ""
|
|
|
5497
5497
|
msgid "a new instance of Command"
|
|
5498
5498
|
msgstr ""
|
|
5499
5499
|
|
|
5500
|
-
# Discorb::
|
|
5500
|
+
# Discorb::ApplicationCommand::Command::SlashCommand
|
|
5501
5501
|
#: ../lib/discorb/command.rb:163
|
|
5502
5502
|
msgid "Represents the slash command."
|
|
5503
5503
|
msgstr ""
|
|
@@ -5518,18 +5518,18 @@ msgstr ""
|
|
|
5518
5518
|
msgid "a new instance of SlashCommand"
|
|
5519
5519
|
msgstr ""
|
|
5520
5520
|
|
|
5521
|
-
# Discorb::
|
|
5521
|
+
# Discorb::ApplicationCommand::Command::SlashCommand#to_s
|
|
5522
5522
|
#: ../lib/discorb/command.rb:185
|
|
5523
5523
|
msgid "Returns the commands name."
|
|
5524
5524
|
msgstr ""
|
|
5525
5525
|
|
|
5526
|
-
# Discorb::
|
|
5526
|
+
# Discorb::ApplicationCommand::Command::GroupCommand
|
|
5527
5527
|
#: ../lib/discorb/command.rb:236
|
|
5528
5528
|
msgid "Represents the command with subcommands."
|
|
5529
5529
|
msgstr ""
|
|
5530
5530
|
|
|
5531
|
-
# @return [Array<Discorb::
|
|
5532
|
-
# @return [Array<Discorb::
|
|
5531
|
+
# @return [Array<Discorb::ApplicationCommand::Command::SlashCommand, Discorb::ApplicationCommand::Command::SubcommandGroup>]
|
|
5532
|
+
# @return [Array<Discorb::ApplicationCommand::Command::SlashCommand>]
|
|
5533
5533
|
#: ../lib/discorb/command.rb:240
|
|
5534
5534
|
#: ../lib/discorb/command.rb:361
|
|
5535
5535
|
msgid "The subcommands of the command."
|
|
@@ -5540,20 +5540,20 @@ msgstr ""
|
|
|
5540
5540
|
msgid "a new instance of GroupCommand"
|
|
5541
5541
|
msgstr ""
|
|
5542
5542
|
|
|
5543
|
-
# Discorb::
|
|
5544
|
-
# Discorb::
|
|
5543
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#slash
|
|
5544
|
+
# Discorb::ApplicationCommand::Command::SubcommandGroup#slash
|
|
5545
5545
|
#: ../lib/discorb/command.rb:253
|
|
5546
5546
|
#: ../lib/discorb/command.rb:376
|
|
5547
5547
|
msgid "Add new subcommand."
|
|
5548
5548
|
msgstr ""
|
|
5549
5549
|
|
|
5550
|
-
# @return [Discorb::
|
|
5550
|
+
# @return [Discorb::ApplicationCommand::Command::SlashCommand]
|
|
5551
5551
|
#: ../lib/discorb/command.rb:258
|
|
5552
5552
|
#: ../lib/discorb/command.rb:380
|
|
5553
5553
|
msgid "The added subcommand."
|
|
5554
5554
|
msgstr ""
|
|
5555
5555
|
|
|
5556
|
-
# Discorb::
|
|
5556
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#group
|
|
5557
5557
|
#: ../lib/discorb/command.rb:301
|
|
5558
5558
|
msgid "Add new subcommand group."
|
|
5559
5559
|
msgstr ""
|
|
@@ -5568,7 +5568,7 @@ msgstr ""
|
|
|
5568
5568
|
msgid "Group description."
|
|
5569
5569
|
msgstr ""
|
|
5570
5570
|
|
|
5571
|
-
# Discorb::
|
|
5571
|
+
# Discorb::ApplicationCommand::Command::GroupCommand#to_s
|
|
5572
5572
|
#: ../lib/discorb/command.rb:317
|
|
5573
5573
|
msgid "Returns the command name."
|
|
5574
5574
|
msgstr ""
|
|
@@ -5578,7 +5578,7 @@ msgstr ""
|
|
|
5578
5578
|
msgid "The command name."
|
|
5579
5579
|
msgstr ""
|
|
5580
5580
|
|
|
5581
|
-
# Discorb::
|
|
5581
|
+
# Discorb::ApplicationCommand::Command::SubcommandGroup
|
|
5582
5582
|
#: ../lib/discorb/command.rb:357
|
|
5583
5583
|
msgid "Represents the subcommand group."
|
|
5584
5584
|
msgstr ""
|
|
@@ -5589,7 +5589,7 @@ msgid "a new instance of SubcommandGroup"
|
|
|
5589
5589
|
msgstr ""
|
|
5590
5590
|
|
|
5591
5591
|
# Discorb::Activity.types
|
|
5592
|
-
# Discorb::
|
|
5592
|
+
# Discorb::ApplicationCommand::Command.types
|
|
5593
5593
|
#: ../lib/discorb/command.rb:390
|
|
5594
5594
|
#: ../lib/discorb/gateway_requests.rb:45
|
|
5595
5595
|
msgid "Returns the value of attribute types."
|
|
@@ -9873,7 +9873,7 @@ msgstr ""
|
|
|
9873
9873
|
msgid "Response with `UPDATE_MESSAGE`(`7`)."
|
|
9874
9874
|
msgstr ""
|
|
9875
9875
|
|
|
9876
|
-
# Discorb::
|
|
9876
|
+
# Discorb::ApplicationCommandInteraction
|
|
9877
9877
|
#: ../lib/discorb/interaction.rb:245
|
|
9878
9878
|
msgid "Represents a command interaction."
|
|
9879
9879
|
msgstr ""
|
|
@@ -9883,12 +9883,12 @@ msgstr ""
|
|
|
9883
9883
|
msgid "Implement this."
|
|
9884
9884
|
msgstr ""
|
|
9885
9885
|
|
|
9886
|
-
# Discorb::
|
|
9886
|
+
# Discorb::ApplicationCommandInteraction::SlashCommand
|
|
9887
9887
|
#: ../lib/discorb/interaction.rb:254
|
|
9888
9888
|
msgid "Represents a slash command interaction."
|
|
9889
9889
|
msgstr ""
|
|
9890
9890
|
|
|
9891
|
-
# Discorb::
|
|
9891
|
+
# Discorb::ApplicationCommandInteraction::UserMenuCommand
|
|
9892
9892
|
#: ../lib/discorb/interaction.rb:310
|
|
9893
9893
|
msgid "Represents a user context menu interaction."
|
|
9894
9894
|
msgstr ""
|
|
@@ -9898,7 +9898,7 @@ msgstr ""
|
|
|
9898
9898
|
msgid "The target user."
|
|
9899
9899
|
msgstr ""
|
|
9900
9900
|
|
|
9901
|
-
# Discorb::
|
|
9901
|
+
# Discorb::ApplicationCommandInteraction::MessageMenuCommand
|
|
9902
9902
|
#: ../lib/discorb/interaction.rb:325
|
|
9903
9903
|
msgid "Represents a message context menu interaction."
|
|
9904
9904
|
msgstr ""
|
|
@@ -9908,7 +9908,7 @@ msgstr ""
|
|
|
9908
9908
|
msgid "The target message."
|
|
9909
9909
|
msgstr ""
|
|
9910
9910
|
|
|
9911
|
-
# Discorb::
|
|
9911
|
+
# Discorb::ApplicationCommandInteraction.command_type
|
|
9912
9912
|
#: ../lib/discorb/interaction.rb:348
|
|
9913
9913
|
msgid "Returns the value of attribute command_type."
|
|
9914
9914
|
msgstr ""
|