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:
23
src/structures/InviteGuild.js
Normal file
23
src/structures/InviteGuild.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
const AnonymousGuild = require('./AnonymousGuild');
|
||||
const WelcomeScreen = require('./WelcomeScreen');
|
||||
|
||||
/**
|
||||
* Represents a guild received from an invite, includes welcome screen data if available.
|
||||
* @extends {AnonymousGuild}
|
||||
*/
|
||||
class InviteGuild extends AnonymousGuild {
|
||||
constructor(client, data) {
|
||||
super(client, data);
|
||||
|
||||
/**
|
||||
* The welcome screen for this invite guild
|
||||
* @type {?WelcomeScreen}
|
||||
*/
|
||||
this.welcomeScreen =
|
||||
typeof data.welcome_screen !== 'undefined' ? new WelcomeScreen(this, data.welcome_screen) : null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = InviteGuild;
|
||||
Reference in New Issue
Block a user