mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat: add support for GuildScheduledEvent (#6493)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
const { GuildScheduledEvent } = require('./GuildScheduledEvent');
|
||||
const IntegrationApplication = require('./IntegrationApplication');
|
||||
const InviteStageInstance = require('./InviteStageInstance');
|
||||
const { Error } = require('../errors');
|
||||
@@ -208,6 +209,16 @@ class Invite extends Base {
|
||||
} else {
|
||||
this.stageInstance ??= null;
|
||||
}
|
||||
|
||||
if ('guild_scheduled_event' in data) {
|
||||
/**
|
||||
* The guild scheduled event data if there is a {@link GuildScheduledEvent} in the channel this invite is for
|
||||
* @type {?GuildScheduledEvent}
|
||||
*/
|
||||
this.guildScheduledEvent = new GuildScheduledEvent(this.client, data.guild_scheduled_event);
|
||||
} else {
|
||||
this.guildScheduledEvent ??= null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user