UNPKG

@evolvejs/core

Version:

An advanced Discord API wrapper with TS and JS support

42 lines (41 loc) 1.35 kB
"use strict"; /* eslint-disable @typescript-eslint/no-non-null-assertion */ Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceState = void 0; const __1 = require("../.."); class VoiceState { constructor(data, client) { Object.defineProperty(this, "data", { value: data, enumerable: false, writable: false, }); Object.defineProperty(this, "client", { value: client, enumerable: false, writable: false, }); this._handle(); } _handle() { var _a; if (!this.data) return; this.guildId = this.data.guild_id; this.channelId = (_a = this.data.channel_id) !== null && _a !== void 0 ? _a : undefined; this.userId = this.data.user_id; this.member = this.data.member ? new __1.GuildMember(this.data.member) : undefined; this.sessionID = this.data.session_id; this.deaf = this.data.deaf; this.mute = this.data.mute; this.selfDeaf = this.data.self_deaf; this.selfMute = this.data.self_mute; this.selfStream = this.data.self_stream; this.selfVideo = this.data.self_video; this.supress = this.data.suppress; return this; } } exports.VoiceState = VoiceState;