discorb 0.5.4 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- 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/Changelog.md +23 -1
- data/Gemfile.lock +1 -1
- data/docs/application_command.md +8 -8
- data/docs/cli/run.md +11 -1
- data/docs/cli/setup.md +7 -1
- data/docs/events.md +29 -0
- data/docs/extension.md +1 -1
- data/lib/discorb/{command.rb → app_command.rb} +56 -46
- data/lib/discorb/channel.rb +18 -18
- data/lib/discorb/client.rb +35 -25
- data/lib/discorb/color.rb +59 -29
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/embed.rb +2 -2
- data/lib/discorb/emoji.rb +9 -2
- data/lib/discorb/error.rb +7 -1
- data/lib/discorb/event.rb +5 -5
- data/lib/discorb/exe/init.rb +3 -3
- data/lib/discorb/exe/run.rb +12 -0
- data/lib/discorb/exe/setup.rb +14 -1
- data/lib/discorb/extension.rb +9 -9
- data/lib/discorb/gateway.rb +19 -7
- data/lib/discorb/guild.rb +38 -38
- data/lib/discorb/http.rb +13 -11
- data/lib/discorb/intents.rb +2 -2
- data/lib/discorb/interaction.rb +3 -3
- data/lib/discorb/member.rb +1 -1
- data/lib/discorb/message.rb +5 -5
- data/lib/discorb/modules.rb +5 -5
- data/lib/discorb/user.rb +1 -1
- data/lib/discorb/webhook.rb +1 -1
- data/lib/discorb.rb +1 -1
- data/po/yard.pot +37 -37
- data/sig/discorb.rbs +7218 -0
- metadata +7 -3
data/lib/discorb/http.rb
CHANGED
@@ -25,8 +25,8 @@ module Discorb
|
|
25
25
|
# @param [String] audit_log_reason The audit log reason to send with the request.
|
26
26
|
# @param [Hash] kwargs The keyword arguments.
|
27
27
|
#
|
28
|
-
# @return [Array
|
29
|
-
# @return [Array
|
28
|
+
# @return [Array(Net::HTTPResponse, Hash)] The response and as JSON.
|
29
|
+
# @return [Async::Task<Array(Net::HTTPResponse, nil)>] The response was 204.
|
30
30
|
#
|
31
31
|
# @raise [Discorb::HTTPError] The request was failed.
|
32
32
|
#
|
@@ -56,8 +56,8 @@ module Discorb
|
|
56
56
|
# @param [String] audit_log_reason The audit log reason to send with the request.
|
57
57
|
# @param [Hash] kwargs The keyword arguments.
|
58
58
|
#
|
59
|
-
# @return [Array
|
60
|
-
# @return [Array
|
59
|
+
# @return [Array(Net::HTTPResponse, Hash)] The response and as JSON.
|
60
|
+
# @return [Async::Task<Array(Net::HTTPResponse, nil)>] The response was 204.
|
61
61
|
#
|
62
62
|
# @raise [Discorb::HTTPError] The request was failed.
|
63
63
|
#
|
@@ -86,8 +86,8 @@ module Discorb
|
|
86
86
|
# @param [String] audit_log_reason The audit log reason to send with the request.
|
87
87
|
# @param [Hash] kwargs The keyword arguments.
|
88
88
|
#
|
89
|
-
# @return [Array
|
90
|
-
# @return [Array
|
89
|
+
# @return [Array(Net::HTTPResponse, Hash)] The response and as JSON.
|
90
|
+
# @return [Async::Task<Array(Net::HTTPResponse, nil)>] The response was 204.
|
91
91
|
#
|
92
92
|
# @raise [Discorb::HTTPError] The request was failed.
|
93
93
|
#
|
@@ -116,8 +116,8 @@ module Discorb
|
|
116
116
|
# @param [String] audit_log_reason The audit log reason to send with the request.
|
117
117
|
# @param [Hash] kwargs The keyword arguments.
|
118
118
|
#
|
119
|
-
# @return [Array
|
120
|
-
# @return [Array
|
119
|
+
# @return [Array(Net::HTTPResponse, Hash)] The response and as JSON.
|
120
|
+
# @return [Async::Task<Array(Net::HTTPResponse, nil)>] The response was 204.
|
121
121
|
#
|
122
122
|
# @raise [Discorb::HTTPError] The request was failed.
|
123
123
|
#
|
@@ -145,8 +145,8 @@ module Discorb
|
|
145
145
|
# @param [String] audit_log_reason The audit log reason to send with the request.
|
146
146
|
# @param [Hash] kwargs The keyword arguments.
|
147
147
|
#
|
148
|
-
# @return [Array
|
149
|
-
# @return [Array
|
148
|
+
# @return [Array(Net::HTTPResponse, Hash)] The response and as JSON.
|
149
|
+
# @return [Async::Task<Array(Net::HTTPResponse, nil)>] The response was 204.
|
150
150
|
#
|
151
151
|
# @raise [Discorb::HTTPError] The request was failed.
|
152
152
|
#
|
@@ -175,7 +175,7 @@ module Discorb
|
|
175
175
|
# @param [Hash] payload The payload to send.
|
176
176
|
# @param [Array<Discorb::File>] files The files to send.
|
177
177
|
#
|
178
|
-
# @return [Array
|
178
|
+
# @return [Array(String, String)] The boundary and body.
|
179
179
|
#
|
180
180
|
def self.multipart(payload, files)
|
181
181
|
boundary = "DiscorbBySevenC7CMultipartFormData#{Time.now.to_f}"
|
@@ -203,6 +203,8 @@ module Discorb
|
|
203
203
|
case resp.code
|
204
204
|
when "400"
|
205
205
|
raise BadRequestError.new(resp, data)
|
206
|
+
when "401"
|
207
|
+
raise UnauthorizedError.new(resp, data)
|
206
208
|
when "403"
|
207
209
|
raise ForbiddenError.new(resp, data)
|
208
210
|
when "404"
|
data/lib/discorb/intents.rb
CHANGED
@@ -26,7 +26,6 @@ module Discorb
|
|
26
26
|
#
|
27
27
|
# @param guilds [Boolean] Whether guild related events are enabled.
|
28
28
|
# @param members [Boolean] Whether guild members related events are enabled.
|
29
|
-
# @note You must enable members intent on developers portal.
|
30
29
|
# @param bans [Boolean] Whether guild ban related events are enabled.
|
31
30
|
# @param emojis [Boolean] Whether guild emojis related events are enabled.
|
32
31
|
# @param integrations [Boolean] Whether guild integration related events are enabled.
|
@@ -34,13 +33,14 @@ module Discorb
|
|
34
33
|
# @param invites [Boolean] Whether guild invite related events are enabled.
|
35
34
|
# @param voice_states [Boolean] Whether guild voice state related events are enabled.
|
36
35
|
# @param presences [Boolean] Whether guild presences related events are enabled.
|
37
|
-
# @note You must enable members intent on developers portal.
|
38
36
|
# @param messages [Boolean] Whether guild messages related events are enabled.
|
39
37
|
# @param reactions [Boolean] Whether guild reaction related events are enabled.
|
40
38
|
# @param dm_messages [Boolean] Whether dm messages related events are enabled.
|
41
39
|
# @param dm_reactions [Boolean] Whether dm reactions related events are enabled.
|
42
40
|
# @param dm_typing [Boolean] Whether dm typing related events are enabled.
|
43
41
|
#
|
42
|
+
# @note You must enable privileged intents to use `members` and/or `presences` intents.
|
43
|
+
#
|
44
44
|
def initialize(guilds: true,
|
45
45
|
members: false,
|
46
46
|
bans: true,
|
data/lib/discorb/interaction.rb
CHANGED
@@ -121,7 +121,7 @@ module Discorb
|
|
121
121
|
# @param [Discorb::Embed] embed The embed to send.
|
122
122
|
# @param [Array<Discorb::Embed>] embeds The embeds to send. (max: 10)
|
123
123
|
# @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions to send.
|
124
|
-
# @param [Array<Discorb::
|
124
|
+
# @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send.
|
125
125
|
# @param [Boolean] ephemeral Whether to make the response ephemeral.
|
126
126
|
#
|
127
127
|
def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil, components: nil, ephemeral: false)
|
@@ -195,7 +195,7 @@ module Discorb
|
|
195
195
|
# @param [Discorb::Embed] embed The embed to send.
|
196
196
|
# @param [Array<Discorb::Embed>] embeds The embeds to send. (max: 10)
|
197
197
|
# @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions to send.
|
198
|
-
# @param [Array<Discorb::
|
198
|
+
# @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send.
|
199
199
|
# @param [Boolean] ephemeral Whether to make the response ephemeral.
|
200
200
|
#
|
201
201
|
def edit(content, tts: false, embed: nil, embeds: nil, allowed_mentions: nil, components: nil, ephemeral: false)
|
@@ -336,7 +336,7 @@ module Discorb
|
|
336
336
|
private
|
337
337
|
|
338
338
|
def _set_data(data)
|
339
|
-
@target = Message.new(@client, data[:resolved][:messages][data[:target_id].to_sym]
|
339
|
+
@target = Message.new(@client, data[:resolved][:messages][data[:target_id].to_sym])
|
340
340
|
@client.commands.find { |c| c.name == data[:name] && c.type_raw == 3 }.block.call(self, @target)
|
341
341
|
end
|
342
342
|
end
|
data/lib/discorb/member.rb
CHANGED
@@ -211,7 +211,7 @@ module Discorb
|
|
211
211
|
# @param [Integer] delete_message_days The number of days to delete messages.
|
212
212
|
# @param [String] reason The reason for the action.
|
213
213
|
#
|
214
|
-
# @return [Discorb::Guild::Ban] The ban.
|
214
|
+
# @return [Async::Task<Discorb::Guild::Ban>] The ban.
|
215
215
|
#
|
216
216
|
def ban(delete_message_days: 0, reason: nil)
|
217
217
|
Async do
|
data/lib/discorb/message.rb
CHANGED
@@ -128,7 +128,7 @@ module Discorb
|
|
128
128
|
attr_reader :interaction
|
129
129
|
# @return [Discorb::ThreadChannel] The thread channel of the message.
|
130
130
|
attr_reader :thread
|
131
|
-
# @return [Array<Array<Discorb::
|
131
|
+
# @return [Array<Array<Discorb::Component>>] The components of the message.
|
132
132
|
attr_reader :components
|
133
133
|
# @return [Boolean] Whether the message is deleted.
|
134
134
|
attr_reader :deleted
|
@@ -218,7 +218,7 @@ module Discorb
|
|
218
218
|
#
|
219
219
|
# @param [String] content The message content.
|
220
220
|
# @param [Discorb::Embed] embed The embed to send.
|
221
|
-
# @param [Array<
|
221
|
+
# @param [Array<Discorb::Embed>] embeds The embeds to send.
|
222
222
|
# @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions.
|
223
223
|
# @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send.
|
224
224
|
# @param [Boolean] supress Whether to supress embeds.
|
@@ -266,7 +266,7 @@ module Discorb
|
|
266
266
|
# @macro async
|
267
267
|
# @macro http
|
268
268
|
# @param (see #post)
|
269
|
-
# @return [Discorb::Message] The message.
|
269
|
+
# @return [Async::Task<Discorb::Message>] The message.
|
270
270
|
def reply(*args, **kwargs)
|
271
271
|
Async do
|
272
272
|
channel.post(*args, reference: self, **kwargs).wait
|
@@ -339,7 +339,7 @@ module Discorb
|
|
339
339
|
# @param [Integer, nil] limit The maximum number of users to fetch. `nil` for no limit.
|
340
340
|
# @param [Discorb::Snowflake, nil] after The ID of the user to start fetching from.
|
341
341
|
#
|
342
|
-
# @return [Array<Discorb::User
|
342
|
+
# @return [Async::Task<Array<Discorb::User>>] The users.
|
343
343
|
#
|
344
344
|
def fetch_reacted_users(emoji, limit: nil, after: 0)
|
345
345
|
Async do
|
@@ -393,7 +393,7 @@ module Discorb
|
|
393
393
|
#
|
394
394
|
# @param (see Discorb::Channel#start_thread)
|
395
395
|
#
|
396
|
-
# @return [
|
396
|
+
# @return [Async::Task<<Type>>] <description>
|
397
397
|
#
|
398
398
|
def start_thread(*args, **kwargs)
|
399
399
|
Async do
|
data/lib/discorb/modules.rb
CHANGED
@@ -16,11 +16,11 @@ module Discorb
|
|
16
16
|
# @param [Array<Discorb::Embed>] embeds The embeds to send.
|
17
17
|
# @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions.
|
18
18
|
# @param [Discorb::Message, Discorb::Message::Reference] reference The message to reply to.
|
19
|
-
# @param [Array<Discorb::
|
19
|
+
# @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send.
|
20
20
|
# @param [Discorb::File] file The file to send.
|
21
21
|
# @param [Array<Discorb::File>] files The files to send.
|
22
22
|
#
|
23
|
-
# @return [Discorb::Message] The message sent.
|
23
|
+
# @return [Async::Task<Discorb::Message>] The message sent.
|
24
24
|
#
|
25
25
|
def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil,
|
26
26
|
reference: nil, components: nil, file: nil, files: nil)
|
@@ -76,7 +76,7 @@ module Discorb
|
|
76
76
|
# @param [#to_s] message_id The message id.
|
77
77
|
# @param [String] content The message content.
|
78
78
|
# @param [Discorb::Embed] embed The embed to send.
|
79
|
-
# @param [Array<
|
79
|
+
# @param [Array<Discorb::Embed>] embeds The embeds to send.
|
80
80
|
# @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions.
|
81
81
|
# @param [Array<Discorb::Component>, Array<Array<Discorb::Component>>] components The components to send.
|
82
82
|
# @param [Boolean] supress Whether to supress embeds.
|
@@ -142,7 +142,7 @@ module Discorb
|
|
142
142
|
#
|
143
143
|
# @param [Discorb::Snowflake] id The ID of the message.
|
144
144
|
#
|
145
|
-
# @return [Discorb::Message] The message.
|
145
|
+
# @return [Async::Task<Discorb::Message>] The message.
|
146
146
|
# @raise [Discorb::NotFoundError] If the message is not found.
|
147
147
|
#
|
148
148
|
def fetch_message(id)
|
@@ -162,7 +162,7 @@ module Discorb
|
|
162
162
|
# @param [Discorb::Snowflake] after The ID of the message to fetch after.
|
163
163
|
# @param [Discorb::Snowflake] around The ID of the message to fetch around.
|
164
164
|
#
|
165
|
-
# @return [Array<Discorb::Message
|
165
|
+
# @return [Async::Task<Array<Discorb::Message>>] The messages.
|
166
166
|
#
|
167
167
|
def fetch_messages(limit = 50, before: nil, after: nil, around: nil)
|
168
168
|
Async do
|
data/lib/discorb/user.rb
CHANGED
@@ -56,7 +56,7 @@ module Discorb
|
|
56
56
|
#
|
57
57
|
# @param [Boolean] strict Whether don't allow if the user is a member of the team.
|
58
58
|
#
|
59
|
-
# @return [Boolean] Whether the user is a owner of the client.
|
59
|
+
# @return [Async::Task<Boolean>] Whether the user is a owner of the client.
|
60
60
|
#
|
61
61
|
def bot_owner?(strict: false)
|
62
62
|
Async do
|
data/lib/discorb/webhook.rb
CHANGED
@@ -58,7 +58,7 @@ module Discorb
|
|
58
58
|
# @param [Boolean] wait Whether to wait for the message to be sent.
|
59
59
|
#
|
60
60
|
# @return [Discorb::Webhook::Message] The message that was sent.
|
61
|
-
# @return [nil] If `wait` is false.
|
61
|
+
# @return [Async::Task<nil>] If `wait` is false.
|
62
62
|
#
|
63
63
|
def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil,
|
64
64
|
file: nil, files: nil, username: nil, avatar_url: :unset, wait: true)
|
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 ""
|