detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
29 lines (28 loc) • 815 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Stickers = void 0;
const basecollection_1 = require("./basecollection");
const constants_1 = require("../constants");
;
/**
* Stickers Reference Collection
* @category Collections
*/
class Stickers extends basecollection_1.BaseClientGuildReferenceCache {
constructor() {
super(...arguments);
this.key = constants_1.DetritusKeys[constants_1.DiscordKeys.STICKERS];
}
insert(sticker) {
if (this.enabled) {
const guild = sticker.guild;
if (guild) {
guild.stickers.set(sticker.id, sticker);
}
}
}
get [Symbol.toStringTag]() {
return `Stickers (${this.size.toLocaleString()} items)`;
}
}
exports.Stickers = Stickers;