UNPKG

seyfert

Version:

The most advanced framework for discord bots

29 lines (28 loc) 767 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DiscordBase = void 0; const utils_1 = require("../../common/it/utils"); const Base_1 = require("./Base"); class DiscordBase extends Base_1.Base { id; constructor(client, /** Unique ID of the object */ data) { super(client); this.id = data.id; this.__patchThis(data); } /** * Create a timestamp for the current object. */ get createdTimestamp() { return Number((0, utils_1.snowflakeToTimestamp)(this.id)); } /** * createdAt gets the creation Date instace of the current object. */ get createdAt() { return new Date(this.createdTimestamp); } } exports.DiscordBase = DiscordBase;