djs-selfbot-v13 3.1.7 → 3.2.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.
- package/README.md +18 -35
- package/package.json +85 -100
- package/src/client/BaseClient.js +3 -4
- package/src/client/Client.js +249 -530
- package/src/client/actions/Action.js +18 -13
- package/src/client/actions/ActionsManager.js +7 -1
- package/src/client/actions/AutoModerationActionExecution.js +1 -0
- package/src/client/actions/AutoModerationRuleCreate.js +1 -0
- package/src/client/actions/AutoModerationRuleDelete.js +1 -0
- package/src/client/actions/AutoModerationRuleUpdate.js +1 -0
- package/src/client/actions/GuildMemberRemove.js +0 -1
- package/src/client/actions/GuildMemberUpdate.js +0 -1
- package/src/client/actions/MessageCreate.js +0 -4
- package/src/client/actions/PresenceUpdate.js +17 -16
- package/src/client/websocket/WebSocketManager.js +11 -31
- package/src/client/websocket/WebSocketShard.js +39 -38
- package/src/client/websocket/handlers/CALL_CREATE.js +3 -3
- package/src/client/websocket/handlers/CALL_DELETE.js +2 -2
- package/src/client/websocket/handlers/CALL_UPDATE.js +2 -2
- package/src/client/websocket/handlers/CHANNEL_RECIPIENT_ADD.js +16 -13
- package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
- package/src/client/websocket/handlers/GUILD_CREATE.js +19 -13
- package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +0 -1
- package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
- package/src/client/websocket/handlers/MESSAGE_POLL_VOTE_ADD.js +22 -0
- package/src/client/websocket/handlers/MESSAGE_POLL_VOTE_REMOVE.js +12 -0
- package/src/client/websocket/handlers/READY.js +90 -140
- package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
- package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +7 -5
- package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +32 -9
- package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +2 -8
- package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
- package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +78 -0
- package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +1 -5
- package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +12 -0
- package/src/client/websocket/handlers/index.js +17 -20
- package/src/errors/Messages.js +25 -69
- package/src/index.js +13 -43
- package/src/managers/ApplicationCommandManager.js +9 -12
- package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
- package/src/managers/ChannelManager.js +2 -3
- package/src/managers/ClientUserSettingManager.js +162 -280
- package/src/managers/GuildBanManager.js +47 -1
- package/src/managers/GuildChannelManager.js +2 -16
- package/src/managers/GuildForumThreadManager.js +24 -30
- package/src/managers/GuildManager.js +1 -1
- package/src/managers/GuildMemberManager.js +50 -222
- package/src/managers/GuildSettingManager.js +22 -15
- package/src/managers/MessageManager.js +42 -44
- package/src/managers/PermissionOverwriteManager.js +1 -1
- package/src/managers/ReactionUserManager.js +5 -5
- package/src/managers/RelationshipManager.js +83 -76
- package/src/managers/ThreadManager.js +12 -45
- package/src/managers/ThreadMemberManager.js +1 -1
- package/src/managers/UserManager.js +6 -10
- package/src/managers/UserNoteManager.js +53 -0
- package/src/rest/APIRequest.js +48 -20
- package/src/rest/DiscordAPIError.js +17 -16
- package/src/rest/RESTManager.js +1 -21
- package/src/rest/RequestHandler.js +35 -21
- package/src/structures/ApplicationCommand.js +19 -456
- package/src/structures/ApplicationRoleConnectionMetadata.js +3 -0
- package/src/structures/AutoModerationRule.js +5 -5
- package/src/structures/AutocompleteInteraction.js +1 -0
- package/src/structures/BaseGuildTextChannel.js +10 -12
- package/src/structures/BaseGuildVoiceChannel.js +16 -18
- package/src/structures/{Call.js → CallState.js} +17 -12
- package/src/structures/CategoryChannel.js +2 -0
- package/src/structures/Channel.js +2 -3
- package/src/structures/ClientPresence.js +20 -19
- package/src/structures/ClientUser.js +117 -338
- package/src/structures/ContextMenuInteraction.js +1 -1
- package/src/structures/DMChannel.js +29 -92
- package/src/structures/ForumChannel.js +0 -10
- package/src/structures/GroupDMChannel.js +387 -0
- package/src/structures/Guild.js +135 -271
- package/src/structures/GuildAuditLogs.js +0 -5
- package/src/structures/GuildChannel.js +16 -2
- package/src/structures/GuildMember.js +27 -145
- package/src/structures/Interaction.js +1 -62
- package/src/structures/Invite.js +35 -52
- package/src/structures/Message.js +220 -203
- package/src/structures/MessageAttachment.js +11 -0
- package/src/structures/MessageButton.js +1 -67
- package/src/structures/MessageEmbed.js +1 -1
- package/src/structures/MessageMentions.js +3 -2
- package/src/structures/MessagePayload.js +6 -46
- package/src/structures/MessagePoll.js +238 -0
- package/src/structures/MessageReaction.js +1 -1
- package/src/structures/MessageSelectMenu.js +1 -252
- package/src/structures/Modal.js +70 -188
- package/src/structures/Presence.js +787 -129
- package/src/structures/Role.js +18 -2
- package/src/structures/SelectMenuInteraction.js +2 -151
- package/src/structures/Team.js +0 -49
- package/src/structures/TextInputComponent.js +0 -70
- package/src/structures/ThreadChannel.js +0 -19
- package/src/structures/User.js +145 -339
- package/src/structures/UserContextMenuInteraction.js +2 -2
- package/src/structures/VoiceState.js +74 -39
- package/src/structures/WebEmbed.js +38 -52
- package/src/structures/Webhook.js +17 -11
- package/src/structures/interfaces/Application.js +146 -23
- package/src/structures/interfaces/TextBasedChannel.js +409 -256
- package/src/util/ApplicationFlags.js +1 -1
- package/src/util/AttachmentFlags.js +38 -0
- package/src/util/Constants.js +120 -285
- package/src/util/Formatters.js +16 -2
- package/src/util/InviteFlags.js +29 -0
- package/src/util/LimitedCollection.js +1 -1
- package/src/util/Options.js +48 -74
- package/src/util/Permissions.js +15 -0
- package/src/util/PurchasedFlags.js +2 -0
- package/src/util/RemoteAuth.js +221 -356
- package/src/util/RoleFlags.js +37 -0
- package/src/util/Sweepers.js +1 -1
- package/src/util/Util.js +158 -32
- package/typings/enums.d.ts +24 -73
- package/typings/index.d.ts +978 -1288
- package/typings/rawDataTypes.d.ts +68 -9
- package/src/client/actions/InteractionCreate.js +0 -115
- package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +0 -23
- package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +0 -11
- package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +0 -55
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
- package/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -16
- package/src/client/websocket/handlers/INTERACTION_FAILURE.js +0 -18
- package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +0 -30
- package/src/client/websocket/handlers/MESSAGE_ACK.js +0 -16
- package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
- package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
- package/src/managers/DeveloperPortalManager.js +0 -104
- package/src/managers/GuildApplicationCommandManager.js +0 -28
- package/src/managers/GuildFolderManager.js +0 -24
- package/src/managers/SessionManager.js +0 -57
- package/src/rest/CaptchaSolver.js +0 -132
- package/src/structures/ClientApplication.js +0 -204
- package/src/structures/DeveloperPortalApplication.js +0 -520
- package/src/structures/GuildFolder.js +0 -75
- package/src/structures/InteractionResponse.js +0 -114
- package/src/structures/PartialGroupDMChannel.js +0 -433
- package/src/structures/RichPresence.js +0 -722
- package/src/structures/Session.js +0 -81
- package/src/util/Voice.js +0 -1456
- package/src/util/arRPC/index.js +0 -229
- package/src/util/arRPC/process/detectable.json +0 -1
- package/src/util/arRPC/process/index.js +0 -102
- package/src/util/arRPC/process/native/index.js +0 -5
- package/src/util/arRPC/process/native/linux.js +0 -37
- package/src/util/arRPC/process/native/win32.js +0 -25
- package/src/util/arRPC/transports/ipc.js +0 -281
- package/src/util/arRPC/transports/websocket.js +0 -128
package/src/structures/Modal.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { setTimeout } = require('node:timers');
|
|
4
3
|
const BaseMessageComponent = require('./BaseMessageComponent');
|
|
5
|
-
const
|
|
4
|
+
const { InteractionTypes } = require('../util/Constants');
|
|
6
5
|
const SnowflakeUtil = require('../util/SnowflakeUtil');
|
|
7
6
|
const Util = require('../util/Util');
|
|
8
7
|
|
|
@@ -11,15 +10,7 @@ const Util = require('../util/Util');
|
|
|
11
10
|
*/
|
|
12
11
|
class Modal {
|
|
13
12
|
/**
|
|
14
|
-
* @
|
|
15
|
-
* @property {string} [customId] A unique string to be sent in the interaction when clicked
|
|
16
|
-
* @property {string} [title] The title to be displayed on this modal
|
|
17
|
-
* @property {Array<(MessageActionRow|MessageActionRowOptions)>} [components]
|
|
18
|
-
* Action rows containing interactive components for the modal (text input components)
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @param {Modal|ModalOptions} data Modal to clone or raw data
|
|
13
|
+
* @param {Object} data Modal to clone or raw data
|
|
23
14
|
* @param {Client} client The client constructing this Modal, if provided
|
|
24
15
|
*/
|
|
25
16
|
constructor(data = {}, client = null) {
|
|
@@ -33,106 +24,75 @@ class Modal {
|
|
|
33
24
|
* A unique string to be sent in the interaction when submitted
|
|
34
25
|
* @type {?string}
|
|
35
26
|
*/
|
|
36
|
-
this.customId = data.custom_id
|
|
27
|
+
this.customId = data.custom_id;
|
|
37
28
|
|
|
38
29
|
/**
|
|
39
30
|
* The title to be displayed on this modal
|
|
40
31
|
* @type {?string}
|
|
41
32
|
*/
|
|
42
|
-
this.title = data.title
|
|
33
|
+
this.title = data.title;
|
|
43
34
|
|
|
44
35
|
/**
|
|
45
36
|
* Timestamp (Discord epoch) of when this modal was created
|
|
46
|
-
* @type {
|
|
37
|
+
* @type {Snowflake}
|
|
47
38
|
*/
|
|
48
|
-
this.nonce = data.nonce
|
|
39
|
+
this.nonce = data.nonce;
|
|
49
40
|
|
|
50
41
|
/**
|
|
51
42
|
* ID slash / button / menu when modal is displayed
|
|
52
|
-
* @type {
|
|
43
|
+
* @type {Snowflake}
|
|
53
44
|
*/
|
|
54
|
-
this.id = data.id
|
|
45
|
+
this.id = data.id;
|
|
55
46
|
|
|
56
47
|
/**
|
|
57
48
|
* Application sending the modal
|
|
58
|
-
* @type {
|
|
49
|
+
* @type {Snowflake}
|
|
59
50
|
*/
|
|
60
|
-
this.
|
|
61
|
-
? {
|
|
62
|
-
...data.application,
|
|
63
|
-
bot: data.application.bot ? new User(client, data.application.bot, data.application) : null,
|
|
64
|
-
}
|
|
65
|
-
: null;
|
|
66
|
-
|
|
67
|
-
this.client = client;
|
|
68
|
-
}
|
|
51
|
+
this.applicationId = data.application.id;
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
get sendFromInteraction() {
|
|
76
|
-
if (this.id && this.nonce && this.client) {
|
|
77
|
-
const cache = this.client._interactionCache.get(this.nonce);
|
|
78
|
-
const channel = cache.guildId
|
|
79
|
-
? this.client.guilds.cache.get(cache.guildId)?.channels.cache.get(cache.channelId)
|
|
80
|
-
: this.client.channels.cache.get(cache.channelId);
|
|
81
|
-
return channel.interactions.cache.get(this.id);
|
|
82
|
-
}
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
53
|
+
/**
|
|
54
|
+
* The id of the channel the message was sent in
|
|
55
|
+
* @type {Snowflake}
|
|
56
|
+
*/
|
|
57
|
+
this.channelId = data.channel_id;
|
|
85
58
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
addComponents(...components) {
|
|
92
|
-
this.components.push(...components.flat(Infinity).map(c => BaseMessageComponent.create(c)));
|
|
93
|
-
return this;
|
|
94
|
-
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether this interaction has already been replied to
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
63
|
+
this.replied = false;
|
|
95
64
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*/
|
|
101
|
-
setComponents(...components) {
|
|
102
|
-
this.spliceComponents(0, this.components.length, components);
|
|
103
|
-
return this;
|
|
65
|
+
Object.defineProperty(this, 'client', {
|
|
66
|
+
value: client,
|
|
67
|
+
writable: false,
|
|
68
|
+
});
|
|
104
69
|
}
|
|
105
70
|
|
|
106
71
|
/**
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
109
|
-
* @
|
|
72
|
+
* The id of the guild the message was sent in, if any
|
|
73
|
+
* @type {?Snowflake}
|
|
74
|
+
* @readonly
|
|
110
75
|
*/
|
|
111
|
-
|
|
112
|
-
this.
|
|
113
|
-
return this;
|
|
76
|
+
get guildId() {
|
|
77
|
+
return this.client.channels.cache.get(this.channelId)?.guildId || null;
|
|
114
78
|
}
|
|
115
79
|
|
|
116
80
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @
|
|
119
|
-
* @
|
|
120
|
-
* @param {...MessageActionRowResolvable[]} [components] The replacing components
|
|
121
|
-
* @returns {Modal}
|
|
81
|
+
* The channel that the message was sent in
|
|
82
|
+
* @type {TextBasedChannels}
|
|
83
|
+
* @readonly
|
|
122
84
|
*/
|
|
123
|
-
|
|
124
|
-
this.
|
|
125
|
-
return this;
|
|
85
|
+
get channel() {
|
|
86
|
+
return this.client.channels.resolve(this.channelId);
|
|
126
87
|
}
|
|
127
88
|
|
|
128
89
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @
|
|
131
|
-
* @
|
|
90
|
+
* The guild the message was sent in (if in a guild channel)
|
|
91
|
+
* @type {?Guild}
|
|
92
|
+
* @readonly
|
|
132
93
|
*/
|
|
133
|
-
|
|
134
|
-
this.
|
|
135
|
-
return this;
|
|
94
|
+
get guild() {
|
|
95
|
+
return this.client.guilds.resolve(this.guildId) ?? this.channel?.guild ?? null;
|
|
136
96
|
}
|
|
137
97
|
|
|
138
98
|
toJSON() {
|
|
@@ -144,135 +104,57 @@ class Modal {
|
|
|
144
104
|
};
|
|
145
105
|
}
|
|
146
106
|
|
|
147
|
-
/**
|
|
148
|
-
* @typedef {Object} TextInputComponentReplyData
|
|
149
|
-
* @property {string} [customId] TextInputComponent custom id
|
|
150
|
-
* @property {string} [value] TextInputComponent value
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @typedef {Object} ModalReplyData
|
|
155
|
-
* @property {?GuildResolvable} [guild] Guild to send the modal to
|
|
156
|
-
* @property {?TextChannelResolvable} [channel] User to send the modal to
|
|
157
|
-
* @property {?TextInputComponentReplyData[]} [data] Reply data
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
107
|
/**
|
|
161
108
|
* Reply to this modal with data. (Event only)
|
|
162
|
-
* @
|
|
163
|
-
* @returns {Promise<InteractionResponse>}
|
|
109
|
+
* @returns {Promise<Message|Modal>}
|
|
164
110
|
* @example
|
|
165
111
|
* client.on('interactionModalCreate', modal => {
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* customId: 'code',
|
|
171
|
-
* value: '1+1'
|
|
172
|
-
* }, {
|
|
173
|
-
* customId: 'message',
|
|
174
|
-
* value: 'hello'
|
|
175
|
-
* }
|
|
176
|
-
* ],
|
|
177
|
-
* channel: 'id', // optional
|
|
178
|
-
* guild: 'id', // optional
|
|
179
|
-
* })
|
|
180
|
-
* // or 2.
|
|
181
|
-
* modal.components[0].components[0].setValue('1+1');
|
|
182
|
-
* modal.components[1].components[0].setValue('hello');
|
|
183
|
-
* modal.reply();
|
|
112
|
+
* // Modal > ActionRow > TextInput
|
|
113
|
+
* modal.components[0].components[0].setValue('1+1');
|
|
114
|
+
* modal.components[1].components[0].setValue('hello');
|
|
115
|
+
* modal.reply();
|
|
184
116
|
* })
|
|
185
117
|
*/
|
|
186
|
-
|
|
187
|
-
if (!this.
|
|
188
|
-
const data_cache = this.sendFromInteraction;
|
|
189
|
-
const guild = this.client.guilds.resolveId(data?.guild) || data_cache.guildId || null;
|
|
190
|
-
const channel = this.client.channels.resolveId(data?.channel) || data_cache.channelId;
|
|
191
|
-
if (!channel) throw new Error('Modal cannot reply (Missing data)');
|
|
192
|
-
// Add data to components
|
|
193
|
-
// this.components = [ MessageActionRow.components = [ TextInputComponent ] ]
|
|
194
|
-
// 5 MessageActionRow / Modal, 1 TextInputComponent / 1 MessageActionRow
|
|
195
|
-
if (Array.isArray(data?.data) && data?.data?.length > 0) {
|
|
196
|
-
for (let i = 0; i < this.components.length; i++) {
|
|
197
|
-
const value = data.data.find(d => d.customId == this.components[i].components[0].customId);
|
|
198
|
-
if (this.components[i].components[0].required == true && !value) {
|
|
199
|
-
throw new Error(
|
|
200
|
-
'MODAL_REQUIRED_FIELD_MISSING\n' +
|
|
201
|
-
`Required fieldId ${this.components[i].components[0].customId} missing value`,
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
if (value) {
|
|
205
|
-
if (value?.value?.includes('\n') && this.components[i].components[0].style == 'SHORT') {
|
|
206
|
-
throw new Error(
|
|
207
|
-
'MODAL_REPLY_DATA_INVALID\n' +
|
|
208
|
-
`value must be a single line, got multiple lines [Custom ID: ${value.customId}]`,
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
this.components[i].components[0].setValue(value.value);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
118
|
+
reply() {
|
|
119
|
+
if (!this.applicationId || !this.client || !this.channelId || this.replied) throw new Error('Modal cannot reply');
|
|
215
120
|
// Get Object
|
|
216
121
|
const dataFinal = this.toJSON();
|
|
217
122
|
dataFinal.components = dataFinal.components
|
|
218
123
|
.map(c => {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
delete c.components[0].style;
|
|
124
|
+
c.components[0] = {
|
|
125
|
+
type: c.components[0].type,
|
|
126
|
+
value: c.components[0].value,
|
|
127
|
+
custom_id: c.components[0].custom_id,
|
|
128
|
+
};
|
|
225
129
|
return c;
|
|
226
130
|
})
|
|
227
|
-
.filter(c =>
|
|
131
|
+
.filter(c => typeof c.components[0].value == 'string');
|
|
228
132
|
delete dataFinal.title;
|
|
229
133
|
const nonce = SnowflakeUtil.generate();
|
|
230
134
|
const postData = {
|
|
231
|
-
type:
|
|
232
|
-
application_id: this.
|
|
233
|
-
guild_id:
|
|
234
|
-
channel_id:
|
|
135
|
+
type: InteractionTypes.MODAL_SUBMIT, // Modal
|
|
136
|
+
application_id: this.applicationId,
|
|
137
|
+
guild_id: this.guildId,
|
|
138
|
+
channel_id: this.channelId,
|
|
235
139
|
data: dataFinal,
|
|
236
140
|
nonce,
|
|
237
|
-
session_id: this.client.
|
|
141
|
+
session_id: this.client.sessionId,
|
|
238
142
|
};
|
|
239
|
-
|
|
143
|
+
this.client.api.interactions.post({
|
|
240
144
|
data: postData,
|
|
241
145
|
});
|
|
242
|
-
this.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
if (data.status) {
|
|
255
|
-
resolve(data.metadata);
|
|
256
|
-
} else {
|
|
257
|
-
reject(
|
|
258
|
-
new Error('INTERACTION_ERROR', {
|
|
259
|
-
cause: data,
|
|
260
|
-
}),
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
const timeout = setTimeout(() => {
|
|
265
|
-
this.client.removeListener('interactionResponse', handler);
|
|
266
|
-
this.client.decrementMaxListeners();
|
|
267
|
-
reject(
|
|
268
|
-
new Error('INTERACTION_TIMEOUT', {
|
|
269
|
-
cause: postData,
|
|
270
|
-
}),
|
|
271
|
-
);
|
|
272
|
-
}, this.client.options.interactionTimeout).unref();
|
|
273
|
-
this.client.incrementMaxListeners();
|
|
274
|
-
this.client.on('interactionResponse', handler);
|
|
275
|
-
});
|
|
146
|
+
this.replied = true;
|
|
147
|
+
return Util.createPromiseInteraction(this.client, nonce, 5_000, true, this);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// TypeScript
|
|
151
|
+
/**
|
|
152
|
+
* Check data
|
|
153
|
+
* @type {boolean}
|
|
154
|
+
* @readonly
|
|
155
|
+
*/
|
|
156
|
+
get isMessage() {
|
|
157
|
+
return false;
|
|
276
158
|
}
|
|
277
159
|
}
|
|
278
160
|
|