mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Clean up a bunch of stuff
- Channel typing data is now a Map - Client properties on structures are now non-enumerable and non-configurable
This commit is contained in:
@@ -15,30 +15,35 @@ class PartialGuild {
|
||||
* @type {Client}
|
||||
*/
|
||||
this.client = client;
|
||||
Object.defineProperty(this, 'client', { enumerable: false, configurable: false });
|
||||
|
||||
this.setup(data);
|
||||
}
|
||||
|
||||
setup(data) {
|
||||
/**
|
||||
* The hash of the guild splash image, or null if no splash (VIP only)
|
||||
* @type {?string}
|
||||
*/
|
||||
this.splash = data.splash;
|
||||
/**
|
||||
* The ID of this guild
|
||||
* @type {string}
|
||||
*/
|
||||
this.id = data.id;
|
||||
/**
|
||||
* The hash of this guild's icon, or null if there is none.
|
||||
* @type {?string}
|
||||
*/
|
||||
this.icon = data.icon;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user