mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat(WelcomeScreen): welcome screens (#5490)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com> Co-authored-by: izexi <43889168+izexi@users.noreply.github.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -19,11 +19,16 @@ class Invite extends Base {
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
const InviteGuild = require('./InviteGuild');
|
||||
const Guild = require('./Guild');
|
||||
/**
|
||||
* The guild the invite is for
|
||||
* @type {?Guild}
|
||||
* The guild the invite is for including welcome screen data if present
|
||||
* @type {?(Guild|InviteGuild)}
|
||||
*/
|
||||
this.guild = data.guild ? this.client.guilds.add(data.guild, false) : null;
|
||||
this.guild = null;
|
||||
if (data.guild) {
|
||||
this.guild = data.guild instanceof Guild ? data.guild : new InviteGuild(this.client, data.guild);
|
||||
}
|
||||
|
||||
/**
|
||||
* The code for this invite
|
||||
|
||||
Reference in New Issue
Block a user