@exoplay/exobot-adapter-discord
Version:
exobot adapter for discord
51 lines (43 loc) • 1.04 kB
JavaScript
/*
{ splash: null,
id: '123123123',
icon: '123123123',
name: 'name' }
*/
/**
* Represents a Guild that the client only has limited information for - e.g. from invites.
*/
class PartialGuild {
constructor(client, data) {
/**
* The client that instantiated this PartialGuild
* @type {Client}
*/
this.client = client;
Object.defineProperty(this, 'client', { enumerable: false, configurable: false });
this.setup(data);
}
setup(data) {
/**
* The ID of this guild
* @type {string}
*/
this.id = data.id;
/**
* The name of this guild
* @type {string}
*/
this.name = data.name;
/**
* The hash of this guild's icon, or null if there is none.
* @type {?string}
*/
this.icon = data.icon;
/**
* The hash of the guild splash image, or null if no splash (VIP only)
* @type {?string}
*/
this.splash = data.splash;
}
}
module.exports = PartialGuild;