mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Remove partial classes (#1794)
* remove partial objects * remove partial evil * Update Invite.js * Update Invite.js
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
const PartialGuild = require('./PartialGuild');
|
||||
const PartialGuildChannel = require('./PartialGuildChannel');
|
||||
const Constants = require('../util/Constants');
|
||||
|
||||
/**
|
||||
@@ -20,12 +18,14 @@ class Invite {
|
||||
}
|
||||
|
||||
setup(data) {
|
||||
const Guild = require('./Guild');
|
||||
const Channel = require('./Channel');
|
||||
|
||||
/**
|
||||
* The guild the invite is for. If this guild is already known, this will be a guild object. If the guild is
|
||||
* unknown, this will be a PartialGuild object
|
||||
* @type {Guild|PartialGuild}
|
||||
* The guild the invite is for
|
||||
* @type {Guild}
|
||||
*/
|
||||
this.guild = this.client.guilds.get(data.guild.id) || new PartialGuild(this.client, data.guild);
|
||||
this.guild = this.client.guilds.get(data.guild.id) || new Guild(this.client, data.guild);
|
||||
|
||||
/**
|
||||
* The code for this invite
|
||||
@@ -90,11 +90,10 @@ class Invite {
|
||||
}
|
||||
|
||||
/**
|
||||
* The channel the invite is for. If this channel is already known, this will be a GuildChannel object.
|
||||
* If the channel is unknown, this will be a PartialGuildChannel object.
|
||||
* @type {GuildChannel|PartialGuildChannel}
|
||||
* The channel the invite is for
|
||||
* @type {GuildChannel}
|
||||
*/
|
||||
this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);
|
||||
this.channel = this.client.channels.get(data.channel.id) || Channel.create(this.client, data.channel, this.guild);
|
||||
|
||||
/**
|
||||
* The timestamp the invite was created at
|
||||
|
||||
Reference in New Issue
Block a user