27 lines
531 B
JavaScript
27 lines
531 B
JavaScript
const { Structures } = require('discord.js');
|
|
|
|
const User = Structures.extend('User', (User) => {
|
|
|
|
class ExtendedUser extends User {
|
|
|
|
constructor(...args) {
|
|
|
|
super(...args);
|
|
|
|
|
|
this._settings = null; //internal cache of current users' settings; should ALWAYS stay the same as database.
|
|
this._cached = Date.now();
|
|
|
|
}
|
|
|
|
get timeSinceCached() {
|
|
return Date.now()-this._cached;
|
|
}
|
|
|
|
}
|
|
|
|
return ExtendedUser;
|
|
|
|
});
|
|
|
|
module.exports = User; |