mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Added guildChannel.createInvite();
This commit is contained in:
45
src/structures/PartialGuild.js
Normal file
45
src/structures/PartialGuild.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
{ 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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PartialGuild;
|
||||
Reference in New Issue
Block a user