djs-selfbot-v13 1.0.0 → 3.1.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.
- package/README.md +15 -42
- package/package.json +9 -24
- package/src/client/BaseClient.js +2 -3
- package/src/client/Client.js +187 -539
- 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 +1 -1
- package/src/client/actions/GuildMemberUpdate.js +1 -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 +7 -0
- package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
- package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
- package/src/client/websocket/handlers/READY.js +47 -137
- package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
- package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +6 -4
- 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 +15 -20
- package/src/errors/Messages.js +24 -69
- package/src/index.js +12 -43
- package/src/managers/ApplicationCommandManager.js +9 -12
- package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
- package/src/managers/ChannelManager.js +3 -4
- package/src/managers/ClientUserSettingManager.js +161 -279
- package/src/managers/GuildBanManager.js +1 -1
- package/src/managers/GuildChannelManager.js +2 -0
- package/src/managers/GuildForumThreadManager.js +22 -28
- package/src/managers/GuildMemberManager.js +40 -216
- 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 +81 -74
- 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 +42 -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 +12 -8
- package/src/structures/ClientUser.js +124 -310
- 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 +250 -202
- 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 +4 -46
- package/src/structures/MessageReaction.js +1 -1
- package/src/structures/MessageSelectMenu.js +1 -252
- package/src/structures/Modal.js +75 -180
- package/src/structures/Presence.js +2 -2
- package/src/structures/RichPresence.js +14 -34
- 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 +117 -345
- 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 +411 -256
- package/src/util/ApplicationFlags.js +1 -1
- package/src/util/AttachmentFlags.js +38 -0
- package/src/util/Constants.js +106 -284
- 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 -68
- package/src/util/Permissions.js +5 -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 +76 -36
- package/typings/enums.d.ts +18 -73
- package/typings/index.d.ts +874 -1225
- package/typings/rawDataTypes.d.ts +68 -9
- package/LICENSE +0 -674
- 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/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
|
@@ -5,14 +5,12 @@ import {
|
|
|
5
5
|
APIApplication,
|
|
6
6
|
APIApplicationCommand,
|
|
7
7
|
APIApplicationCommandInteraction,
|
|
8
|
-
APIAttachment,
|
|
9
8
|
APIAuditLog,
|
|
10
9
|
APIAuditLogEntry,
|
|
11
10
|
APIBan,
|
|
12
11
|
APIChannel,
|
|
13
12
|
APIEmoji,
|
|
14
13
|
APIExtendedInvite,
|
|
15
|
-
APIGuild,
|
|
16
14
|
APIGuildIntegration,
|
|
17
15
|
APIGuildIntegrationApplication,
|
|
18
16
|
APIGuildMember,
|
|
@@ -76,21 +74,26 @@ import {
|
|
|
76
74
|
RESTPostAPIWebhookWithTokenJSONBody,
|
|
77
75
|
Snowflake,
|
|
78
76
|
APIGuildScheduledEvent,
|
|
79
|
-
APIActionRowComponent,
|
|
80
77
|
APITextInputComponent,
|
|
81
|
-
APIModalActionRowComponent,
|
|
82
78
|
APIModalSubmitInteraction,
|
|
79
|
+
Permissions,
|
|
80
|
+
GuildDefaultMessageNotifications,
|
|
81
|
+
GuildExplicitContentFilter,
|
|
82
|
+
GuildMFALevel,
|
|
83
|
+
GuildSystemChannelFlags,
|
|
84
|
+
GuildPremiumTier,
|
|
85
|
+
GuildNSFWLevel,
|
|
86
|
+
GuildHubType,
|
|
87
|
+
GuildVerificationLevel,
|
|
88
|
+
GuildFeature,
|
|
83
89
|
LocalizationMap,
|
|
84
90
|
} from 'discord-api-types/v9';
|
|
85
|
-
import { GuildChannel, Guild, PermissionOverwrites
|
|
86
|
-
|
|
91
|
+
import { GuildChannel, Guild, PermissionOverwrites } from '.';
|
|
87
92
|
import type {
|
|
88
93
|
AutoModerationActionTypes,
|
|
89
94
|
AutoModerationRuleEventTypes,
|
|
90
95
|
AutoModerationRuleKeywordPresetTypes,
|
|
91
96
|
AutoModerationRuleTriggerTypes,
|
|
92
|
-
InteractionTypes,
|
|
93
|
-
MessageComponentTypes,
|
|
94
97
|
ApplicationRoleConnectionMetadataTypes,
|
|
95
98
|
} from './enums';
|
|
96
99
|
|
|
@@ -170,7 +173,20 @@ export type RawInviteStageInstance = APIInviteStageInstance;
|
|
|
170
173
|
export type RawMessageData = APIMessage;
|
|
171
174
|
export type RawPartialMessageData = GatewayMessageUpdateDispatchData;
|
|
172
175
|
|
|
173
|
-
export
|
|
176
|
+
export interface RawMessageAttachmentData {
|
|
177
|
+
id: Snowflake;
|
|
178
|
+
filename: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
content_type?: string;
|
|
181
|
+
size: number;
|
|
182
|
+
url: string;
|
|
183
|
+
proxy_url: string;
|
|
184
|
+
height?: number | null;
|
|
185
|
+
width?: number | null;
|
|
186
|
+
ephemeral?: boolean;
|
|
187
|
+
duration_secs?: number;
|
|
188
|
+
waveform?: string;
|
|
189
|
+
}
|
|
174
190
|
|
|
175
191
|
export type RawMessagePayloadData =
|
|
176
192
|
| RESTPostAPIChannelMessageJSONBody
|
|
@@ -271,6 +287,49 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
|
|
271
287
|
allow_list?: string[];
|
|
272
288
|
regex_patterns?: string[];
|
|
273
289
|
mention_total_limit?: number;
|
|
290
|
+
mention_raid_protection_enabled?: boolean;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface APIGuild extends APIPartialGuild {
|
|
294
|
+
icon_hash?: string | null;
|
|
295
|
+
discovery_splash: string | null;
|
|
296
|
+
owner?: boolean;
|
|
297
|
+
owner_id: Snowflake;
|
|
298
|
+
permissions?: Permissions;
|
|
299
|
+
region: string;
|
|
300
|
+
afk_channel_id: Snowflake | null;
|
|
301
|
+
afk_timeout: number;
|
|
302
|
+
widget_enabled?: boolean;
|
|
303
|
+
widget_channel_id?: Snowflake | null;
|
|
304
|
+
verification_level: GuildVerificationLevel;
|
|
305
|
+
default_message_notifications: GuildDefaultMessageNotifications;
|
|
306
|
+
explicit_content_filter: GuildExplicitContentFilter;
|
|
307
|
+
roles: APIRole[];
|
|
308
|
+
emojis: APIEmoji[];
|
|
309
|
+
features: GuildFeature[];
|
|
310
|
+
mfa_level: GuildMFALevel;
|
|
311
|
+
application_id: Snowflake | null;
|
|
312
|
+
system_channel_id: Snowflake | null;
|
|
313
|
+
system_channel_flags: GuildSystemChannelFlags;
|
|
314
|
+
rules_channel_id: Snowflake | null;
|
|
315
|
+
max_presences?: number | null;
|
|
316
|
+
max_members?: number;
|
|
317
|
+
vanity_url_code: string | null;
|
|
318
|
+
description: string | null;
|
|
319
|
+
banner: string | null;
|
|
320
|
+
premium_tier: GuildPremiumTier;
|
|
321
|
+
premium_subscription_count?: number;
|
|
322
|
+
preferred_locale: string;
|
|
323
|
+
public_updates_channel_id: Snowflake | null;
|
|
324
|
+
max_video_channel_users?: number;
|
|
325
|
+
approximate_member_count?: number;
|
|
326
|
+
approximate_presence_count?: number;
|
|
327
|
+
welcome_screen?: APIGuildWelcomeScreen;
|
|
328
|
+
nsfw_level: GuildNSFWLevel;
|
|
329
|
+
stickers: APISticker[];
|
|
330
|
+
premium_progress_bar_enabled: boolean;
|
|
331
|
+
hub_type: GuildHubType | null;
|
|
332
|
+
safety_alerts_channel_id: Snowflake | null;
|
|
274
333
|
}
|
|
275
334
|
|
|
276
335
|
export interface APIApplicationRoleConnectionMetadata {
|