UNPKG

hennus-api

Version:

Esta es una libreria para el bot Hennus

44 lines (43 loc) 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuildEmojis = void 0; const data_1 = require("../base/data"); const user_1 = require("../user"); class GuildEmojis extends data_1.BaseData { constructor(emoji, guild, client) { super(client); this.id = undefined; this.animated = false; this._roles = []; this.available = false; this.managed = false; this.require_colons = false; this.name = emoji.name; this.id = emoji.id ?? undefined; this.animated = emoji.animated ?? false; this._roles = emoji.roles ?? []; this.available = emoji.available ?? false; this.managed = emoji.managed ?? false; this.require_colons = emoji.require_colons ?? false; this.user = emoji.user ? new user_1.User(emoji.user, client) : undefined; Object.defineProperty(this, "guild", { value: guild }); } ; get roles() { return this.guild.roles.searchlist(this._roles).map((x) => x); } ; toString() { if (this.animated && this.id && this.name) return `<a:${this.name}:${this.id}>`; else if (!this.animated && this.id && this.name) return `<:${this.name}:${this.id}>`; else if (!this.animated && !this.id && this.name) return this.name; else return ""; } ; } exports.GuildEmojis = GuildEmojis; ;