UNPKG

@evolvejs/core

Version:

An advanced Discord API wrapper with TS and JS support

32 lines (31 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceChannel = void 0; const __1 = require("../.."); const objex_1 = require("@evolvejs/objex"); const Channel_1 = require("./Channel"); class VoiceChannel extends Channel_1.Channel { constructor(data, client) { super(data.id, __1.CHANNELTYPES.Voice, client); this.overwrites = new objex_1.Objex(); Object.defineProperty(this, "data", { value: data, enumerable: false, writable: false, }); this._handle(); } _handle() { var _a; if (!this.data) return; this.guildId = this.client.guilds.get(this.data.guild_id); this.position = this.data.position; this.name = this.data.name; this.bitrate = this.data.bitrate; this.userLimit = this.data.user_limit; this.parentId = (_a = this.data.parent_id) !== null && _a !== void 0 ? _a : undefined; return this; } } exports.VoiceChannel = VoiceChannel;