feat(VoiceState): add user prop.

This commit is contained in:
March 7th 2022-07-16 00:50:27 +07:00
parent dac47563c6
commit 156cdd4918
4 changed files with 13 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "discord.js-selfbot-v13",
"version": "2.3.76",
"version": "2.3.77",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "discord.js-selfbot-v13",
"version": "2.3.76",
"version": "2.3.77",
"license": "GNU General Public License v3.0",
"dependencies": {
"@aikochan2k6/qrcode-terminal": "^0.12.0",

View File

@ -1,6 +1,6 @@
{
"name": "discord.js-selfbot-v13",
"version": "2.3.76",
"version": "2.3.77",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js",
"types": "./typings/index.d.ts",

View File

@ -136,6 +136,15 @@ class VoiceState extends Base {
return this.guild.members.cache.get(this.id) ?? null;
}
/**
* The user that this voice state belongs to
* @type {?User}
* @readonly
*/
get user() {
return this.guild.client.users.cache.get(this.id) ?? null;
}
/**
* The channel that the member is connected to
* @type {?(VoiceChannel|StageChannel)}

2
typings/index.d.ts vendored
View File

@ -3041,7 +3041,7 @@ export class VoiceState extends Base {
public selfVideo: boolean | null;
public suppress: boolean;
public requestToSpeakTimestamp: number | null;
public readonly user: User | null;
public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
public disconnect(reason?: string): Promise<GuildMember>;