discorb 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/.github/workflows/build_main.yml +2 -2
- data/.github/workflows/build_version.yml +1 -1
- data/.github/workflows/codeql-analysis.yml +1 -1
- data/.github/workflows/lint-push.yml +3 -5
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/spec.yml +30 -0
- data/.lefthook/commit-msg/validator.rb +5 -0
- data/.rspec +2 -0
- data/.rspec_parallel +2 -0
- data/.rubocop.yml +49 -8
- data/Changelog.md +32 -1
- data/Gemfile +14 -8
- data/Rakefile +46 -25
- data/bin/console +3 -3
- data/docs/Examples.md +1 -1
- data/docs/application_command.md +138 -46
- data/docs/cli/irb.md +2 -2
- data/docs/cli/new.md +14 -9
- data/docs/cli/run.md +7 -11
- data/docs/cli.md +17 -10
- data/docs/events.md +257 -193
- data/docs/extension.md +1 -2
- data/docs/faq.md +0 -1
- data/docs/tutorial.md +12 -12
- data/docs/voice_events.md +106 -106
- data/examples/commands/message.rb +63 -0
- data/examples/commands/permission.rb +18 -0
- data/examples/commands/slash.rb +44 -0
- data/examples/commands/user.rb +51 -0
- data/examples/components/authorization_button.rb +2 -2
- data/examples/components/select_menu.rb +2 -2
- data/examples/extension/main.rb +1 -1
- data/examples/extension/message_expander.rb +5 -2
- data/examples/simple/eval.rb +2 -2
- data/examples/simple/ping_pong.rb +1 -1
- data/examples/simple/rolepanel.rb +2 -2
- data/examples/simple/shard.rb +17 -0
- data/examples/simple/wait_for_message.rb +1 -1
- data/exe/discorb +31 -16
- data/lefthook.yml +45 -0
- data/lib/discorb/allowed_mentions.rb +8 -0
- data/lib/discorb/app_command/command.rb +184 -60
- data/lib/discorb/app_command/common.rb +25 -0
- data/lib/discorb/app_command/handler.rb +116 -34
- data/lib/discorb/app_command.rb +2 -1
- data/lib/discorb/application.rb +17 -7
- data/lib/discorb/asset.rb +10 -2
- data/lib/discorb/attachment.rb +17 -2
- data/lib/discorb/audit_logs.rb +53 -12
- data/lib/discorb/channel/base.rb +108 -0
- data/lib/discorb/channel/category.rb +32 -0
- data/lib/discorb/channel/container.rb +44 -0
- data/lib/discorb/channel/dm.rb +28 -0
- data/lib/discorb/channel/guild.rb +245 -0
- data/lib/discorb/channel/stage.rb +140 -0
- data/lib/discorb/channel/text.rb +345 -0
- data/lib/discorb/channel/thread.rb +321 -0
- data/lib/discorb/channel/voice.rb +79 -0
- data/lib/discorb/channel.rb +2 -1126
- data/lib/discorb/client.rb +160 -64
- data/lib/discorb/common.rb +18 -3
- data/lib/discorb/components/button.rb +7 -7
- data/lib/discorb/components/select_menu.rb +6 -18
- data/lib/discorb/components/text_input.rb +12 -2
- data/lib/discorb/components.rb +1 -1
- data/lib/discorb/dictionary.rb +2 -0
- data/lib/discorb/embed.rb +55 -14
- data/lib/discorb/emoji.rb +59 -5
- data/lib/discorb/emoji_table.rb +4970 -4
- data/lib/discorb/error.rb +7 -1
- data/lib/discorb/event.rb +56 -21
- data/lib/discorb/exe/about.rb +1 -0
- data/lib/discorb/exe/irb.rb +2 -4
- data/lib/discorb/exe/new.rb +95 -28
- data/lib/discorb/exe/run.rb +9 -37
- data/lib/discorb/exe/setup.rb +25 -12
- data/lib/discorb/exe/show.rb +4 -3
- data/lib/discorb/extend.rb +1 -0
- data/lib/discorb/extension.rb +6 -3
- data/lib/discorb/flag.rb +11 -0
- data/lib/discorb/gateway.rb +312 -169
- data/lib/discorb/gateway_requests.rb +4 -7
- data/lib/discorb/guild.rb +255 -89
- data/lib/discorb/guild_template.rb +34 -7
- data/lib/discorb/http.rb +23 -11
- data/lib/discorb/integration.rb +27 -9
- data/lib/discorb/intents.rb +8 -8
- data/lib/discorb/interaction/autocomplete.rb +31 -19
- data/lib/discorb/interaction/command.rb +70 -17
- data/lib/discorb/interaction/components.rb +20 -4
- data/lib/discorb/interaction/modal.rb +0 -1
- data/lib/discorb/interaction/response.rb +73 -22
- data/lib/discorb/interaction/root.rb +29 -14
- data/lib/discorb/interaction.rb +1 -0
- data/lib/discorb/invite.rb +16 -9
- data/lib/discorb/member.rb +46 -5
- data/lib/discorb/message.rb +56 -15
- data/lib/discorb/message_meta.rb +39 -9
- data/lib/discorb/modules.rb +56 -14
- data/lib/discorb/permission.rb +14 -5
- data/lib/discorb/presence.rb +43 -10
- data/lib/discorb/rate_limit.rb +13 -3
- data/lib/discorb/reaction.rb +10 -4
- data/lib/discorb/role.rb +31 -4
- data/lib/discorb/shard.rb +74 -0
- data/lib/discorb/sticker.rb +30 -21
- data/lib/discorb/user.rb +13 -1
- data/lib/discorb/utils/colored_puts.rb +1 -0
- data/lib/discorb/voice_state.rb +30 -8
- data/lib/discorb/webhook.rb +88 -25
- data/lib/discorb.rb +10 -6
- data/po/yard.pot +9 -9
- data/sig/discorb.rbs +7232 -5837
- metadata +23 -6
- data/examples/commands/bookmarker.rb +0 -42
- data/examples/commands/hello.rb +0 -10
- data/examples/commands/inspect.rb +0 -25
- data/lib/discorb/log.rb +0 -81
data/lib/discorb/voice_state.rb
CHANGED
@@ -46,7 +46,13 @@ module Discorb
|
|
46
46
|
# @macro client_cache
|
47
47
|
# @return [Discorb::User] The user this voice state is for.
|
48
48
|
|
49
|
+
#
|
50
|
+
# Initialize a new voice state.
|
49
51
|
# @private
|
52
|
+
#
|
53
|
+
# @param [Discorb::Client] client The client this voice state belongs to.
|
54
|
+
# @param [Hash] data The data of the voice state.
|
55
|
+
#
|
50
56
|
def initialize(client, data)
|
51
57
|
@client = client
|
52
58
|
_set_data(data)
|
@@ -89,10 +95,10 @@ module Discorb
|
|
89
95
|
@user_id = data[:user_id]
|
90
96
|
unless guild.nil?
|
91
97
|
@member = if data.key?(:member)
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
98
|
+
guild.members[data[:user_id]] || Member.new(@client, @guild_id, data[:member][:user], data[:member])
|
99
|
+
else
|
100
|
+
guild.members[data[:user_id]]
|
101
|
+
end
|
96
102
|
end
|
97
103
|
@session_id = data[:session_id]
|
98
104
|
@deaf = data[:deaf]
|
@@ -135,7 +141,14 @@ module Discorb
|
|
135
141
|
2 => :guild_only,
|
136
142
|
}
|
137
143
|
|
144
|
+
#
|
145
|
+
# Initialize a new instance of the StageInstance class.
|
138
146
|
# @private
|
147
|
+
#
|
148
|
+
# @param [Discorb::Client] client The client.
|
149
|
+
# @param [Hash] data The data of the stage instance.
|
150
|
+
# @param [Boolean] no_cache Whether to disable caching.
|
151
|
+
#
|
139
152
|
def initialize(client, data, no_cache: false)
|
140
153
|
@client = client
|
141
154
|
@data = data
|
@@ -182,9 +195,10 @@ module Discorb
|
|
182
195
|
Async do
|
183
196
|
payload = {}
|
184
197
|
payload[:topic] = topic if topic != Discorb::Unset
|
185
|
-
payload[:privacy_level] =
|
198
|
+
payload[:privacy_level] = PRIVACY_LEVEL.key(privacy_level) if privacy_level != Discorb::Unset
|
186
199
|
@client.http.request(
|
187
|
-
Route.new("/stage-instances/#{@channel_id}", "//stage-instances/:channel_id",
|
200
|
+
Route.new("/stage-instances/#{@channel_id}", "//stage-instances/:channel_id",
|
201
|
+
:patch), payload, audit_log_reason: reason,
|
188
202
|
).wait
|
189
203
|
self
|
190
204
|
end
|
@@ -201,7 +215,10 @@ module Discorb
|
|
201
215
|
#
|
202
216
|
def delete!(reason: nil)
|
203
217
|
Async do
|
204
|
-
@client.http.request(
|
218
|
+
@client.http.request(
|
219
|
+
Route.new("/stage-instances/#{@channel_id}", "//stage-instances/:stage_instance_id",
|
220
|
+
:delete), {}, audit_log_reason: reason
|
221
|
+
).wait
|
205
222
|
self
|
206
223
|
end
|
207
224
|
end
|
@@ -216,7 +233,7 @@ module Discorb
|
|
216
233
|
@guild_id = Snowflake.new(data[:guild_id])
|
217
234
|
@channel_id = Snowflake.new(data[:channel_id])
|
218
235
|
@topic = data[:topic]
|
219
|
-
@privacy_level =
|
236
|
+
@privacy_level = PRIVACY_LEVEL[data[:privacy_level]]
|
220
237
|
@discoverable_disabled = data[:discoverable_disabled]
|
221
238
|
end
|
222
239
|
|
@@ -246,7 +263,12 @@ module Discorb
|
|
246
263
|
attr_reader :custom
|
247
264
|
alias custom? custom
|
248
265
|
|
266
|
+
#
|
267
|
+
# Initialize a new instance of the VoiceRegion class.
|
249
268
|
# @private
|
269
|
+
#
|
270
|
+
# @param [Hash] data The data of the voice region.
|
271
|
+
#
|
250
272
|
def initialize(data)
|
251
273
|
@id = data[:id]
|
252
274
|
@name = data[:name]
|
data/lib/discorb/webhook.rb
CHANGED
@@ -22,7 +22,13 @@ module Discorb
|
|
22
22
|
# @return [String] The URL of the webhook.
|
23
23
|
attr_reader :token
|
24
24
|
|
25
|
+
#
|
26
|
+
# Initializes a webhook.
|
25
27
|
# @private
|
28
|
+
#
|
29
|
+
# @param [Discorb::Client] client The client.
|
30
|
+
# @param [Hash] data The data of the webhook.
|
31
|
+
#
|
26
32
|
def initialize(client, data)
|
27
33
|
@name = data[:name]
|
28
34
|
@guild_id = data[:guild_id] && Snowflake.new(data[:guild_id])
|
@@ -60,22 +66,23 @@ module Discorb
|
|
60
66
|
# @return [Async::Task<nil>] If `wait` is false.
|
61
67
|
#
|
62
68
|
def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil,
|
63
|
-
|
69
|
+
file: nil, files: nil, username: nil, avatar_url: Discorb::Unset, wait: true)
|
64
70
|
Async do
|
65
71
|
payload = {}
|
66
72
|
payload[:content] = content if content
|
67
73
|
payload[:tts] = tts
|
68
74
|
tmp_embed = if embed
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
75
|
+
[embed]
|
76
|
+
elsif embeds
|
77
|
+
embeds
|
78
|
+
end
|
73
79
|
payload[:embeds] = tmp_embed.map(&:to_hash) if tmp_embed
|
74
80
|
payload[:allowed_mentions] = allowed_mentions&.to_hash
|
75
81
|
payload[:username] = username if username
|
76
82
|
payload[:avatar_url] = avatar_url if avatar_url != Discorb::Unset
|
77
83
|
files = [file]
|
78
|
-
_resp, data = @http.multipart_request(Route.new("#{url}?wait=#{wait}", "//webhooks/:webhook_id/:token", :post),
|
84
|
+
_resp, data = @http.multipart_request(Route.new("#{url}?wait=#{wait}", "//webhooks/:webhook_id/:token", :post),
|
85
|
+
files, payload, headers: headers).wait
|
79
86
|
data && Webhook::Message.new(self, data)
|
80
87
|
end
|
81
88
|
end
|
@@ -151,7 +158,10 @@ module Discorb
|
|
151
158
|
payload[:attachments] = attachments.map(&:to_hash) if attachments != Discorb::Unset
|
152
159
|
payload[:allowed_mentions] = allowed_mentions if allowed_mentions != Discorb::Unset
|
153
160
|
files = [file] if file != Discorb::Unset
|
154
|
-
_resp, data = @http.multipart_request(
|
161
|
+
_resp, data = @http.multipart_request(
|
162
|
+
Route.new("#{url}/messages/#{Utils.try(message, :id)}", "//webhooks/:webhook_id/:token/messages/:message_id",
|
163
|
+
:patch), payload, files
|
164
|
+
).wait
|
155
165
|
message.send(:_set_data, data)
|
156
166
|
message
|
157
167
|
end
|
@@ -167,9 +177,9 @@ module Discorb
|
|
167
177
|
def delete_message!(message)
|
168
178
|
Async do
|
169
179
|
@http.request(Route.new(
|
170
|
-
|
171
|
-
|
172
|
-
|
180
|
+
"#{url}/messages/#{Utils.try(message, :id)}",
|
181
|
+
"//webhooks/:webhook_id/:token/messages/:message_id", :delete
|
182
|
+
)).wait
|
173
183
|
message
|
174
184
|
end
|
175
185
|
end
|
@@ -200,7 +210,13 @@ module Discorb
|
|
200
210
|
# @!attribute [r] url
|
201
211
|
# @return [String] The URL of the webhook.
|
202
212
|
|
213
|
+
#
|
214
|
+
# Initializes the incoming webhook.
|
203
215
|
# @private
|
216
|
+
#
|
217
|
+
# @param [Discorb::Client] client The client.
|
218
|
+
# @param [String] url The URL of the webhook.
|
219
|
+
#
|
204
220
|
def initialize(client, data)
|
205
221
|
super
|
206
222
|
@token = data[:token]
|
@@ -222,7 +238,13 @@ module Discorb
|
|
222
238
|
# Represents a source channel of follower webhook.
|
223
239
|
# @return [Discorb::Channel, Discorb::Webhook::FollowerWebhook::Channel] The source channel of follower webhook.
|
224
240
|
|
241
|
+
#
|
242
|
+
# Initializes the follower webhook.
|
225
243
|
# @private
|
244
|
+
#
|
245
|
+
# @param [Discorb::Client] client The client.
|
246
|
+
# @param [Hash] data The data of the follower webhook.
|
247
|
+
#
|
226
248
|
def initialize(client, data)
|
227
249
|
super
|
228
250
|
@source_guild = FollowerWebhook::Guild.new(data[:source_guild])
|
@@ -248,12 +270,21 @@ module Discorb
|
|
248
270
|
# @return [Discorb::Asset] The icon of the guild.
|
249
271
|
attr_reader :icon
|
250
272
|
|
273
|
+
#
|
274
|
+
# Initialize a new guild.
|
251
275
|
# @private
|
276
|
+
#
|
277
|
+
# @param [Hash] data The data of the guild.
|
278
|
+
#
|
252
279
|
def initialize(data)
|
253
280
|
@id = Snowflake.new(data[:id])
|
254
281
|
@name = data[:name]
|
255
282
|
@icon = Asset.new(self, data[:icon])
|
256
283
|
end
|
284
|
+
|
285
|
+
def inspect
|
286
|
+
"#<#{self.class.name} #{@id}: #{@name}>"
|
287
|
+
end
|
257
288
|
end
|
258
289
|
|
259
290
|
#
|
@@ -265,11 +296,20 @@ module Discorb
|
|
265
296
|
# @return [String] The name of the channel.
|
266
297
|
attr_reader :name
|
267
298
|
|
299
|
+
#
|
300
|
+
# Initialize a new channel.
|
268
301
|
# @private
|
302
|
+
#
|
303
|
+
# @param [Hash] data The data of the channel.
|
304
|
+
#
|
269
305
|
def initialize(data)
|
270
306
|
@id = Snowflake.new(data[:id])
|
271
307
|
@name = data[:name]
|
272
308
|
end
|
309
|
+
|
310
|
+
def inspect
|
311
|
+
"#<#{self.class.name} #{@id}: #{@name}>"
|
312
|
+
end
|
273
313
|
end
|
274
314
|
end
|
275
315
|
|
@@ -290,7 +330,13 @@ module Discorb
|
|
290
330
|
# @return [Discorb::Snowflake] The ID of the guild.
|
291
331
|
attr_reader :guild_id
|
292
332
|
|
333
|
+
#
|
334
|
+
# Initializes the message.
|
293
335
|
# @private
|
336
|
+
#
|
337
|
+
# @param [Discorb::Webhook] webhook The webhook.
|
338
|
+
# @param [Hash] data The data of the message.
|
339
|
+
# @param [Discorb::Client] client The client. This will be nil if it's created from {URLWebhook}.
|
294
340
|
def initialize(webhook, data, client = nil)
|
295
341
|
@client = client
|
296
342
|
@webhook = webhook
|
@@ -329,7 +375,7 @@ module Discorb
|
|
329
375
|
|
330
376
|
def _set_data(data)
|
331
377
|
@id = Snowflake.new(data[:id])
|
332
|
-
@type = Discorb::Message
|
378
|
+
@type = Discorb::Message::MESSAGE_TYPE[data[:type]]
|
333
379
|
@content = data[:content]
|
334
380
|
@channel_id = Snowflake.new(data[:channel_id])
|
335
381
|
@author = Author.new(data[:author])
|
@@ -364,7 +410,12 @@ module Discorb
|
|
364
410
|
# @return [String] The discriminator of the author.
|
365
411
|
attr_reader :discriminator
|
366
412
|
|
413
|
+
#
|
414
|
+
# Initializes the author.
|
367
415
|
# @private
|
416
|
+
#
|
417
|
+
# @param [Hash] data The data of the author.
|
418
|
+
#
|
368
419
|
def initialize(data)
|
369
420
|
@data = data
|
370
421
|
@bot = data[:bot]
|
@@ -384,6 +435,10 @@ module Discorb
|
|
384
435
|
end
|
385
436
|
|
386
437
|
alias to_s_user to_s
|
438
|
+
|
439
|
+
def inspect
|
440
|
+
"#<#{self.class.name} #{self}>"
|
441
|
+
end
|
387
442
|
end
|
388
443
|
end
|
389
444
|
|
@@ -396,25 +451,33 @@ module Discorb
|
|
396
451
|
# @return [Discorb::Webhook::URLWebhook] The URLWebhook.
|
397
452
|
#
|
398
453
|
def new(url)
|
399
|
-
if self
|
400
|
-
return super(*url) if url.is_a?(Array)
|
401
|
-
|
402
|
-
return super
|
403
|
-
end
|
404
|
-
if url.is_a?(String)
|
454
|
+
if self == Webhook
|
405
455
|
URLWebhook.new(url)
|
406
456
|
else
|
407
|
-
|
408
|
-
when 1
|
409
|
-
IncomingWebhook
|
410
|
-
when 2
|
411
|
-
FollowerWebhook
|
412
|
-
when 3
|
413
|
-
ApplicationWebhook
|
414
|
-
end.new(url)
|
457
|
+
super
|
415
458
|
end
|
416
459
|
end
|
417
460
|
|
461
|
+
#
|
462
|
+
# Creates Webhook with discord data.
|
463
|
+
# @private
|
464
|
+
#
|
465
|
+
# @param [Discorb::Client] client The client.
|
466
|
+
# @param [Hash] data The data of the webhook.
|
467
|
+
#
|
468
|
+
# @return [Discorb::Webhook] The Webhook.
|
469
|
+
#
|
470
|
+
def from_data(client, data)
|
471
|
+
case data[:type]
|
472
|
+
when 1
|
473
|
+
IncomingWebhook
|
474
|
+
when 2
|
475
|
+
FollowerWebhook
|
476
|
+
when 3
|
477
|
+
ApplicationWebhook
|
478
|
+
end.new(client, data)
|
479
|
+
end
|
480
|
+
|
418
481
|
def from_url(url)
|
419
482
|
URLWebhook.new(url)
|
420
483
|
end
|
data/lib/discorb.rb
CHANGED
@@ -4,9 +4,13 @@
|
|
4
4
|
#
|
5
5
|
# @author sevenc-nanashi
|
6
6
|
module Discorb
|
7
|
+
#
|
8
|
+
# Method to define a macro for YARD.
|
7
9
|
# @private
|
10
|
+
#
|
8
11
|
# @!macro [new] async
|
9
|
-
# @note This is an asynchronous method, it will return a `Async::Task` object.
|
12
|
+
# @note This is an asynchronous method, it will return a `Async::Task` object.
|
13
|
+
# Use `Async::Task#wait` to get the result.
|
10
14
|
#
|
11
15
|
# @!macro [new] client_cache
|
12
16
|
# @note This method returns an object from client cache. it will return `nil` if the object is not in cache.
|
@@ -16,14 +20,14 @@ module Discorb
|
|
16
20
|
# @note You must enable `GUILD_MEMBERS` intent to use this method.
|
17
21
|
#
|
18
22
|
# @!macro edit
|
19
|
-
# @note The arguments of this method are defaultly set to `Discorb::Unset`.
|
23
|
+
# @note The arguments of this method are defaultly set to `Discorb::Unset`.
|
24
|
+
# Specify value to set the value, if not don't specify or specify `Discorb::Unset`.
|
20
25
|
#
|
21
26
|
# @!macro http
|
22
27
|
# @note This method calls HTTP request.
|
23
28
|
# @raise [Discorb::HTTPError] HTTP request failed.
|
24
29
|
#
|
25
30
|
def macro
|
26
|
-
# NOTE: this method is only for YARD.
|
27
31
|
puts "Wow, You found the easter egg!\n"
|
28
32
|
red = "\e[31m"
|
29
33
|
reset = "\e[m"
|
@@ -40,13 +44,13 @@ module Discorb
|
|
40
44
|
end
|
41
45
|
|
42
46
|
require_order = %w[common flag dictionary error rate_limit http intents emoji_table modules] +
|
43
|
-
%w[message_meta allowed_mentions] +
|
47
|
+
%w[channel/container message_meta allowed_mentions] +
|
44
48
|
%w[user member guild emoji channel embed message] +
|
45
49
|
%w[application audit_logs color components event event_handler] +
|
46
|
-
%w[attachment guild_template image integration interaction invite
|
50
|
+
%w[attachment guild_template image integration interaction invite permission] +
|
47
51
|
%w[presence reaction role sticker utils voice_state webhook] +
|
48
52
|
%w[gateway_requests gateway app_command] +
|
49
|
-
%w[asset extension client extend]
|
53
|
+
%w[asset extension shard client extend]
|
50
54
|
require_order.each do |name|
|
51
55
|
require_relative "discorb/#{name}.rb"
|
52
56
|
end
|
data/po/yard.pot
CHANGED
@@ -4519,7 +4519,7 @@ msgid "Command block."
|
|
4519
4519
|
msgstr ""
|
4520
4520
|
|
4521
4521
|
# @return [Discorb::ApplicationCommand::Command::GroupCommand]
|
4522
|
-
# @return [Discorb::ApplicationCommand::Command::
|
4522
|
+
# @return [Discorb::ApplicationCommand::Command::ChatInputCommand]
|
4523
4523
|
# @return [Discorb::ApplicationCommand::Command::SubcommandGroup]
|
4524
4524
|
# @return [Discorb::ApplicationCommand::Command]
|
4525
4525
|
#: ../lib/discorb/app_command.rb:40
|
@@ -4722,7 +4722,7 @@ msgstr ""
|
|
4722
4722
|
msgid "a new instance of Command"
|
4723
4723
|
msgstr ""
|
4724
4724
|
|
4725
|
-
# Discorb::ApplicationCommand::Command::
|
4725
|
+
# Discorb::ApplicationCommand::Command::ChatInputCommand
|
4726
4726
|
#: ../lib/discorb/app_command.rb:194
|
4727
4727
|
msgid "Represents the slash command."
|
4728
4728
|
msgstr ""
|
@@ -4738,12 +4738,12 @@ msgstr ""
|
|
4738
4738
|
msgid "The options of the command."
|
4739
4739
|
msgstr ""
|
4740
4740
|
|
4741
|
-
# @return [
|
4741
|
+
# @return [ChatInputCommand]
|
4742
4742
|
#: ../lib/discorb/app_command.rb:203
|
4743
|
-
msgid "a new instance of
|
4743
|
+
msgid "a new instance of ChatInputCommand"
|
4744
4744
|
msgstr ""
|
4745
4745
|
|
4746
|
-
# Discorb::ApplicationCommand::Command::
|
4746
|
+
# Discorb::ApplicationCommand::Command::ChatInputCommand#to_s
|
4747
4747
|
#: ../lib/discorb/app_command.rb:213
|
4748
4748
|
msgid "Returns the commands name."
|
4749
4749
|
msgstr ""
|
@@ -4753,8 +4753,8 @@ msgstr ""
|
|
4753
4753
|
msgid "Represents the command with subcommands."
|
4754
4754
|
msgstr ""
|
4755
4755
|
|
4756
|
-
# @return [Array<Discorb::ApplicationCommand::Command::
|
4757
|
-
# @return [Array<Discorb::ApplicationCommand::Command::
|
4756
|
+
# @return [Array<Discorb::ApplicationCommand::Command::ChatInputCommand, Discorb::ApplicationCommand::Command::SubcommandGroup>]
|
4757
|
+
# @return [Array<Discorb::ApplicationCommand::Command::ChatInputCommand>]
|
4758
4758
|
#: ../lib/discorb/app_command.rb:275
|
4759
4759
|
#: ../lib/discorb/app_command.rb:372
|
4760
4760
|
msgid "The subcommands of the command."
|
@@ -4772,7 +4772,7 @@ msgstr ""
|
|
4772
4772
|
msgid "Add new subcommand."
|
4773
4773
|
msgstr ""
|
4774
4774
|
|
4775
|
-
# @return [Discorb::ApplicationCommand::Command::
|
4775
|
+
# @return [Discorb::ApplicationCommand::Command::ChatInputCommand]
|
4776
4776
|
#: ../lib/discorb/app_command.rb:294
|
4777
4777
|
#: ../lib/discorb/app_command.rb:391
|
4778
4778
|
msgid "The added subcommand."
|
@@ -12122,7 +12122,7 @@ msgstr ""
|
|
12122
12122
|
msgid "Represents a command interaction."
|
12123
12123
|
msgstr ""
|
12124
12124
|
|
12125
|
-
# Discorb::CommandInteraction::
|
12125
|
+
# Discorb::CommandInteraction::ChatInputCommand
|
12126
12126
|
#: ../lib/discorb/interaction/command.rb:11
|
12127
12127
|
msgid "Represents a slash command interaction."
|
12128
12128
|
msgstr ""
|