@evolvejs/core
Version:
An advanced Discord API wrapper with TS and JS support
33 lines (32 loc) • 999 B
JavaScript
"use strict";
/* eslint-disable no-mixed-spaces-and-tabs */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Emoji = void 0;
const objex_1 = require("@evolvejs/objex");
const __1 = require("../..");
class Emoji {
constructor(data) {
this.roles = new objex_1.Objex();
Object.defineProperty(this, "data", {
value: data,
enumerable: false,
writable: false,
});
this._handle();
}
_handle() {
if (!this.data)
return;
this.id = this.data.id;
this.name = this.data.name;
if (this.data.roles)
this.data.roles.forEach((i) => this.roles.set(i.id, new __1.Role(i)));
this.user = new __1.User(this.data.user);
this.reqColons = this.data.require_colons;
this.managed = this.data.managed;
this.animated = this.data.animated;
this.available = this.data.available;
return this;
}
}
exports.Emoji = Emoji;