* added interface method declarations * inline docspull/1923/head
@@ -3723,6 +3723,16 @@ | |||||
A task that represents the asynchronous removal operation. | A task that represents the asynchronous removal operation. | ||||
</returns> | </returns> | ||||
</member> | </member> | ||||
<member name="M:Discord.IGuild.GetApplicationCommandsAsync(Discord.RequestOptions)"> | |||||
<summary> | |||||
Gets this guilds slash commands commands | |||||
</summary> | |||||
<param name="options">The options to be used when sending the request.</param> | |||||
<returns> | |||||
A task that represents the asynchronous get operation. The task result contains a read-only collection | |||||
of application commands found within the guild. | |||||
</returns> | |||||
</member> | |||||
<member name="T:Discord.IGuildIntegration"> | <member name="T:Discord.IGuildIntegration"> | ||||
<summary> | <summary> | ||||
Holds information for a guild integration feature. | Holds information for a guild integration feature. | ||||
@@ -4293,13 +4303,6 @@ | |||||
If the option is a subcommand or subcommand group type, this nested options will be the parameters. | If the option is a subcommand or subcommand group type, this nested options will be the parameters. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:Discord.IApplicationCommand.DeleteAsync(Discord.RequestOptions)"> | |||||
<summary> | |||||
Deletes this command | |||||
</summary> | |||||
<param name="options">The options to be used when sending the request.</param> | |||||
<returns>A task that represents the asynchronous delete operation.</returns> | |||||
</member> | |||||
<member name="T:Discord.IApplicationCommandInteractionData"> | <member name="T:Discord.IApplicationCommandInteractionData"> | ||||
<summary> | <summary> | ||||
Represents data of an Interaction Command, see <see href="https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondata"/>. | Represents data of an Interaction Command, see <see href="https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondata"/>. | ||||
@@ -4433,6 +4436,58 @@ | |||||
read-only property, always 1. | read-only property, always 1. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:Discord.IDiscordInteraction.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<summary> | |||||
Responds to an Interaction with type <see cref="F:Discord.InteractionResponseType.ChannelMessageWithSource"/>. | |||||
</summary> | |||||
<param name="text">The text of the message to be sent.</param> | |||||
<param name="embeds">A array of embeds to send with this response. Max 10</param> | |||||
<param name="isTTS"><see langword="true"/> if the message should be read out by a text-to-speech reader, otherwise <see langword="false"/>.</param> | |||||
<param name="ephemeral"><see langword="true"/> if the response should be hidden to everyone besides the invoker of the command, otherwise <see langword="false"/>.</param> | |||||
<param name="allowedMentions">The allowed mentions for this response.</param> | |||||
<param name="options">The request options for this response.</param> | |||||
<param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | |||||
<param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
</member> | |||||
<member name="M:Discord.IDiscordInteraction.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<summary> | |||||
Sends a followup message for this interaction. | |||||
</summary> | |||||
<param name="text">The text of the message to be sent</param> | |||||
<param name="embeds">A array of embeds to send with this response. Max 10</param> | |||||
<param name="isTTS"><see langword="true"/> if the message should be read out by a text-to-speech reader, otherwise <see langword="false"/>.</param> | |||||
<param name="ephemeral"><see langword="true"/> if the response should be hidden to everyone besides the invoker of the command, otherwise <see langword="false"/>.</param> | |||||
<param name="allowedMentions">The allowed mentions for this response.</param> | |||||
<param name="options">The request options for this response.</param> | |||||
<param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | |||||
<param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
<returns> | |||||
The sent message. | |||||
</returns> | |||||
</member> | |||||
<member name="M:Discord.IDiscordInteraction.GetOriginalResponseAsync(Discord.RequestOptions)"> | |||||
<summary> | |||||
Gets the original response for this interaction. | |||||
</summary> | |||||
<param name="options">The request options for this async request.</param> | |||||
<returns>A <see cref="T:Discord.IUserMessage"/> that represents the initial response.</returns> | |||||
</member> | |||||
<member name="M:Discord.IDiscordInteraction.ModifyOriginalResponseAsync(System.Action{Discord.MessageProperties},Discord.RequestOptions)"> | |||||
<summary> | |||||
Edits original response for this interaction. | |||||
</summary> | |||||
<param name="func">A delegate containing the properties to modify the message with.</param> | |||||
<param name="options">The request options for this async request.</param> | |||||
<returns>A <see cref="T:Discord.IUserMessage"/> that represents the initial response.</returns> | |||||
</member> | |||||
<member name="M:Discord.IDiscordInteraction.DeferAsync(Discord.RequestOptions)"> | |||||
<summary> | |||||
Acknowledges this interaction. | |||||
</summary> | |||||
<returns> | |||||
A task that represents the asynchronous operation of acknowledging the interaction. | |||||
</returns> | |||||
</member> | |||||
<member name="T:Discord.IDiscordInteractionData"> | <member name="T:Discord.IDiscordInteractionData"> | ||||
<summary> | <summary> | ||||
Represents an interface used to specify classes that they are a vaild dataype of a <see cref="T:Discord.IDiscordInteraction"/> class. | Represents an interface used to specify classes that they are a vaild dataype of a <see cref="T:Discord.IDiscordInteraction"/> class. | ||||
@@ -4583,7 +4638,7 @@ | |||||
Represents a builder for creating a <see cref="T:Discord.MessageComponent"/>. | Represents a builder for creating a <see cref="T:Discord.MessageComponent"/>. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="F:Discord.ComponentBuilder.MaxLabelLength"> | |||||
<member name="F:Discord.ComponentBuilder.MaxButtonLabelLength"> | |||||
<summary> | <summary> | ||||
The max length of a <see cref="P:Discord.ButtonComponent.Label"/>. | The max length of a <see cref="P:Discord.ButtonComponent.Label"/>. | ||||
</summary> | </summary> | ||||
@@ -4710,7 +4765,7 @@ | |||||
<summary> | <summary> | ||||
Gets or sets the label of the current button. | Gets or sets the label of the current button. | ||||
</summary> | </summary> | ||||
<exception cref="T:System.ArgumentException" accessor="set"><see cref="P:Discord.ButtonBuilder.Label"/> length exceeds <see cref="F:Discord.ComponentBuilder.MaxLabelLength"/>.</exception> | |||||
<exception cref="T:System.ArgumentException" accessor="set"><see cref="P:Discord.ButtonBuilder.Label"/> length exceeds <see cref="F:Discord.ComponentBuilder.MaxButtonLabelLength"/>.</exception> | |||||
</member> | </member> | ||||
<member name="P:Discord.ButtonBuilder.CustomId"> | <member name="P:Discord.ButtonBuilder.CustomId"> | ||||
<summary> | <summary> | ||||
@@ -5035,11 +5090,16 @@ | |||||
The maximum length of a <see cref="P:Discord.SelectMenuOption.Description"/>. | The maximum length of a <see cref="P:Discord.SelectMenuOption.Description"/>. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="F:Discord.SelectMenuOptionBuilder.MaxSelectLabelLength"> | |||||
<summary> | |||||
The maximum length of a <see cref="P:Discord.SelectMenuOption.Label"/>. | |||||
</summary> | |||||
</member> | |||||
<member name="P:Discord.SelectMenuOptionBuilder.Label"> | <member name="P:Discord.SelectMenuOptionBuilder.Label"> | ||||
<summary> | <summary> | ||||
Gets or sets the label of the current select menu. | Gets or sets the label of the current select menu. | ||||
</summary> | </summary> | ||||
<exception cref="T:System.ArgumentException" accessor="set"><see cref="P:Discord.SelectMenuOptionBuilder.Label"/> length exceeds <see cref="F:Discord.ComponentBuilder.MaxLabelLength"/></exception> | |||||
<exception cref="T:System.ArgumentException" accessor="set"><see cref="P:Discord.SelectMenuOptionBuilder.Label"/> length exceeds <see cref="F:Discord.SelectMenuOptionBuilder.MaxSelectLabelLength"/></exception> | |||||
</member> | </member> | ||||
<member name="P:Discord.SelectMenuOptionBuilder.Value"> | <member name="P:Discord.SelectMenuOptionBuilder.Value"> | ||||
<summary> | <summary> | ||||
@@ -7554,10 +7614,38 @@ | |||||
The message for when a news channel subscription is added to a text channel. | The message for when a news channel subscription is added to a text channel. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="F:Discord.MessageType.GuildDiscoveryDisqualified"> | |||||
<summary> | |||||
The message for when a guild is disqualified from discovery. | |||||
</summary> | |||||
</member> | |||||
<member name="F:Discord.MessageType.GuildDiscoveryRequalified"> | |||||
<summary> | |||||
The message for when a guild is requalified for discovery. | |||||
</summary> | |||||
</member> | |||||
<member name="F:Discord.MessageType.GuildDiscoveryGracePeriodInitialWarning"> | |||||
<summary> | |||||
The message for when the initial warning is sent for the initial grace period discovery. | |||||
</summary> | |||||
</member> | |||||
<member name="F:Discord.MessageType.GuildDiscoveryGracePeriodFinalWarning"> | |||||
<summary> | |||||
The message for when the final warning is sent for the initial grace period discovery. | |||||
</summary> | |||||
</member> | |||||
<member name="F:Discord.MessageType.ThreadCreated"> | |||||
<summary> | |||||
The message for when a thread is created. | |||||
</summary> | |||||
</member> | |||||
<member name="F:Discord.MessageType.Reply"> | <member name="F:Discord.MessageType.Reply"> | ||||
<summary> | <summary> | ||||
The message is an inline reply. | The message is an inline reply. | ||||
</summary> | </summary> | ||||
<remarks> | |||||
Only available in API v8 | |||||
</remarks> | |||||
</member> | </member> | ||||
<member name="F:Discord.MessageType.ApplicationCommand"> | <member name="F:Discord.MessageType.ApplicationCommand"> | ||||
<summary> | <summary> | ||||
@@ -7567,6 +7655,19 @@ | |||||
Only available in API v8 | Only available in API v8 | ||||
</remarks> | </remarks> | ||||
</member> | </member> | ||||
<member name="F:Discord.MessageType.ThreadStarterMessage"> | |||||
<summary> | |||||
The message that starts a thread. | |||||
</summary> | |||||
<remarks> | |||||
Only available in API v9 | |||||
</remarks> | |||||
</member> | |||||
<member name="F:Discord.MessageType.GuildInviteReminder"> | |||||
<summary> | |||||
The message for a invite reminder | |||||
</summary> | |||||
</member> | |||||
<member name="T:Discord.ReactionMetadata"> | <member name="T:Discord.ReactionMetadata"> | ||||
<summary> | <summary> | ||||
A metadata containing reaction information. | A metadata containing reaction information. | ||||
@@ -892,5 +892,15 @@ namespace Discord | |||||
/// A task that represents the asynchronous removal operation. | /// A task that represents the asynchronous removal operation. | ||||
/// </returns> | /// </returns> | ||||
Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null); | Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null); | ||||
/// <summary> | |||||
/// Gets this guilds slash commands commands | |||||
/// </summary> | |||||
/// <param name="options">The options to be used when sending the request.</param> | |||||
/// <returns> | |||||
/// A task that represents the asynchronous get operation. The task result contains a read-only collection | |||||
/// of application commands found within the guild. | |||||
/// </returns> | |||||
Task<IReadOnlyCollection<IApplicationCommand>> GetApplicationCommandsAsync (RequestOptions options = null); | |||||
} | } | ||||
} | } |
@@ -9,7 +9,7 @@ namespace Discord | |||||
/// <summary> | /// <summary> | ||||
/// The base command model that belongs to an application. see <see href="https://discord.com/developers/docs/interactions/slash-commands#applicationcommand"/> | /// The base command model that belongs to an application. see <see href="https://discord.com/developers/docs/interactions/slash-commands#applicationcommand"/> | ||||
/// </summary> | /// </summary> | ||||
public interface IApplicationCommand : ISnowflakeEntity | |||||
public interface IApplicationCommand : ISnowflakeEntity, IDeletable | |||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Gets the unique id of the parent application. | /// Gets the unique id of the parent application. | ||||
@@ -35,12 +35,5 @@ namespace Discord | |||||
/// If the option is a subcommand or subcommand group type, this nested options will be the parameters. | /// If the option is a subcommand or subcommand group type, this nested options will be the parameters. | ||||
/// </summary> | /// </summary> | ||||
IReadOnlyCollection<IApplicationCommandOption> Options { get; } | IReadOnlyCollection<IApplicationCommandOption> Options { get; } | ||||
/// <summary> | |||||
/// Deletes this command | |||||
/// </summary> | |||||
/// <param name="options">The options to be used when sending the request.</param> | |||||
/// <returns>A task that represents the asynchronous delete operation.</returns> | |||||
Task DeleteAsync(RequestOptions options = null); | |||||
} | } | ||||
} | } |
@@ -39,5 +39,59 @@ namespace Discord | |||||
/// read-only property, always 1. | /// read-only property, always 1. | ||||
/// </summary> | /// </summary> | ||||
int Version { get; } | int Version { get; } | ||||
/// <summary> | |||||
/// Responds to an Interaction with type <see cref="InteractionResponseType.ChannelMessageWithSource"/>. | |||||
/// </summary> | |||||
/// <param name="text">The text of the message to be sent.</param> | |||||
/// <param name="embeds">A array of embeds to send with this response. Max 10</param> | |||||
/// <param name="isTTS"><see langword="true"/> if the message should be read out by a text-to-speech reader, otherwise <see langword="false"/>.</param> | |||||
/// <param name="ephemeral"><see langword="true"/> if the response should be hidden to everyone besides the invoker of the command, otherwise <see langword="false"/>.</param> | |||||
/// <param name="allowedMentions">The allowed mentions for this response.</param> | |||||
/// <param name="options">The request options for this response.</param> | |||||
/// <param name="component">A <see cref="MessageComponent"/> to be sent with this response</param> | |||||
/// <param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
Task RespondAsync (string text = null, Embed[] embeds = null, bool isTTS = false, | |||||
bool ephemeral = false, AllowedMentions allowedMentions = null, RequestOptions options = null, MessageComponent component = null, Embed embed = null); | |||||
/// <summary> | |||||
/// Sends a followup message for this interaction. | |||||
/// </summary> | |||||
/// <param name="text">The text of the message to be sent</param> | |||||
/// <param name="embeds">A array of embeds to send with this response. Max 10</param> | |||||
/// <param name="isTTS"><see langword="true"/> if the message should be read out by a text-to-speech reader, otherwise <see langword="false"/>.</param> | |||||
/// <param name="ephemeral"><see langword="true"/> if the response should be hidden to everyone besides the invoker of the command, otherwise <see langword="false"/>.</param> | |||||
/// <param name="allowedMentions">The allowed mentions for this response.</param> | |||||
/// <param name="options">The request options for this response.</param> | |||||
/// <param name="component">A <see cref="MessageComponent"/> to be sent with this response</param> | |||||
/// <param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
/// <returns> | |||||
/// The sent message. | |||||
/// </returns> | |||||
Task<IUserMessage> FollowupAsync (string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, | |||||
AllowedMentions allowedMentions = null, RequestOptions options = null, MessageComponent component = null, Embed embed = null); | |||||
/// <summary> | |||||
/// Gets the original response for this interaction. | |||||
/// </summary> | |||||
/// <param name="options">The request options for this async request.</param> | |||||
/// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | |||||
Task<IUserMessage> GetOriginalResponseAsync (RequestOptions options = null); | |||||
/// <summary> | |||||
/// Edits original response for this interaction. | |||||
/// </summary> | |||||
/// <param name="func">A delegate containing the properties to modify the message with.</param> | |||||
/// <param name="options">The request options for this async request.</param> | |||||
/// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | |||||
Task<IUserMessage> ModifyOriginalResponseAsync (Action<MessageProperties> func, RequestOptions options = null); | |||||
/// <summary> | |||||
/// Acknowledges this interaction. | |||||
/// </summary> | |||||
/// <returns> | |||||
/// A task that represents the asynchronous operation of acknowledging the interaction. | |||||
/// </returns> | |||||
Task DeferAsync (RequestOptions options = null); | |||||
} | } | ||||
} | } |
@@ -3403,6 +3403,16 @@ | |||||
of webhooks found within the guild. | of webhooks found within the guild. | ||||
</returns> | </returns> | ||||
</member> | </member> | ||||
<member name="M:Discord.Rest.RestGuild.GetApplicationCommandsAsync(Discord.RequestOptions)"> | |||||
<summary> | |||||
Gets this guilds slash commands commands | |||||
</summary> | |||||
<param name="options">The options to be used when sending the request.</param> | |||||
<returns> | |||||
A task that represents the asynchronous get operation. The task result contains a read-only collection | |||||
of application commands found within the guild. | |||||
</returns> | |||||
</member> | |||||
<member name="M:Discord.Rest.RestGuild.ToString"> | <member name="M:Discord.Rest.RestGuild.ToString"> | ||||
<summary> | <summary> | ||||
Returns the name of the guild. | Returns the name of the guild. | ||||
@@ -3548,6 +3558,9 @@ | |||||
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetWebhooksAsync(Discord.RequestOptions)"> | <member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetWebhooksAsync(Discord.RequestOptions)"> | ||||
<inheritdoc /> | <inheritdoc /> | ||||
</member> | </member> | ||||
<member name="M:Discord.Rest.RestGuild.Discord#IGuild#GetApplicationCommandsAsync(Discord.RequestOptions)"> | |||||
<inheritdoc /> | |||||
</member> | |||||
<member name="P:Discord.Rest.RestGuildIntegration.Name"> | <member name="P:Discord.Rest.RestGuildIntegration.Name"> | ||||
<inheritdoc /> | <inheritdoc /> | ||||
</member> | </member> | ||||
@@ -808,6 +808,18 @@ namespace Discord.Rest | |||||
public Task<IReadOnlyCollection<RestWebhook>> GetWebhooksAsync(RequestOptions options = null) | public Task<IReadOnlyCollection<RestWebhook>> GetWebhooksAsync(RequestOptions options = null) | ||||
=> GuildHelper.GetWebhooksAsync(this, Discord, options); | => GuildHelper.GetWebhooksAsync(this, Discord, options); | ||||
//Interactions | |||||
/// <summary> | |||||
/// Gets this guilds slash commands commands | |||||
/// </summary> | |||||
/// <param name="options">The options to be used when sending the request.</param> | |||||
/// <returns> | |||||
/// A task that represents the asynchronous get operation. The task result contains a read-only collection | |||||
/// of application commands found within the guild. | |||||
/// </returns> | |||||
public async Task<IReadOnlyCollection<RestApplicationCommand>> GetApplicationCommandsAsync (RequestOptions options = null) | |||||
=> await ClientHelper.GetGuildApplicationCommands(Discord, Id, options).ConfigureAwait(false); | |||||
/// <summary> | /// <summary> | ||||
/// Returns the name of the guild. | /// Returns the name of the guild. | ||||
/// </summary> | /// </summary> | ||||
@@ -1061,5 +1073,8 @@ namespace Discord.Rest | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) | async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) | ||||
=> await GetWebhooksAsync(options).ConfigureAwait(false); | => await GetWebhooksAsync(options).ConfigureAwait(false); | ||||
/// <inheritdoc /> | |||||
async Task<IReadOnlyCollection<IApplicationCommand>> IGuild.GetApplicationCommandsAsync (RequestOptions options) | |||||
=> await GetApplicationCommandsAsync(options).ConfigureAwait(false); | |||||
} | } | ||||
} | } |
@@ -3477,6 +3477,9 @@ | |||||
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetWebhooksAsync(Discord.RequestOptions)"> | <member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetWebhooksAsync(Discord.RequestOptions)"> | ||||
<inheritdoc /> | <inheritdoc /> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketGuild.Discord#IGuild#GetApplicationCommandsAsync(Discord.RequestOptions)"> | |||||
<inheritdoc /> | |||||
</member> | |||||
<member name="T:Discord.WebSocket.SocketMessageComponent"> | <member name="T:Discord.WebSocket.SocketMessageComponent"> | ||||
<summary> | <summary> | ||||
Represents a Websocket-based interaction type for Message Components. | Represents a Websocket-based interaction type for Message Components. | ||||
@@ -3492,7 +3495,7 @@ | |||||
The message that contained the trigger for this interaction. | The message that contained the trigger for this interaction. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketMessageComponent.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketMessageComponent.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<inheritdoc/> | <inheritdoc/> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketMessageComponent.UpdateAsync(System.Action{Discord.MessageProperties},Discord.RequestOptions)"> | <member name="M:Discord.WebSocket.SocketMessageComponent.UpdateAsync(System.Action{Discord.MessageProperties},Discord.RequestOptions)"> | ||||
@@ -3503,7 +3506,7 @@ | |||||
<param name="options">The request options for this async request.</param> | <param name="options">The request options for this async request.</param> | ||||
<returns>A task that represents the asynchronous operation of updating the message.</returns> | <returns>A task that represents the asynchronous operation of updating the message.</returns> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketMessageComponent.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketMessageComponent.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<inheritdoc/> | <inheritdoc/> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketMessageComponent.DeferAsync(Discord.RequestOptions)"> | <member name="M:Discord.WebSocket.SocketMessageComponent.DeferAsync(Discord.RequestOptions)"> | ||||
@@ -3619,10 +3622,10 @@ | |||||
The data associated with this interaction. | The data associated with this interaction. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketSlashCommand.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketSlashCommand.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<inheritdoc/> | <inheritdoc/> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketSlashCommand.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketSlashCommand.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<inheritdoc/> | <inheritdoc/> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketSlashCommand.DeferAsync(Discord.RequestOptions)"> | <member name="M:Discord.WebSocket.SocketSlashCommand.DeferAsync(Discord.RequestOptions)"> | ||||
@@ -3708,12 +3711,12 @@ | |||||
<see langword="true"/> if the token is valid for replying to, otherwise <see langword="false"/>. | <see langword="true"/> if the token is valid for replying to, otherwise <see langword="false"/>. | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketInteraction.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketInteraction.RespondAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<summary> | <summary> | ||||
Responds to an Interaction with type <see cref="F:Discord.InteractionResponseType.ChannelMessageWithSource"/>. | Responds to an Interaction with type <see cref="F:Discord.InteractionResponseType.ChannelMessageWithSource"/>. | ||||
<para> | <para> | ||||
If you have <see cref="P:Discord.WebSocket.DiscordSocketConfig.AlwaysAcknowledgeInteractions"/> set to <see langword="true"/>, You should use | If you have <see cref="P:Discord.WebSocket.DiscordSocketConfig.AlwaysAcknowledgeInteractions"/> set to <see langword="true"/>, You should use | ||||
<see cref="!:FollowupAsync(Discord.Embed[],string,bool,bool,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"/> instead. | |||||
<see cref="M:Discord.WebSocket.SocketInteraction.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"/> instead. | |||||
</para> | </para> | ||||
</summary> | </summary> | ||||
<param name="text">The text of the message to be sent.</param> | <param name="text">The text of the message to be sent.</param> | ||||
@@ -3723,10 +3726,11 @@ | |||||
<param name="allowedMentions">The allowed mentions for this response.</param> | <param name="allowedMentions">The allowed mentions for this response.</param> | ||||
<param name="options">The request options for this response.</param> | <param name="options">The request options for this response.</param> | ||||
<param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | <param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | ||||
<param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
<exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception> | <exception cref="T:System.ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="F:Discord.DiscordConfig.MaxMessageSize"/>.</exception> | ||||
<exception cref="T:System.InvalidOperationException">The parameters provided were invalid or the token was invalid.</exception> | <exception cref="T:System.InvalidOperationException">The parameters provided were invalid or the token was invalid.</exception> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketInteraction.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent)"> | |||||
<member name="M:Discord.WebSocket.SocketInteraction.FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<summary> | <summary> | ||||
Sends a followup message for this interaction. | Sends a followup message for this interaction. | ||||
</summary> | </summary> | ||||
@@ -3737,6 +3741,7 @@ | |||||
<param name="allowedMentions">The allowed mentions for this response.</param> | <param name="allowedMentions">The allowed mentions for this response.</param> | ||||
<param name="options">The request options for this response.</param> | <param name="options">The request options for this response.</param> | ||||
<param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | <param name="component">A <see cref="T:Discord.MessageComponent"/> to be sent with this response</param> | ||||
<param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param> | |||||
<returns> | <returns> | ||||
The sent message. | The sent message. | ||||
</returns> | </returns> | ||||
@@ -3772,6 +3777,15 @@ | |||||
A task that represents the asynchronous operation of acknowledging the interaction. | A task that represents the asynchronous operation of acknowledging the interaction. | ||||
</returns> | </returns> | ||||
</member> | </member> | ||||
<member name="M:Discord.WebSocket.SocketInteraction.Discord#IDiscordInteraction#FollowupAsync(System.String,Discord.Embed[],System.Boolean,System.Boolean,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.Embed)"> | |||||
<inheritdoc/> | |||||
</member> | |||||
<member name="M:Discord.WebSocket.SocketInteraction.Discord#IDiscordInteraction#GetOriginalResponseAsync(Discord.RequestOptions)"> | |||||
<inheritdoc/> | |||||
</member> | |||||
<member name="M:Discord.WebSocket.SocketInteraction.Discord#IDiscordInteraction#ModifyOriginalResponseAsync(System.Action{Discord.MessageProperties},Discord.RequestOptions)"> | |||||
<inheritdoc/> | |||||
</member> | |||||
<member name="T:Discord.WebSocket.SocketInvite"> | <member name="T:Discord.WebSocket.SocketInvite"> | ||||
<summary> | <summary> | ||||
Represents a WebSocket-based invite to a guild. | Represents a WebSocket-based invite to a guild. | ||||
@@ -1436,6 +1436,9 @@ namespace Discord.WebSocket | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) | async Task<IReadOnlyCollection<IWebhook>> IGuild.GetWebhooksAsync(RequestOptions options) | ||||
=> await GetWebhooksAsync(options).ConfigureAwait(false); | => await GetWebhooksAsync(options).ConfigureAwait(false); | ||||
/// <inheritdoc /> | |||||
async Task<IReadOnlyCollection<IApplicationCommand>> IGuild.GetApplicationCommandsAsync (RequestOptions options) | |||||
=> await GetApplicationCommandsAsync(options).ConfigureAwait(false); | |||||
void IDisposable.Dispose() | void IDisposable.Dispose() | ||||
{ | { | ||||
@@ -171,5 +171,20 @@ namespace Discord.WebSocket | |||||
// Tokens last for 15 minutes according to https://discord.com/developers/docs/interactions/slash-commands#responding-to-an-interaction | // Tokens last for 15 minutes according to https://discord.com/developers/docs/interactions/slash-commands#responding-to-an-interaction | ||||
return (DateTime.UtcNow - this.CreatedAt.UtcDateTime).TotalMinutes <= 15d; | return (DateTime.UtcNow - this.CreatedAt.UtcDateTime).TotalMinutes <= 15d; | ||||
} | } | ||||
// IDiscordInteraction | |||||
/// <inheritdoc/> | |||||
async Task<IUserMessage> IDiscordInteraction.FollowupAsync (string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, | |||||
RequestOptions options, MessageComponent component, Embed embed) | |||||
=> await FollowupAsync(text, embeds, isTTS, ephemeral, allowedMentions, options, component, embed).ConfigureAwait(false); | |||||
/// <inheritdoc/> | |||||
async Task<IUserMessage> IDiscordInteraction.GetOriginalResponseAsync (RequestOptions options) | |||||
=> await GetOriginalResponseAsync(options).ConfigureAwait(false); | |||||
/// <inheritdoc/> | |||||
async Task<IUserMessage> IDiscordInteraction.ModifyOriginalResponseAsync (Action<MessageProperties> func, RequestOptions options) | |||||
=> await ModifyOriginalResponseAsync(func, options).ConfigureAwait(false); | |||||
} | } | ||||
} | } |