Skip to content

Commit

Permalink
types(MessageEditOptions): Omit poll (discordjs#10509)
Browse files Browse the repository at this point in the history
fix: creating poll from message edit

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
  • Loading branch information
2 people authored and monbrey committed Sep 18, 2024
1 parent 30e321b commit c7ed54a
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 114 deletions.
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/Webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Webhook {

/**
* Options that can be passed into send.
* @typedef {BaseMessageOptions} WebhookMessageCreateOptions
* @typedef {BaseMessageOptionsWithPoll} WebhookMessageCreateOptions
* @property {boolean} [tts=false] Whether the message should be spoken aloud
* @property {MessageFlags} [flags] Which flags to set for the message.
* <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be set.</info>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class InteractionResponses {

/**
* Options for a reply to a {@link BaseInteraction}.
* @typedef {BaseMessageOptions|SharedInteractionResponseOptions} InteractionReplyOptions
* @typedef {BaseMessageOptionsWithPoll} InteractionReplyOptions
* @property {boolean} [tts=false] Whether the message should be spoken aloud
* @property {boolean} [ephemeral] Whether the reply should be ephemeral
* @property {boolean} [fetchReply] Whether to fetch the reply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ class TextBasedChannel {
* The files to send with the message.
* @property {Array<(ActionRowBuilder|ActionRow|APIActionRowComponent)>} [components]
* Action rows containing interactive components for the message (buttons, select menus)
*/

/**
* The base message options for messages including a poll.
* @typedef {BaseMessageOptions} BaseMessageOptionsWithPoll
* @property {PollData} [poll] The poll to send with the message
*/

Expand All @@ -93,7 +98,7 @@ class TextBasedChannel {

/**
* The options for sending a message.
* @typedef {BaseMessageOptions} BaseMessageCreateOptions
* @typedef {BaseMessageOptionsWithPoll} BaseMessageCreateOptions
* @property {boolean} [tts=false] Whether the message should be spoken aloud
* @property {string} [nonce] The nonce for the message
* <info>This property is required if `enforceNonce` set to `true`.</info>
Expand Down
Loading

0 comments on commit c7ed54a

Please sign in to comment.