Skip to content

Commit

Permalink
feat(Client): add guildScheduledEventID to createStageInstance (#117
Browse files Browse the repository at this point in the history
)
  • Loading branch information
TTtie committed Dec 11, 2023
1 parent 6ae2f4d commit 6ecaf65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,7 @@ declare namespace Dysnomia {

// Voice
interface CreateStageInstanceOptions extends StageInstanceOptions {
guildScheduledEventID?: string;
sendStartNotification?: boolean;
}
interface JoinVoiceChannelOptions {
Expand Down
2 changes: 2 additions & 0 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ class Client extends EventEmitter {
* Create a stage instance
* @arg {String} channelID The ID of the stage channel to create the instance in
* @arg {Object} options The stage instance options
* @arg {String} [options.guildScheduledEventID] The ID of the guild scheduled event associated with the stage instance
* @arg {Number} [options.privacyLevel] The privacy level of the stage instance. 1 is public (deprecated), 2 is guild only
* @arg {Boolean} [options.sendStartNotification] Whether to notify @everyone that a stage instance has started or not
* @arg {String} options.topic The stage instance topic
Expand All @@ -853,6 +854,7 @@ class Client extends EventEmitter {
createStageInstance(channelID, options) {
return this.requestHandler.request("POST", Endpoints.STAGE_INSTANCES, true, {
channel_id: channelID,
guild_scheduled_event_id: options.guildScheduledEventID,
privacy_level: options.privacyLevel,
send_start_notification: options.sendStartNotification,
topic: options.topic
Expand Down
1 change: 1 addition & 0 deletions lib/structures/StageChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class StageChannel extends TextVoiceChannel {
/**
* Create a stage instance
* @arg {Object} options The stage instance options
* @arg {String} [options.guildScheduledEventID] The ID of the guild scheduled event associated with the stage instance
* @arg {Number} [options.privacyLevel] The privacy level of the stage instance. 1 is public (deprecated), 2 is guild only
* @arg {Boolean} [options.sendStartNotification] Whether to notify @everyone that a stage instance has started or not
* @arg {String} options.topic The stage instance topic
Expand Down

0 comments on commit 6ecaf65

Please sign in to comment.