* Fixed some warnings
* Another fixed warning
* Changed the SSendFileAsync to SendFileAsync
* Removed para AlwaysAcknowledgeInteractions
* Moved it back to the previous version
* Added periods to the end like quin requested!! :((
Co-authored-by: MrCakeSlayer <13650699+MrCakeSlayer@users.noreply.github.com>
<param name="user">The id of the user whose stream to display for this invite</param>
<param name="user">The id of the user whose stream to display for this invite.</param>
<param name="maxAge">The time (in seconds) until the invite expires. Set to <c>null</c> to never expire.</param>
<param name="maxAge">The time (in seconds) until the invite expires. Set to <c>null</c> to never expire.</param>
<param name="maxUses">The max amount of times this invite may be used. Set to <c>null</c> to have unlimited uses.</param>
<param name="maxUses">The max amount of times this invite may be used. Set to <c>null</c> to have unlimited uses.</param>
<param name="isTemporary">If <c>true</c>, the user accepting this invite will be kicked from the guild after closing their client.</param>
<param name="isTemporary">If <c>true</c>, the user accepting this invite will be kicked from the guild after closing their client.</param>
@@ -1979,7 +1979,7 @@
Starts the stage, creating a stage instance.
Starts the stage, creating a stage instance.
</summary>
</summary>
<param name="topic">The topic for the stage/</param>
<param name="topic">The topic for the stage/</param>
<param name="privacyLevel">The privacy level of the stage</param>
<param name="privacyLevel">The privacy level of the stage.</param>
<param name="options">The options to be used when sending the request.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
<returns>
A task that represents the asynchronous start operation.
A task that represents the asynchronous start operation.
@@ -3996,7 +3996,7 @@
<param name="description">The description of the sticker.</param>
<param name="description">The description of the sticker.</param>
<param name="tags">The tags of the sticker.</param>
<param name="tags">The tags of the sticker.</param>
<param name="stream">The stream containing the file data.</param>
<param name="stream">The stream containing the file data.</param>
<param name="filename">The name of the file <b>with</b> the extension, ex: image.png</param>
<param name="filename">The name of the file <b>with</b> the extension, ex: image.png.</param>
<param name="options">The options to be used when sending the request.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
<returns>
A task that represents the asynchronous creation operation. The task result contains the created sticker.
A task that represents the asynchronous creation operation. The task result contains the created sticker.
@@ -5007,25 +5007,25 @@
Responds to an Interaction with type <see cref="F:Discord.InteractionResponseType.ChannelMessageWithSource"/>.
Responds to an Interaction with type <see cref="F:Discord.InteractionResponseType.ChannelMessageWithSource"/>.
</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>
<param name="embeds">A array of embeds to send with this response. Max 10</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="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="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="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>
<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>
<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="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="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="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="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>
<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.
@@ -5414,10 +5414,10 @@
</summary>
</summary>
<param name="label">The label to use on the newly created link button.</param>
<param name="label">The label to use on the newly created link button.</param>
<param name="url">The url of this button.</param>
<param name="url">The url of this button.</param>
<param name="customId">The custom ID of this button</param>
<param name="style">The custom ID of this button</param>
<param name="emote">The emote of this button</param>
<param name="disabled">Disabled this button or not</param>
<param name="customId">The custom ID of this button.</param>
<param name="style">The custom ID of this button.</param>
<param name="emote">The emote of this button.</param>
<param name="disabled">Disabled this button or not.</param>
/// Options for the <see cref="IApplicationCommand"/>, see <see href="https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption"/>The docs</see>.
/// Options for the <see cref="IApplicationCommand"/>, see <see href="https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption">The docs</see>.
/// Responds to an Interaction with type <see cref="InteractionResponseType.ChannelMessageWithSource"/>.
/// Responds to an Interaction with type <see cref="InteractionResponseType.ChannelMessageWithSource"/>.
/// </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>
/// <param name="embeds">A array of embeds to send with this response. Max 10</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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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>
/// Sends a followup message for this interaction.
/// Sends a followup message for this interaction.
/// </summary>
/// </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="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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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>
/// Builds this builder into a <see cref="MessageComponent"/> used to send your components.
/// Builds this builder into a <see cref="MessageComponent"/> used to send your components.
/// </summary>
/// </summary>
/// <returns>A <see cref="MessageComponent"/> that can be sent with <see cref="IMessageChannel.SendMessageAsync(string, bool, Embed, RequestOptions, AllowedMentions, MessageReference, MessageComponent)"/>.</returns>
/// <returns>A <see cref="MessageComponent"/> that can be sent with <see cref="IMessageChannel.SendMessageAsync"/>.</returns>
public MessageComponent Build()
public MessageComponent Build()
{
{
if (this._actionRows != null)
if (this._actionRows != null)
@@ -427,10 +427,10 @@ namespace Discord
/// </summary>
/// </summary>
/// <param name="label">The label to use on the newly created link button.</param>
/// <param name="label">The label to use on the newly created link button.</param>
/// <param name="url">The url of this button.</param>
/// <param name="url">The url of this button.</param>
/// <param name="customId">The custom ID of this button</param>
/// <param name="style">The custom ID of this button</param>
/// <param name="emote">The emote of this button</param>
/// <param name="disabled">Disabled this button or not</param>
/// <param name="customId">The custom ID of this button.</param>
/// <param name="style">The custom ID of this button.</param>
/// <param name="emote">The emote of this button.</param>
/// <param name="disabled">Disabled this button or not.</param>
/// <para>The following example checks if the current user has the ability to send a message with attachment in
/// <para>The following example checks if the current user has the ability to send a message with attachment in
/// this channel; if so, uploads a file via <see cref="IMessageChannel.SendFileAsync(string, string, bool, Embed, RequestOptions, bool, AllowedMentions, MessageReference)"/>.</para>
/// this channel; if so, uploads a file via <see cref="IMessageChannel.SendFileAsync(string, string, bool, Embed, RequestOptions, bool, AllowedMentions, MessageReference)"/>.</para>
/// <code language="cs">
/// <code language="cs">
/// if (currentUser?.GetPermissions(targetChannel)?.AttachFiles)
/// if (currentUser?.GetPermissions(targetChannel)?.AttachFiles)
If <c>null</c>, all mentioned roles and users will be notified.
If <c>null</c>, all mentioned roles and users will be notified.
</param>
</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="component">The message components to be included with this message. Used for interactions</param>
<param name="component">The message components to be included with this message. Used for interactions.</param>
<param name="stickers">A collection of stickers to send with the message.</param>
<param name="stickers">A collection of stickers to send with the message.</param>
<param name="embeds">A array of <see cref="T:Discord.Embed"/>s to send with this response. Max 10</param>
<param name="embeds">A array of <see cref="T:Discord.Embed"/>s to send with this response. Max 10.</param>
<returns>
<returns>
A task that represents an asynchronous send operation for delivering the message. The task result
A task that represents an asynchronous send operation for delivering the message. The task result
contains the sent message.
contains the sent message.
@@ -1501,7 +1501,7 @@
If <c>null</c>, all mentioned roles and users will be notified.
If <c>null</c>, all mentioned roles and users will be notified.
</param>
</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="component">The message components to be included with this message. Used for interactions</param>
<param name="component">The message components to be included with this message. Used for interactions.</param>
<param name="stickers">A collection of stickers to send with the file.</param>
<param name="stickers">A collection of stickers to send with the file.</param>
<returns>
<returns>
A task that represents an asynchronous send operation for delivering the message. The task result
A task that represents an asynchronous send operation for delivering the message. The task result
@@ -1528,7 +1528,7 @@
If <c>null</c>, all mentioned roles and users will be notified.
If <c>null</c>, all mentioned roles and users will be notified.
</param>
</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="messageReference">The message references to be included. Used to reply to specific messages.</param>
<param name="component">The message components to be included with this message. Used for interactions</param>
<param name="component">The message components to be included with this message. Used for interactions.</param>
<param name="stickers">A collection of stickers to send with the file.</param>
<param name="stickers">A collection of stickers to send with the file.</param>
<returns>
<returns>
A task that represents an asynchronous send operation for delivering the message. The task result
A task that represents an asynchronous send operation for delivering the message. The task result
@@ -3632,7 +3632,7 @@
<param name="description">The description of the sticker.</param>
<param name="description">The description of the sticker.</param>
<param name="tags">The tags of the sticker.</param>
<param name="tags">The tags of the sticker.</param>
<param name="stream">The stream containing the file data.</param>
<param name="stream">The stream containing the file data.</param>
<param name="filename">The name of the file <b>with</b> the extension, ex: image.png</param>
<param name="filename">The name of the file <b>with</b> the extension, ex: image.png.</param>
<param name="options">The options to be used when sending the request.</param>
<param name="options">The options to be used when sending the request.</param>
<returns>
<returns>
A task that represents the asynchronous creation operation. The task result contains the created sticker.
A task that represents the asynchronous creation operation. The task result contains the created sticker.
@@ -4292,12 +4292,12 @@
</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>
<param name="embeds">A array of embeds to send with this response. Max 10</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="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="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="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>
<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>
@@ -4306,13 +4306,13 @@
<summary>
<summary>
Sends a followup message for this interaction.
Sends a followup message for this interaction.
</summary>
</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="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="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="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="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>
<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.
@@ -4322,15 +4322,15 @@
<summary>
<summary>
Sends a followup message for this interaction.
Sends a followup message for this interaction.
</summary>
</summary>
<param name="text">The text of the message to be sent</param>
<param name="fileStream">The file to upload</param>
<param name="fileName">The file name of the attachment</param>
<param name="embeds">A array of embeds to send with this response. Max 10</param>
<param name="text">The text of the message to be sent.</param>
<param name="fileStream">The file to upload.</param>
<param name="fileName">The file name of the attachment.</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="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="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="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>
<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.
@@ -4340,15 +4340,15 @@
<summary>
<summary>
Sends a followup message for this interaction.
Sends a followup message for this interaction.
</summary>
</summary>
<param name="text">The text of the message to be sent</param>
<param name="filePath">The file to upload</param>
<param name="fileName">The file name of the attachment</param>
<param name="embeds">A array of embeds to send with this response. Max 10</param>
<param name="text">The text of the message to be sent.</param>
<param name="filePath">The file to upload.</param>
<param name="fileName">The file name of the attachment.</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="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="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="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>
<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>
/// Responds to an Interaction with type <see cref="InteractionResponseType.ChannelMessageWithSource"/>.
/// Responds to an Interaction with type <see cref="InteractionResponseType.ChannelMessageWithSource"/>.
/// <para>
/// If you have <see cref="DiscordSocketConfig.AlwaysAcknowledgeInteractions"/> set to <see langword="true"/>, You should use
/// <see cref="FollowupAsync"/> instead.
/// </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>
/// <param name="embeds">A array of embeds to send with this response. Max 10</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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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="ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="DiscordConfig.MaxMessageSize"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="DiscordConfig.MaxMessageSize"/>.</exception>
/// <exception cref="InvalidOperationException">The parameters provided were invalid or the token was invalid.</exception>
/// <exception cref="InvalidOperationException">The parameters provided were invalid or the token was invalid.</exception>
@@ -138,13 +134,13 @@ namespace Discord.WebSocket
/// <summary>
/// <summary>
/// Sends a followup message for this interaction.
/// Sends a followup message for this interaction.
/// </summary>
/// </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="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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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.
@@ -155,15 +151,15 @@ namespace Discord.WebSocket
/// <summary>
/// <summary>
/// Sends a followup message for this interaction.
/// Sends a followup message for this interaction.
/// </summary>
/// </summary>
/// <param name="text">The text of the message to be sent</param>
/// <param name="fileStream">The file to upload</param>
/// <param name="fileName">The file name of the attachment</param>
/// <param name="embeds">A array of embeds to send with this response. Max 10</param>
/// <param name="text">The text of the message to be sent.</param>
/// <param name="fileStream">The file to upload.</param>
/// <param name="fileName">The file name of the attachment.</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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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.
@@ -174,15 +170,15 @@ namespace Discord.WebSocket
/// <summary>
/// <summary>
/// Sends a followup message for this interaction.
/// Sends a followup message for this interaction.
/// </summary>
/// </summary>
/// <param name="text">The text of the message to be sent</param>
/// <param name="filePath">The file to upload</param>
/// <param name="fileName">The file name of the attachment</param>
/// <param name="embeds">A array of embeds to send with this response. Max 10</param>
/// <param name="text">The text of the message to be sent.</param>
/// <param name="filePath">The file to upload.</param>
/// <param name="fileName">The file name of the attachment.</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="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="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="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="MessageComponent"/> to be sent with 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>
/// <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>
/// Given classes in the form of strings, their language, and an IDiagnosticAnlayzer to apply to it, return the diagnostics found in the string after converting it to a document.
/// Given classes in the form of strings, their language, and an IDiagnosticAnlayzer to apply to it, return the diagnostics found in the string after converting it to a document.
/// </summary>
/// </summary>
/// <param name="sources">Classes in the form of strings</param>
/// <param name="language">The language the source classes are in</param>
/// <param name="analyzer">The analyzer to be run on the sources</param>
/// <param name="sources">Classes in the form of strings.</param>
/// <param name="language">The language the source classes are in.</param>
/// <param name="analyzer">The analyzer to be run on the sources.</param>
/// <returns>An IEnumerable of Diagnostics that surfaced in the source code, sorted by Location</returns>
/// <returns>An IEnumerable of Diagnostics that surfaced in the source code, sorted by Location</returns>
/// Called to test a C# codefix when applied on the inputted string as a source
/// Called to test a C# codefix when applied on the inputted string as a source
/// </summary>
/// </summary>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied</param>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it.</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it.</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple.</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied.</param>
/// Called to test a VB codefix when applied on the inputted string as a source
/// Called to test a VB codefix when applied on the inputted string as a source
/// </summary>
/// </summary>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied</param>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it.</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it.</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple.</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied.</param>
/// Then gets the string after the codefix is applied and compares it with the expected result.
/// Then gets the string after the codefix is applied and compares it with the expected result.
/// Note: If any codefix causes new diagnostics to show up, the test fails unless allowNewCompilerDiagnostics is set to true.
/// Note: If any codefix causes new diagnostics to show up, the test fails unless allowNewCompilerDiagnostics is set to true.
/// </summary>
/// </summary>
/// <param name="language">The language the source code is in</param>
/// <param name="analyzer">The analyzer to be applied to the source code</param>
/// <param name="codeFixProvider">The codefix to be applied to the code wherever the relevant Diagnostic is found</param>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied</param>
/// <param name="language">The language the source code is in.</param>
/// <param name="analyzer">The analyzer to be applied to the source code.</param>
/// <param name="codeFixProvider">The codefix to be applied to the code wherever the relevant Diagnostic is found.</param>
/// <param name="oldSource">A class in the form of a string before the CodeFix was applied to it.</param>
/// <param name="newSource">A class in the form of a string after the CodeFix was applied to it.</param>
/// <param name="codeFixIndex">Index determining which codefix to apply if there are multiple.</param>
/// <param name="allowNewCompilerDiagnostics">A bool controlling whether or not the test will fail if the CodeFix introduces other warnings after being applied.</param>
var diagnostics = GetSortedDiagnostics(sources, language, analyzer);
var diagnostics = GetSortedDiagnostics(sources, language, analyzer);
@@ -98,9 +98,9 @@ namespace TestHelper
/// Checks each of the actual Diagnostics found and compares them with the corresponding DiagnosticResult in the array of expected results.
/// Checks each of the actual Diagnostics found and compares them with the corresponding DiagnosticResult in the array of expected results.
/// Diagnostics are considered equal only if the DiagnosticResultLocation, Id, Severity, and Message of the DiagnosticResult match the actual diagnostic.
/// Diagnostics are considered equal only if the DiagnosticResultLocation, Id, Severity, and Message of the DiagnosticResult match the actual diagnostic.
/// </summary>
/// </summary>
/// <param name="actualResults">The Diagnostics found by the compiler after running the analyzer on the source code</param>
/// <param name="analyzer">The analyzer that was being run on the sources</param>
/// <param name="expectedResults">Diagnostic Results that should have appeared in the code</param>
/// <param name="actualResults">The Diagnostics found by the compiler after running the analyzer on the source code.</param>
/// <param name="analyzer">The analyzer that was being run on the sources.</param>
/// <param name="expectedResults">Diagnostic Results that should have appeared in the code.</param>
/// Helper method to VerifyDiagnosticResult that checks the location of a diagnostic and compares it with the location in the expected DiagnosticResult.
/// Helper method to VerifyDiagnosticResult that checks the location of a diagnostic and compares it with the location in the expected DiagnosticResult.
/// </summary>
/// </summary>
/// <param name="analyzer">The analyzer that was being run on the sources</param>
/// <param name="diagnostic">The diagnostic that was found in the code</param>
/// <param name="actual">The Location of the Diagnostic found in the code</param>
/// <param name="expected">The DiagnosticResultLocation that should have been found</param>
/// <param name="analyzer">The analyzer that was being run on the sources.</param>
/// <param name="diagnostic">The diagnostic that was found in the code.</param>
/// <param name="actual">The Location of the Diagnostic found in the code.</param>
/// <param name="expected">The DiagnosticResultLocation that should have been found.</param>
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.