Remove partial classes (#1794)

* remove partial objects

* remove partial evil

* Update Invite.js

* Update Invite.js
This commit is contained in:
Gus Caplan
2017-08-17 11:49:41 -07:00
committed by Crawl
parent fff8b764af
commit 9b97fe292f
6 changed files with 12 additions and 110 deletions

View File

@@ -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