feat: v13 VIEW_CREATOR_MONETIZATION_ANALYTICS
and USE_SOUNDBOARD
permissions
#9124
This commit is contained in:
parent
7f565e1848
commit
6ed56a153f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js-selfbot-v13",
|
"name": "discord.js-selfbot-v13",
|
||||||
"version": "2.13.2",
|
"version": "2.13.3",
|
||||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"types": "./typings/index.d.ts",
|
"types": "./typings/index.d.ts",
|
||||||
|
@ -139,14 +139,11 @@ class ClientUser extends User {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Edits the logged in client.
|
* Edits the logged in client.
|
||||||
* @param {ClientUserEditData} data The new data
|
* @param {ClientUserEditData} options The new data
|
||||||
* @returns {Promise<ClientUser>}
|
* @returns {Promise<ClientUser>}
|
||||||
*/
|
*/
|
||||||
async edit({ username, avatar }) {
|
async edit(options = {}) {
|
||||||
const data = await this.client.api
|
const data = await this.client.api.users('@me').patch({ data: options });
|
||||||
.users('@me')
|
|
||||||
.patch({ data: { username, avatar: avatar && (await DataResolver.resolveImage(avatar)) } });
|
|
||||||
|
|
||||||
this.client.token = data.token;
|
this.client.token = data.token;
|
||||||
const { updated } = this.client.actions.UserUpdate.handle(data);
|
const { updated } = this.client.actions.UserUpdate.handle(data);
|
||||||
return updated ?? this;
|
return updated ?? this;
|
||||||
@ -171,6 +168,7 @@ class ClientUser extends User {
|
|||||||
}
|
}
|
||||||
return this.edit({
|
return this.edit({
|
||||||
username,
|
username,
|
||||||
|
discriminator: this.discriminator,
|
||||||
password: this.client.password ? this.client.password : password,
|
password: this.client.password ? this.client.password : password,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -185,7 +183,8 @@ class ClientUser extends User {
|
|||||||
* .then(user => console.log(`New avatar set!`))
|
* .then(user => console.log(`New avatar set!`))
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
setAvatar(avatar) {
|
async setAvatar(avatar) {
|
||||||
|
avatar = avatar && (await DataResolver.resolveImage(avatar));
|
||||||
return this.edit({ avatar });
|
return this.edit({ avatar });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -255,6 +254,7 @@ class ClientUser extends User {
|
|||||||
}
|
}
|
||||||
return this.edit({
|
return this.edit({
|
||||||
discriminator,
|
discriminator,
|
||||||
|
username: this.username,
|
||||||
password: this.client.password ? this.client.password : password,
|
password: this.client.password ? this.client.password : password,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ class Options extends null {
|
|||||||
os_version: '10.0.22621',
|
os_version: '10.0.22621',
|
||||||
os_arch: 'x64',
|
os_arch: 'x64',
|
||||||
system_locale: 'en-US',
|
system_locale: 'en-US',
|
||||||
client_build_number: 184787, // 184787 (stable) but we don't want the captcha to be more difficult to solve
|
client_build_number: 189005,
|
||||||
native_build_number: 30921,
|
native_build_number: 30921,
|
||||||
client_event_source: null,
|
client_event_source: null,
|
||||||
design_id: 0,
|
design_id: 0,
|
||||||
|
@ -108,6 +108,8 @@ class Permissions extends BitField {
|
|||||||
* * `SEND_MESSAGES_IN_THREADS`
|
* * `SEND_MESSAGES_IN_THREADS`
|
||||||
* * `START_EMBEDDED_ACTIVITIES`
|
* * `START_EMBEDDED_ACTIVITIES`
|
||||||
* * `MODERATE_MEMBERS`
|
* * `MODERATE_MEMBERS`
|
||||||
|
* * `VIEW_CREATOR_MONETIZATION_ANALYTICS`
|
||||||
|
* * `USE_SOUNDBOARD`
|
||||||
* @type {Object<string, bigint>}
|
* @type {Object<string, bigint>}
|
||||||
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
||||||
*/
|
*/
|
||||||
@ -156,6 +158,8 @@ Permissions.FLAGS = {
|
|||||||
SEND_MESSAGES_IN_THREADS: 1n << 38n,
|
SEND_MESSAGES_IN_THREADS: 1n << 38n,
|
||||||
START_EMBEDDED_ACTIVITIES: 1n << 39n,
|
START_EMBEDDED_ACTIVITIES: 1n << 39n,
|
||||||
MODERATE_MEMBERS: 1n << 40n,
|
MODERATE_MEMBERS: 1n << 40n,
|
||||||
|
VIEW_CREATOR_MONETIZATION_ANALYTICS: 1n << 41n,
|
||||||
|
USE_SOUNDBOARD: 1n << 42n,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
@ -7001,7 +7001,9 @@ export type PermissionString =
|
|||||||
| 'SEND_MESSAGES_IN_THREADS'
|
| 'SEND_MESSAGES_IN_THREADS'
|
||||||
| 'START_EMBEDDED_ACTIVITIES'
|
| 'START_EMBEDDED_ACTIVITIES'
|
||||||
| 'MODERATE_MEMBERS'
|
| 'MODERATE_MEMBERS'
|
||||||
| 'MANAGE_EVENTS';
|
| 'MANAGE_EVENTS'
|
||||||
|
| 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
|
||||||
|
| 'USE_SOUNDBOARD';
|
||||||
|
|
||||||
export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
|
export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user