detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
27 lines (26 loc) • 642 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Notes = void 0;
const basecollection_1 = require("./basecollection");
;
/**
* Notes Collection
* (Bots cannot fill this)
* @category Collections
*/
class Notes extends basecollection_1.BaseClientCollection {
insert(userId, note) {
if (this.enabled) {
if (note) {
this.set(userId, note);
}
else {
this.delete(userId);
}
}
}
get [Symbol.toStringTag]() {
return `Notes (${this.size.toLocaleString()} items)`;
}
}
exports.Notes = Notes;