UNPKG

@evolvejs/core

Version:

An advanced Discord API wrapper with TS and JS support

32 lines (31 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StoreChannel = void 0; const __1 = require("../.."); const objex_1 = require("@evolvejs/objex"); const Channel_1 = require("./Channel"); class StoreChannel extends Channel_1.Channel { constructor(data, client) { super(data.id, __1.CHANNELTYPES.Store, 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.data.guild_id; this.position = this.data.position; this.name = this.data.name; this.nsfw = this.data.nsfw; this.rateLimit = this.data.rate_limit_per_user; this.parentId = (_a = this.data.parent_id) !== null && _a !== void 0 ? _a : undefined; return this; } } exports.StoreChannel = StoreChannel;