38 lines
857 B
JavaScript
38 lines
857 B
JavaScript
const { Structures } = require('discord.js');
|
|
|
|
const Guild = Structures.extend('Guild', (Guild) => {
|
|
|
|
class ExtendedGuild extends Guild {
|
|
|
|
constructor(...args) {
|
|
|
|
super(...args);
|
|
|
|
this._settings = null; //internal cache of current guild's settings; should ALWAYS stay the same as database.
|
|
|
|
}
|
|
|
|
async resolveMembers(members, strict = false) {
|
|
|
|
return await this.client.resolver.resolveMembers(members, this, strict);
|
|
}
|
|
|
|
async resolveChannels(channels, strict = false) {
|
|
|
|
return await this.client.resolver.resolveChannels(channels, this, strict);
|
|
|
|
}
|
|
|
|
async resolveRoles(roles, strict = false) {
|
|
|
|
return await this.client.resolver.resolveRoles(roles, this, strict);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ExtendedGuild;
|
|
|
|
});
|
|
|
|
module.exports = Guild; |