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/util/Formatters.js
CHANGED
|
@@ -18,7 +18,6 @@ const {
|
|
|
18
18
|
TimestampStyles,
|
|
19
19
|
underscore,
|
|
20
20
|
userMention,
|
|
21
|
-
chatInputApplicationCommandMention,
|
|
22
21
|
} = require('@discordjs/builders');
|
|
23
22
|
|
|
24
23
|
/**
|
|
@@ -66,7 +65,22 @@ Formatters.channelMention = channelMention;
|
|
|
66
65
|
* @returns {string}
|
|
67
66
|
* @static
|
|
68
67
|
*/
|
|
69
|
-
Formatters.chatInputApplicationCommandMention = chatInputApplicationCommandMention
|
|
68
|
+
Formatters.chatInputApplicationCommandMention = function chatInputApplicationCommandMention(
|
|
69
|
+
commandName,
|
|
70
|
+
subcommandGroupOrSubOrId,
|
|
71
|
+
subcommandNameOrId,
|
|
72
|
+
commandId,
|
|
73
|
+
) {
|
|
74
|
+
if (typeof commandId !== 'undefined') {
|
|
75
|
+
return `</${commandName} ${subcommandGroupOrSubOrId} ${subcommandNameOrId}:${commandId}>`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (typeof subcommandNameOrId !== 'undefined') {
|
|
79
|
+
return `</${commandName} ${subcommandGroupOrSubOrId}:${subcommandNameOrId}>`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return `</${commandName}:${subcommandGroupOrSubOrId}>`;
|
|
83
|
+
};
|
|
70
84
|
|
|
71
85
|
/**
|
|
72
86
|
* Wraps the content inside a code block with an optional language.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const BitField = require('./BitField');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Data structure that makes it easy to interact with an {@link InviteFlags#flags} bitfield.
|
|
7
|
+
* @extends {BitField}
|
|
8
|
+
*/
|
|
9
|
+
class InviteFlags extends BitField {}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @name InviteFlags
|
|
13
|
+
* @kind constructor
|
|
14
|
+
* @memberof InviteFlags
|
|
15
|
+
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Numeric the Discord invite flags. All available properties:
|
|
20
|
+
* * `GUEST`
|
|
21
|
+
* * `VIEWED`
|
|
22
|
+
* @type {Object}
|
|
23
|
+
*/
|
|
24
|
+
InviteFlags.FLAGS = {
|
|
25
|
+
GUEST: 1 << 0,
|
|
26
|
+
VIEWED: 1 << 1,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports = InviteFlags;
|
|
@@ -10,7 +10,7 @@ const { TypeError } = require('../errors/DJSError.js');
|
|
|
10
10
|
* @typedef {Function} SweepFilter
|
|
11
11
|
* @param {LimitedCollection} collection The collection being swept
|
|
12
12
|
* @returns {Function|null} Return `null` to skip sweeping, otherwise a function passed to `sweep()`,
|
|
13
|
-
* See {@link [Collection#sweep](https://discord.js.org/docs/packages/collection/stable/Collection:Class
|
|
13
|
+
* See {@link [Collection#sweep](https://discord.js.org/docs/packages/collection/stable/Collection:Class#sweep)}
|
|
14
14
|
* for the definition of this function.
|
|
15
15
|
*/
|
|
16
16
|
|
package/src/util/Options.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const { UserAgent } = require('./Constants');
|
|
4
4
|
const Intents = require('./Intents');
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
/**
|
|
7
7
|
* Rate limit data
|
|
8
8
|
* @typedef {Object} RateLimitData
|
|
@@ -28,28 +28,33 @@ const { defaultUA } = require('../util/Constants');
|
|
|
28
28
|
* @returns {Collection} A Collection used to store the cache of the manager.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* @typedef {Function} CaptchaSolver
|
|
33
|
+
* @param {Captcha} captcha Discord Captcha
|
|
34
|
+
* @param {string} UserAgent Current UserAgent
|
|
35
|
+
* @returns {Promise<string>} HCaptcha Token
|
|
36
|
+
* @example
|
|
37
|
+
* const Captcha = require("2captcha")
|
|
38
|
+
* // A new 'solver' instance with our API key
|
|
39
|
+
* const solver = new Captcha.Solver("<Your 2captcha api key>")
|
|
40
|
+
* function solveCaptcha(captcha, UA) {
|
|
41
|
+
* return solver.hcaptcha(captcha.captcha_sitekey, 'discord.com', {
|
|
42
|
+
* invisible: 1,
|
|
43
|
+
* userAgent: UA,
|
|
44
|
+
* data: captcha.captcha_rqdata,
|
|
45
|
+
* }).then(res => res.data)
|
|
46
|
+
* }
|
|
47
|
+
*/
|
|
48
|
+
|
|
31
49
|
/**
|
|
32
50
|
* Options for a client.
|
|
33
51
|
* @typedef {Object} ClientOptions
|
|
34
|
-
* @property {number
|
|
35
|
-
*
|
|
36
|
-
*
|
|
52
|
+
* @property {number} [DMChannelVoiceStatusSync=0] The amount of time in milliseconds that the Client to register the event with each DM channel (0=Disable)
|
|
53
|
+
* @property {number} [captchaRetryLimit=3] Captcha retry limit
|
|
54
|
+
* @property {CaptchaSolver} [captchaSolver] Captcha Solver
|
|
37
55
|
* @property {number} [closeTimeout=5000] The amount of time in milliseconds to wait for the close frame to be received
|
|
38
|
-
* from the WebSocket.
|
|
39
|
-
*
|
|
40
|
-
* @property {boolean} [syncStatus=true] Sync state with Discord Client
|
|
41
|
-
* @property {boolean} [patchVoice=false] Automatically patch @discordjs/voice module (support for call)
|
|
42
|
-
* @property {string} [captchaService=null] Captcha service to use for solving captcha {@link captchaServices}
|
|
43
|
-
* @property {string} [captchaKey=null] Captcha service key
|
|
44
|
-
* @property {string} [captchaRetryLimit=3] Captcha retry limit
|
|
45
|
-
* @property {string} [captchaWithProxy=false] Whether to use proxy for captcha solving
|
|
46
|
-
* @property {string} [password=null] Your Discord account password
|
|
47
|
-
* @property {boolean} [usingNewAttachmentAPI=true] Use new attachment API
|
|
48
|
-
* @property {string} [interactionTimeout=15000] The amount of time in milliseconds to wait for an interaction response, before rejecting
|
|
49
|
-
* @property {boolean} [autoRedeemNitro=false] Automaticlly redeems nitro codes <NOTE: there is no cooldown on the auto redeem>
|
|
50
|
-
* @property {string} [proxy] Proxy to use for the WebSocket + REST connection (proxy-agent uri type) {@link https://www.npmjs.com/package/proxy-agent}.
|
|
51
|
-
* @property {boolean} [DMSync=false] Automatically synchronize call status (DM and group) at startup (event synchronization) [Warning: May cause rate limit to gateway)
|
|
52
|
-
* @property {number} [shardCount=1] The total amount of shards used by all processes of this bot
|
|
56
|
+
* from the WebSocket.
|
|
57
|
+
* <info>Don't have this too high/low. It's best to have it between 2000-6000 ms.</info>
|
|
53
58
|
* (e.g. recommended shard count, shard count of the ShardingManager)
|
|
54
59
|
* @property {CacheFactory} [makeCache] Function to create a cache.
|
|
55
60
|
* You can use your own function, or the {@link Options} class to customize the Collection used for the cache.
|
|
@@ -84,25 +89,12 @@ const { defaultUA } = require('../util/Constants');
|
|
|
84
89
|
* @property {number} [retryLimit=1] How many times to retry on 5XX errors
|
|
85
90
|
* (Infinity for an indefinite amount of retries)
|
|
86
91
|
* @property {boolean} [failIfNotExists=true] Default value for {@link ReplyMessageOptions#failIfNotExists}
|
|
87
|
-
* @property {
|
|
88
|
-
* [
|
|
89
|
-
*
|
|
90
|
-
* @property {IntentsResolvable} [intents=131071] Intents to enable for this connection (but not using)
|
|
91
|
-
* @property {number} [waitGuildTimeout=15000] Time in milliseconds that Clients with the GUILDS intent should wait for
|
|
92
|
-
* @property {number} [messageCreateEventGuildTimeout=100] Time in milliseconds that Clients to register for messages with each guild
|
|
93
|
-
* missing guilds to be received before starting the bot. If not specified, the default is 100 milliseconds.
|
|
92
|
+
* @property {PresenceData} [presence={ status: 'online', since: 0, activities: [], afk: false }] Presence data to use upon login
|
|
93
|
+
* @property {number} [waitGuildTimeout=15_000] Time in milliseconds that Clients with the GUILDS intent should wait for
|
|
94
|
+
* missing guilds to be received before starting the bot. If not specified, the default is 15 seconds.
|
|
94
95
|
* @property {SweeperOptions} [sweepers={}] Options for cache sweeping
|
|
95
96
|
* @property {WebsocketOptions} [ws] Options for the WebSocket
|
|
96
97
|
* @property {HTTPOptions} [http] HTTP options
|
|
97
|
-
* @property {CustomCaptchaSolver} [captchaSolver] Function to solve a captcha (custom)
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Function to solve a captcha
|
|
102
|
-
* @typedef {function} CustomCaptchaSolver
|
|
103
|
-
* @param {Captcha} captcha The captcha to solve
|
|
104
|
-
* @param {string} userAgent The user agent to use for the request
|
|
105
|
-
* @returns {Promise<string>} hcaptcha token
|
|
106
98
|
*/
|
|
107
99
|
|
|
108
100
|
/**
|
|
@@ -124,6 +116,7 @@ const { defaultUA } = require('../util/Constants');
|
|
|
124
116
|
/**
|
|
125
117
|
* WebSocket options (these are left as snake_case to match the API)
|
|
126
118
|
* @typedef {Object} WebsocketOptions
|
|
119
|
+
* @property {AgentOptions} [agent={}] HTTPS Agent options (WS Proxy)
|
|
127
120
|
* @property {boolean} [compress=false] Whether to compress data sent on the connection
|
|
128
121
|
* @property {WebSocketProperties} [properties] Properties to identify the client with
|
|
129
122
|
*/
|
|
@@ -158,24 +151,13 @@ class Options extends null {
|
|
|
158
151
|
*/
|
|
159
152
|
static createDefault() {
|
|
160
153
|
return {
|
|
161
|
-
|
|
162
|
-
captchaSolver: captcha => Promise.reject(new Error('CAPTCHA_SOLVER_NOT_IMPLEMENTED', captcha)),
|
|
163
|
-
closeTimeout: 5_000,
|
|
164
|
-
checkUpdate: true,
|
|
165
|
-
syncStatus: true,
|
|
166
|
-
autoRedeemNitro: false,
|
|
167
|
-
captchaService: '',
|
|
168
|
-
captchaKey: null,
|
|
154
|
+
DMChannelVoiceStatusSync: 0,
|
|
169
155
|
captchaRetryLimit: 3,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
patchVoice: false,
|
|
173
|
-
password: null,
|
|
174
|
-
usingNewAttachmentAPI: true,
|
|
175
|
-
interactionTimeout: 15_000,
|
|
156
|
+
captchaSolver: () => Promise.reject(new Error('CAPTCHA_SOLVER_NOT_IMPLEMENTED')),
|
|
157
|
+
closeTimeout: 5_000,
|
|
176
158
|
waitGuildTimeout: 15_000,
|
|
177
|
-
messageCreateEventGuildTimeout: 100,
|
|
178
159
|
shardCount: 1,
|
|
160
|
+
shards: [0],
|
|
179
161
|
makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings),
|
|
180
162
|
messageCacheLifetime: 0,
|
|
181
163
|
messageSweepInterval: 0,
|
|
@@ -188,44 +170,38 @@ class Options extends null {
|
|
|
188
170
|
retryLimit: 1,
|
|
189
171
|
restTimeOffset: 500,
|
|
190
172
|
restSweepInterval: 60,
|
|
191
|
-
failIfNotExists:
|
|
192
|
-
userAgentSuffix: [],
|
|
173
|
+
failIfNotExists: true,
|
|
193
174
|
presence: { status: 'online', since: 0, activities: [], afk: false },
|
|
194
175
|
sweepers: {},
|
|
195
|
-
proxy: '',
|
|
196
176
|
ws: {
|
|
197
|
-
//
|
|
198
|
-
// capabilities: 16381,
|
|
177
|
+
capabilities: 0, // https://discord-userdoccers.vercel.app/topics/gateway#gateway-capabilities
|
|
199
178
|
properties: {
|
|
200
179
|
os: 'Windows',
|
|
201
|
-
browser: '
|
|
180
|
+
browser: 'Chrome',
|
|
181
|
+
device: '',
|
|
182
|
+
system_locale: 'vi-VN',
|
|
183
|
+
browser_user_agent: UserAgent,
|
|
184
|
+
browser_version: '108.0.5359.215',
|
|
185
|
+
os_version: '10',
|
|
186
|
+
referrer: '',
|
|
187
|
+
referring_domain: '',
|
|
188
|
+
referrer_current: '',
|
|
189
|
+
referring_domain_current: '',
|
|
202
190
|
release_channel: 'stable',
|
|
203
|
-
|
|
204
|
-
os_version: '10.0.19045',
|
|
205
|
-
os_arch: 'x64',
|
|
206
|
-
system_locale: 'en-US',
|
|
207
|
-
browser_user_agent: defaultUA,
|
|
208
|
-
browser_version: '22.3.12',
|
|
209
|
-
client_build_number: 213510,
|
|
210
|
-
native_build_number: 34898,
|
|
191
|
+
client_build_number: 306208,
|
|
211
192
|
client_event_source: null,
|
|
212
193
|
},
|
|
213
194
|
compress: false,
|
|
214
195
|
client_state: {
|
|
215
196
|
guild_versions: {},
|
|
216
|
-
highest_last_message_id: '0',
|
|
217
|
-
read_state_version: 0,
|
|
218
|
-
user_guild_settings_version: -1,
|
|
219
|
-
user_settings_version: -1,
|
|
220
|
-
private_channels_version: '0',
|
|
221
|
-
api_code_version: 0,
|
|
222
197
|
},
|
|
223
198
|
version: 9,
|
|
199
|
+
agent: {},
|
|
224
200
|
},
|
|
225
201
|
http: {
|
|
226
202
|
agent: {},
|
|
227
203
|
headers: {
|
|
228
|
-
'User-Agent':
|
|
204
|
+
'User-Agent': UserAgent,
|
|
229
205
|
},
|
|
230
206
|
version: 9,
|
|
231
207
|
api: 'https://discord.com/api',
|
|
@@ -326,7 +302,6 @@ class Options extends null {
|
|
|
326
302
|
static get defaultMakeCacheSettings() {
|
|
327
303
|
return {
|
|
328
304
|
MessageManager: 200,
|
|
329
|
-
/*
|
|
330
305
|
ChannelManager: {
|
|
331
306
|
sweepInterval: 3600,
|
|
332
307
|
sweepFilter: require('./Util').archivedThreadSweepFilter(),
|
|
@@ -339,7 +314,6 @@ class Options extends null {
|
|
|
339
314
|
sweepInterval: 3600,
|
|
340
315
|
sweepFilter: require('./Util').archivedThreadSweepFilter(),
|
|
341
316
|
},
|
|
342
|
-
*/
|
|
343
317
|
};
|
|
344
318
|
}
|
|
345
319
|
}
|
package/src/util/Permissions.js
CHANGED
|
@@ -110,6 +110,14 @@ class Permissions extends BitField {
|
|
|
110
110
|
* * `MODERATE_MEMBERS`
|
|
111
111
|
* * `VIEW_CREATOR_MONETIZATION_ANALYTICS`
|
|
112
112
|
* * `USE_SOUNDBOARD`
|
|
113
|
+
* * `CREATE_GUILD_EXPRESSIONS`
|
|
114
|
+
* * `CREATE_EVENTS`
|
|
115
|
+
* * `USE_EXTERNAL_SOUNDS`
|
|
116
|
+
* * `SEND_VOICE_MESSAGES`
|
|
117
|
+
* * `USE_CLYDE_AI`
|
|
118
|
+
* * `SET_VOICE_CHANNEL_STATUS`
|
|
119
|
+
* * `SEND_POLLS`
|
|
120
|
+
* * `USE_EXTERNAL_APPS`
|
|
113
121
|
* @type {Object<string, bigint>}
|
|
114
122
|
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
|
115
123
|
*/
|
|
@@ -160,7 +168,14 @@ Permissions.FLAGS = {
|
|
|
160
168
|
MODERATE_MEMBERS: 1n << 40n,
|
|
161
169
|
VIEW_CREATOR_MONETIZATION_ANALYTICS: 1n << 41n,
|
|
162
170
|
USE_SOUNDBOARD: 1n << 42n,
|
|
171
|
+
CREATE_GUILD_EXPRESSIONS: 1n << 43n,
|
|
172
|
+
CREATE_EVENTS: 1n << 44n,
|
|
173
|
+
USE_EXTERNAL_SOUNDS: 1n << 45n,
|
|
163
174
|
SEND_VOICE_MESSAGES: 1n << 46n,
|
|
175
|
+
USE_CLYDE_AI: 1n << 47n,
|
|
176
|
+
SET_VOICE_CHANNEL_STATUS: 1n << 48n,
|
|
177
|
+
SEND_POLLS: 1n << 49n,
|
|
178
|
+
USE_EXTERNAL_APPS: 1n << 50n,
|
|
164
179
|
};
|
|
165
180
|
|
|
166
181
|
/**
|
|
@@ -20,12 +20,14 @@ class PurchasedFlags extends BitField {}
|
|
|
20
20
|
* * `NITRO_CLASSIC`
|
|
21
21
|
* * `NITRO`
|
|
22
22
|
* * `GUILD_BOOST`
|
|
23
|
+
* * `NITRO_BASIC`
|
|
23
24
|
* @type {Object}
|
|
24
25
|
*/
|
|
25
26
|
PurchasedFlags.FLAGS = {
|
|
26
27
|
NITRO_CLASSIC: 1 << 0,
|
|
27
28
|
NITRO: 1 << 1,
|
|
28
29
|
GUILD_BOOST: 1 << 2,
|
|
30
|
+
NITRO_BASIC: 1 << 3,
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
module.exports = PurchasedFlags;
|