mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23: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:
@@ -100,6 +100,16 @@ class GenericAction {
|
||||
}
|
||||
return this.getUser(data);
|
||||
}
|
||||
|
||||
getScheduledEvent(data, guild) {
|
||||
const id = data.guild_scheduled_event_id ?? data.id;
|
||||
return this.getPayload(
|
||||
{ id, guild_id: data.guild_id ?? guild.id },
|
||||
guild.scheduledEvents,
|
||||
id,
|
||||
PartialTypes.GUILD_SCHEDULED_EVENT,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GenericAction;
|
||||
|
||||
Reference in New Issue
Block a user