@@ -39,7 +39,7 @@ namespace _02_commands_framework | |||||
services.GetRequiredService<CommandService>().Log += LogAsync; | services.GetRequiredService<CommandService>().Log += LogAsync; | ||||
// Tokens should be considered secret data and never hard-coded. | // Tokens should be considered secret data and never hard-coded. | ||||
// We can read from the environment variable to avoid hardcoding. | |||||
// We can read from the environment variable to avoid hard coding. | |||||
await client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("token")); | await client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("token")); | ||||
await client.StartAsync(); | await client.StartAsync(); | ||||
@@ -54,7 +54,7 @@ namespace _03_sharded_client.Services | |||||
if (!command.IsSpecified) | if (!command.IsSpecified) | ||||
return; | return; | ||||
// the command was succesful, we don't care about this result, unless we want to log that a command succeeded. | |||||
// the command was successful, we don't care about this result, unless we want to log that a command succeeded. | |||||
if (result.IsSuccess) | if (result.IsSuccess) | ||||
return; | return; | ||||
@@ -16,7 +16,7 @@ namespace Discord.Commands | |||||
/// <code language="cs"> | /// <code language="cs"> | ||||
/// [Command("stats")] | /// [Command("stats")] | ||||
/// [Alias("stat", "info")] | /// [Alias("stat", "info")] | ||||
/// public async Task GetStatsAsync(IUser user) | |||||
/// public <see langword="async"/> Task GetStatsAsync(IUser user) | |||||
/// { | /// { | ||||
/// // ...pull stats | /// // ...pull stats | ||||
/// } | /// } | ||||
@@ -291,7 +291,7 @@ namespace Discord.Commands | |||||
return reader; | return reader; | ||||
} | } | ||||
//We dont have a cached type reader, create one | |||||
//We don't have a cached type reader, create one | |||||
reader = ReflectionUtils.CreateObject<TypeReader>(typeReaderType.GetTypeInfo(), service, services); | reader = ReflectionUtils.CreateObject<TypeReader>(typeReaderType.GetTypeInfo(), service, services); | ||||
service.AddTypeReader(paramType, reader, false); | service.AddTypeReader(paramType, reader, false); | ||||
@@ -602,7 +602,7 @@ namespace Discord.Commands | |||||
//If we get this far, at least one parse was successful. Execute the most likely overload. | //If we get this far, at least one parse was successful. Execute the most likely overload. | ||||
var chosenOverload = successfulParses[0]; | var chosenOverload = successfulParses[0]; | ||||
var result = await chosenOverload.Key.ExecuteAsync(context, chosenOverload.Value, services).ConfigureAwait(false); | var result = await chosenOverload.Key.ExecuteAsync(context, chosenOverload.Value, services).ConfigureAwait(false); | ||||
if (!result.IsSuccess && !(result is RuntimeResult || result is ExecuteResult)) // succesful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deffered execution) | |||||
if (!result.IsSuccess && !(result is RuntimeResult || result is ExecuteResult)) // successful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deferred execution) | |||||
await _commandExecutedEvent.InvokeAsync(chosenOverload.Key.Command, context, result); | await _commandExecutedEvent.InvokeAsync(chosenOverload.Key.Command, context, result); | ||||
return result; | return result; | ||||
} | } | ||||
@@ -36,7 +36,7 @@ namespace Discord.Commands | |||||
/// Specifies if notifications are sent for mentioned users and roles in the <paramref name="message"/>. | /// Specifies if notifications are sent for mentioned users and roles in the <paramref name="message"/>. | ||||
/// 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="options">The request options for this async request.</param> | |||||
/// <param name="options">The request options for this <see langword="async"/> request.</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> | ||||
@@ -8,7 +8,7 @@ namespace Discord.Commands | |||||
public enum RunMode | public enum RunMode | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// The default behaviour set in <see cref="CommandServiceConfig"/>. | |||||
/// The default behavior set in <see cref="CommandServiceConfig"/>. | |||||
/// </summary> | /// </summary> | ||||
Default, | Default, | ||||
/// <summary> | /// <summary> | ||||
@@ -609,12 +609,12 @@ namespace Discord | |||||
/// </returns> | /// </returns> | ||||
Task<ITextChannel> GetRulesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | Task<ITextChannel> GetRulesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | ||||
/// <summary> | /// <summary> | ||||
/// Gets the text channel channel where admins and moderators of Community guilds receive notices from Discord. | |||||
/// Gets the text channel where admins and moderators of Community guilds receive notices from Discord. | |||||
/// </summary> | /// </summary> | ||||
/// <param name="mode">The <see cref="CacheMode"/> that determines whether the object should be fetched from cache.</param> | /// <param name="mode">The <see cref="CacheMode"/> that determines whether the object should be fetched from cache.</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 get operation. The task result contains the text channel channel where | |||||
/// A task that represents the asynchronous get operation. The task result contains the text channel where | |||||
/// admins and moderators of Community guilds receive notices from Discord; <see langword="null" /> if none is set. | /// admins and moderators of Community guilds receive notices from Discord; <see langword="null" /> if none is set. | ||||
/// </returns> | /// </returns> | ||||
Task<ITextChannel> GetPublicUpdatesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | Task<ITextChannel> GetPublicUpdatesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | ||||
@@ -834,7 +834,7 @@ namespace Discord | |||||
/// Downloads all users for this guild if the current list is incomplete. | /// Downloads all users for this guild if the current list is incomplete. | ||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
/// This method downloads all users found within this guild throught the Gateway and caches them. | |||||
/// This method downloads all users found within this guild through the Gateway and caches them. | |||||
/// </remarks> | /// </remarks> | ||||
/// <returns> | /// <returns> | ||||
/// A task that represents the asynchronous download operation. | /// A task that represents the asynchronous download operation. | ||||
@@ -1057,7 +1057,7 @@ namespace Discord | |||||
/// A task that represents the asynchronous get operation. The task result contains a read-only collection | /// A task that represents the asynchronous get operation. The task result contains a read-only collection | ||||
/// of application commands found within the guild. | /// of application commands found within the guild. | ||||
/// </returns> | /// </returns> | ||||
Task<IReadOnlyCollection<IApplicationCommand>> GetApplicationCommandsAsync (RequestOptions options = null); | |||||
Task<IReadOnlyCollection<IApplicationCommand>> GetApplicationCommandsAsync(RequestOptions options = null); | |||||
/// <summary> | /// <summary> | ||||
/// Gets an application command within this guild with the specified id. | /// Gets an application command within this guild with the specified id. | ||||
@@ -13,7 +13,7 @@ namespace Discord | |||||
public class MessageCommandBuilder | public class MessageCommandBuilder | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Returns the maximun length a commands name allowed by Discord | |||||
/// Returns the maximum length a commands name allowed by Discord | |||||
/// </summary> | /// </summary> | ||||
public const int MaxNameLength = 32; | public const int MaxNameLength = 32; | ||||
@@ -13,7 +13,7 @@ namespace Discord | |||||
public class UserCommandBuilder | public class UserCommandBuilder | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Returns the maximun length a commands name allowed by Discord | |||||
/// Returns the maximum length a commands name allowed by Discord | |||||
/// </summary> | /// </summary> | ||||
public const int MaxNameLength = 32; | public const int MaxNameLength = 32; | ||||
@@ -22,7 +22,7 @@ namespace Discord | |||||
string Name { get; } | string Name { get; } | ||||
/// <summary> | /// <summary> | ||||
/// The discription of this command option, 1-100 character description. | |||||
/// The description of this command option, 1-100 character description. | |||||
/// </summary> | /// </summary> | ||||
string Description { get; } | string Description { get; } | ||||
@@ -74,7 +74,7 @@ namespace Discord | |||||
/// <summary> | /// <summary> | ||||
/// Gets the original response for this interaction. | /// Gets the original response for this interaction. | ||||
/// </summary> | /// </summary> | ||||
/// <param name="options">The request options for this async request.</param> | |||||
/// <param name="options">The request options for this <see langword="async"/> request.</param> | |||||
/// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | /// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | ||||
Task<IUserMessage> GetOriginalResponseAsync (RequestOptions options = null); | Task<IUserMessage> GetOriginalResponseAsync (RequestOptions options = null); | ||||
@@ -82,7 +82,7 @@ namespace Discord | |||||
/// Edits original response for this interaction. | /// Edits original response for this interaction. | ||||
/// </summary> | /// </summary> | ||||
/// <param name="func">A delegate containing the properties to modify the message with.</param> | /// <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> | |||||
/// <param name="options">The request options for this <see langword="async"/> request.</param> | |||||
/// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | /// <returns>A <see cref="IUserMessage"/> that represents the initial response.</returns> | ||||
Task<IUserMessage> ModifyOriginalResponseAsync (Action<MessageProperties> func, RequestOptions options = null); | Task<IUserMessage> ModifyOriginalResponseAsync (Action<MessageProperties> func, RequestOptions options = null); | ||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks; | |||||
namespace Discord | namespace Discord | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Represents an interface used to specify classes that they are a vaild dataype of a <see cref="IDiscordInteraction"/> class. | |||||
/// Represents an interface used to specify classes that they are a vaild data type of a <see cref="IDiscordInteraction"/> class. | |||||
/// </summary> | /// </summary> | ||||
public interface IDiscordInteractionData { } | public interface IDiscordInteractionData { } | ||||
} | } |
@@ -25,13 +25,13 @@ namespace Discord | |||||
/// <summary> | /// <summary> | ||||
/// ACK a command without sending a message, eating the user's input. | /// ACK a command without sending a message, eating the user's input. | ||||
/// </summary> | /// </summary> | ||||
[Obsolete("This response type has been depricated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] | |||||
[Obsolete("This response type has been deprecated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] | |||||
Acknowledge = 2, | Acknowledge = 2, | ||||
/// <summary> | /// <summary> | ||||
/// Respond with a message, showing the user's input. | /// Respond with a message, showing the user's input. | ||||
/// </summary> | /// </summary> | ||||
[Obsolete("This response type has been depricated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] | |||||
[Obsolete("This response type has been deprecated by discord. Either use ChannelMessageWithSource or DeferredChannelMessageWithSource", true)] | |||||
ChannelMessage = 3, | ChannelMessage = 3, | ||||
/// <summary> | /// <summary> | ||||
@@ -13,7 +13,7 @@ namespace Discord | |||||
public class SlashCommandBuilder | public class SlashCommandBuilder | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Returns the maximun length a commands name allowed by Discord | |||||
/// Returns the maximum length a commands name allowed by Discord | |||||
/// </summary> | /// </summary> | ||||
public const int MaxNameLength = 32; | public const int MaxNameLength = 32; | ||||
/// <summary> | /// <summary> | ||||
@@ -178,7 +178,7 @@ namespace Discord | |||||
// Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, | // Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, | ||||
// https://discord.com/developers/docs/interactions/slash-commands#applicationcommand | // https://discord.com/developers/docs/interactions/slash-commands#applicationcommand | ||||
if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) | if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) | ||||
throw new ArgumentException("Command name cannot contian any special characters or whitespaces!", nameof(name)); | |||||
throw new ArgumentException("Command name cannot contain any special characters or whitespaces!", nameof(name)); | |||||
// same with description | // same with description | ||||
Preconditions.NotNullOrEmpty(description, nameof(description)); | Preconditions.NotNullOrEmpty(description, nameof(description)); | ||||
@@ -213,7 +213,7 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
/// <param name="name">The name of the option to add.</param> | /// <param name="name">The name of the option to add.</param> | ||||
/// <param name="type">The type of this option.</param> | /// <param name="type">The type of this option.</param> | ||||
/// <param name="description">The sescription of this option.</param> | |||||
/// <param name="description">The description of this option.</param> | |||||
/// <returns>The current builder.</returns> | /// <returns>The current builder.</returns> | ||||
public SlashCommandBuilder AddOption(string name, ApplicationCommandOptionType type, string description) | public SlashCommandBuilder AddOption(string name, ApplicationCommandOptionType type, string description) | ||||
=> AddOption(name, type, description, options: null, choices: null); | => AddOption(name, type, description, options: null, choices: null); | ||||
@@ -294,7 +294,7 @@ namespace Discord | |||||
if (value != null) | if (value != null) | ||||
if (!Regex.IsMatch(value, @"^[\w-]{1,32}$")) | if (!Regex.IsMatch(value, @"^[\w-]{1,32}$")) | ||||
throw new ArgumentException("Option name cannot contian any special characters or whitespaces!"); | |||||
throw new ArgumentException("Option name cannot contain any special characters or whitespaces!"); | |||||
_name = value; | _name = value; | ||||
} | } | ||||
@@ -397,7 +397,7 @@ namespace Discord | |||||
// Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, | // Discord updated the docs, this regex prevents special characters like @!$%( and s p a c e s.. etc, | ||||
// https://discord.com/developers/docs/interactions/slash-commands#applicationcommand | // https://discord.com/developers/docs/interactions/slash-commands#applicationcommand | ||||
if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) | if (!Regex.IsMatch(name, @"^[\w-]{1,32}$")) | ||||
throw new ArgumentException("Command name cannot contian any special characters or whitespaces!", nameof(name)); | |||||
throw new ArgumentException("Command name cannot contain any special characters or whitespaces!", nameof(name)); | |||||
// same with description | // same with description | ||||
Preconditions.NotNullOrEmpty(description, nameof(description)); | Preconditions.NotNullOrEmpty(description, nameof(description)); | ||||
@@ -13,7 +13,7 @@ namespace Discord | |||||
{ | { | ||||
internal override ApplicationCommandType Type => ApplicationCommandType.Slash; | internal override ApplicationCommandType Type => ApplicationCommandType.Slash; | ||||
/// <summary> | /// <summary> | ||||
/// The discription of this command. | |||||
/// The description of this command. | |||||
/// </summary> | /// </summary> | ||||
public Optional<string> Description { get; set; } | public Optional<string> Description { get; set; } | ||||
@@ -56,7 +56,7 @@ namespace Discord | |||||
/// Gets the clean content for this message. | /// Gets the clean content for this message. | ||||
/// </summary> | /// </summary> | ||||
/// <returns> | /// <returns> | ||||
/// A string that contains the body of the message stripped of mentions, markdown, emojiis and pings; note that this field may be empty if there is an embed. | |||||
/// A string that contains the body of the message stripped of mentions, markdown, emojis and pings; note that this field may be empty if there is an embed. | |||||
/// </returns> | /// </returns> | ||||
string CleanContent { get; } | string CleanContent { get; } | ||||
/// <summary> | /// <summary> | ||||
@@ -27,7 +27,7 @@ namespace Discord | |||||
/// If the <see cref="TimestampTag.Time"/> is null then the default 0 will be used. | /// If the <see cref="TimestampTag.Time"/> is null then the default 0 will be used. | ||||
/// </para> | /// </para> | ||||
/// </summary> | /// </summary> | ||||
/// <returns>A string thats compatable in a discord message, ex: <code><t:1625944201:f></code></returns> | |||||
/// <returns>A string thats compatible in a discord message, ex: <code><t:1625944201:f></code></returns> | |||||
public override string ToString() | public override string ToString() | ||||
{ | { | ||||
if (Time == null) | if (Time == null) | ||||
@@ -85,7 +85,7 @@ namespace Discord | |||||
/// <summary> If <c>true</c>, a user may stream video in a voice channel.</summary> | /// <summary> If <c>true</c>, a user may stream video in a voice channel.</summary> | ||||
public bool Stream => Permissions.GetValue(RawValue, ChannelPermission.Stream); | public bool Stream => Permissions.GetValue(RawValue, ChannelPermission.Stream); | ||||
/// <summary> If <c>true</c>, a user may adjust role permissions. This also implictly grants all other permissions.</summary> | |||||
/// <summary> If <c>true</c>, a user may adjust role permissions. This also implicitly grants all other permissions.</summary> | |||||
public bool ManageRoles => Permissions.GetValue(RawValue, ChannelPermission.ManageRoles); | public bool ManageRoles => Permissions.GetValue(RawValue, ChannelPermission.ManageRoles); | ||||
/// <summary> If <c>true</c>, a user may edit the webhooks for this channel.</summary> | /// <summary> If <c>true</c>, a user may edit the webhooks for this channel.</summary> | ||||
public bool ManageWebhooks => Permissions.GetValue(RawValue, ChannelPermission.ManageWebhooks); | public bool ManageWebhooks => Permissions.GetValue(RawValue, ChannelPermission.ManageWebhooks); | ||||
@@ -103,7 +103,7 @@ namespace Discord | |||||
public bool UseExternalStickers => Permissions.GetValue(RawValue, ChannelPermission.UseExternalStickers); | public bool UseExternalStickers => Permissions.GetValue(RawValue, ChannelPermission.UseExternalStickers); | ||||
/// <summary> If <c>true</c>, a user may send messages in threads in this guild.</summary> | /// <summary> If <c>true</c>, a user may send messages in threads in this guild.</summary> | ||||
public bool SendMessagesInThreads => Permissions.GetValue(RawValue, ChannelPermission.SendMessagesInThreads); | public bool SendMessagesInThreads => Permissions.GetValue(RawValue, ChannelPermission.SendMessagesInThreads); | ||||
/// <summary> If <c>true</c>, a user launch application activites in voice channels in this guild.</summary> | |||||
/// <summary> If <c>true</c>, a user launch application activities in voice channels in this guild.</summary> | |||||
public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, ChannelPermission.StartEmbeddedActivities); | public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, ChannelPermission.StartEmbeddedActivities); | ||||
/// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value.</summary> | /// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value.</summary> | ||||
@@ -97,7 +97,7 @@ namespace Discord | |||||
public bool UseExternalStickers => Permissions.GetValue(RawValue, GuildPermission.UseExternalStickers); | public bool UseExternalStickers => Permissions.GetValue(RawValue, GuildPermission.UseExternalStickers); | ||||
/// <summary> If <c>true</c>, a user may send messages in threads in this guild. </summary> | /// <summary> If <c>true</c>, a user may send messages in threads in this guild. </summary> | ||||
public bool SendMessagesInThreads => Permissions.GetValue(RawValue, GuildPermission.SendMessagesInThreads); | public bool SendMessagesInThreads => Permissions.GetValue(RawValue, GuildPermission.SendMessagesInThreads); | ||||
/// <summary> If <c>true</c>, a user launch application activites in voice channels in this guild. </summary> | |||||
/// <summary> If <c>true</c>, a user launch application activities in voice channels in this guild. </summary> | |||||
public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, GuildPermission.StartEmbeddedActivities); | public bool StartEmbeddedActivities => Permissions.GetValue(RawValue, GuildPermission.StartEmbeddedActivities); | ||||
/// <summary> Creates a new <see cref="GuildPermissions"/> with the provided packed value. </summary> | /// <summary> Creates a new <see cref="GuildPermissions"/> with the provided packed value. </summary> | ||||
@@ -97,7 +97,7 @@ namespace Discord | |||||
public PermValue UseExternalStickers => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.UseExternalStickers); | public PermValue UseExternalStickers => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.UseExternalStickers); | ||||
/// <summary> If <c>true</c>, a user may send messages in threads in this guild. </summary> | /// <summary> If <c>true</c>, a user may send messages in threads in this guild. </summary> | ||||
public PermValue SendMessagesInThreads => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.SendMessagesInThreads); | public PermValue SendMessagesInThreads => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.SendMessagesInThreads); | ||||
/// <summary> If <c>true</c>, a user launch application activites in voice channels in this guild. </summary> | |||||
/// <summary> If <c>true</c>, a user launch application activities in voice channels in this guild. </summary> | |||||
public PermValue StartEmbeddedActivities => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.StartEmbeddedActivities); | public PermValue StartEmbeddedActivities => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.StartEmbeddedActivities); | ||||
/// <summary> Creates a new OverwritePermissions with the provided allow and deny packed values. </summary> | /// <summary> Creates a new OverwritePermissions with the provided allow and deny packed values. </summary> | ||||
@@ -51,7 +51,7 @@ namespace Discord | |||||
/// Deletes the current sticker. | /// Deletes the current sticker. | ||||
/// </summary> | /// </summary> | ||||
/// <remakrs> | /// <remakrs> | ||||
/// The bot neeeds the MANAGE_EMOJIS_AND_STICKERS permission inside the guild in order to delete stickers. | |||||
/// The bot needs the MANAGE_EMOJIS_AND_STICKERS permission inside the guild in order to delete stickers. | |||||
/// </remakrs> | /// </remakrs> | ||||
/// <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> | ||||
@@ -24,7 +24,7 @@ namespace Discord | |||||
/// Add multiple reactions to a message. | /// Add multiple reactions to a message. | ||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
/// This method does not bulk add reactions! It will send a request for each reaction inculded. | |||||
/// This method does not bulk add reactions! It will send a request for each reaction included. | |||||
/// </remarks> | /// </remarks> | ||||
/// <example> | /// <example> | ||||
/// <code language="cs"> | /// <code language="cs"> | ||||
@@ -76,7 +76,7 @@ namespace Discord | |||||
/// <summary> | /// <summary> | ||||
/// Sends an inline reply that references a message. | /// Sends an inline reply that references a message. | ||||
/// </summary> | /// </summary> | ||||
/// <param name="msg">The message that is being replyed on.</param> | |||||
/// <param name="msg">The message that is being replied on.</param> | |||||
/// <param name="text">The message to be sent.</param> | /// <param name="text">The message to be sent.</param> | ||||
/// <param name="isTTS">Determines whether the message should be read aloud by Discord or not.</param> | /// <param name="isTTS">Determines whether the message should be read aloud by Discord or not.</param> | ||||
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> | /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> | ||||
@@ -15,7 +15,7 @@ namespace Discord | |||||
public static string Italics(string text) => $"*{text}*"; | public static string Italics(string text) => $"*{text}*"; | ||||
/// <summary> Returns a markdown-formatted string with underline formatting. </summary> | /// <summary> Returns a markdown-formatted string with underline formatting. </summary> | ||||
public static string Underline(string text) => $"__{text}__"; | public static string Underline(string text) => $"__{text}__"; | ||||
/// <summary> Returns a markdown-formatted string with strikethrough formatting. </summary> | |||||
/// <summary> Returns a markdown-formatted string with strike-through formatting. </summary> | |||||
public static string Strikethrough(string text) => $"~~{text}~~"; | public static string Strikethrough(string text) => $"~~{text}~~"; | ||||
/// <summary> Returns a string with spoiler formatting. </summary> | /// <summary> Returns a string with spoiler formatting. </summary> | ||||
public static string Spoiler(string text) => $"||{text}||"; | public static string Spoiler(string text) => $"||{text}||"; | ||||
@@ -16,10 +16,10 @@ namespace Discord | |||||
public static RequestOptions Default => new RequestOptions(); | public static RequestOptions Default => new RequestOptions(); | ||||
/// <summary> | /// <summary> | ||||
/// Gets or sets the maximum time to wait for for this request to complete. | |||||
/// Gets or sets the maximum time to wait for this request to complete. | |||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
/// Gets or set the max time, in milliseconds, to wait for for this request to complete. If | |||||
/// Gets or set the max time, in milliseconds, to wait for this request to complete. If | |||||
/// <c>null</c>, a request will not time out. If a rate limit has been triggered for this request's bucket | /// <c>null</c>, a request will not time out. If a rate limit has been triggered for this request's bucket | ||||
/// and will not be unpaused in time, this request will fail immediately. | /// and will not be unpaused in time, this request will fail immediately. | ||||
/// </remarks> | /// </remarks> | ||||
@@ -108,7 +108,6 @@ namespace Discord.Net.Examples.Core.Entities.Channels | |||||
using (channel.EnterTypingState()) await LongRunningAsync(); | using (channel.EnterTypingState()) await LongRunningAsync(); | ||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
} | } |
@@ -2227,7 +2227,7 @@ namespace Discord.API | |||||
Array.Copy(elements, 0, methodArgs, 1, elements.Length); | Array.Copy(elements, 0, methodArgs, 1, elements.Length); | ||||
} | } | ||||
int endIndex = format.IndexOf('?'); //Dont include params | |||||
int endIndex = format.IndexOf('?'); //Don't include params | |||||
if (endIndex == -1) | if (endIndex == -1) | ||||
endIndex = format.Length; | endIndex = format.Length; | ||||
@@ -10,7 +10,7 @@ using Model = Discord.API.Channel; | |||||
namespace Discord.Rest | namespace Discord.Rest | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Represents a thread channel recieved over REST. | |||||
/// Represents a thread channel received over REST. | |||||
/// </summary> | /// </summary> | ||||
public class RestThreadChannel : RestTextChannel, IThreadChannel | public class RestThreadChannel : RestTextChannel, IThreadChannel | ||||
{ | { | ||||
@@ -81,7 +81,7 @@ namespace Discord.Rest | |||||
/// <param name="userId">The id of the user to fetch.</param> | /// <param name="userId">The id of the user to fetch.</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 representing the asyncronous get operation. The task returns a | |||||
/// A task representing the asynchronous get operation. The task returns a | |||||
/// <see cref="RestThreadUser"/> if found, otherwise <see langword="null"/>. | /// <see cref="RestThreadUser"/> if found, otherwise <see langword="null"/>. | ||||
/// </returns> | /// </returns> | ||||
public new Task<RestThreadUser> GetUserAsync(ulong userId, RequestOptions options = null) | public new Task<RestThreadUser> GetUserAsync(ulong userId, RequestOptions options = null) | ||||
@@ -92,7 +92,7 @@ namespace Discord.Rest | |||||
/// </summary> | /// </summary> | ||||
/// <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 representing the asyncronous get operation. The task returns a | |||||
/// A task representing the asynchronous get operation. The task returns a | |||||
/// <see cref="IReadOnlyCollection{T}"/> of <see cref="RestThreadUser"/>'s. | /// <see cref="IReadOnlyCollection{T}"/> of <see cref="RestThreadUser"/>'s. | ||||
/// </returns> | /// </returns> | ||||
public new async Task<IReadOnlyCollection<RestThreadUser>> GetUsersAsync(RequestOptions options = null) | public new async Task<IReadOnlyCollection<RestThreadUser>> GetUsersAsync(RequestOptions options = null) | ||||
@@ -578,7 +578,7 @@ namespace Discord.Rest | |||||
/// <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 get operation. The task result contains the text channel | /// A task that represents the asynchronous get operation. The task result contains the text channel | ||||
/// where guild notices such as welcome messages and boost events are poste; <see langword="null"/> if none is found. | |||||
/// where guild notices such as welcome messages and boost events are post; <see langword="null"/> if none is found. | |||||
/// </returns> | /// </returns> | ||||
public async Task<RestTextChannel> GetSystemChannelAsync(RequestOptions options = null) | public async Task<RestTextChannel> GetSystemChannelAsync(RequestOptions options = null) | ||||
{ | { | ||||
@@ -611,11 +611,11 @@ namespace Discord.Rest | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// Gets the text channel channel where admins and moderators of Community guilds receive notices from Discord. | |||||
/// Gets the text channel where admins and moderators of Community guilds receive notices from Discord. | |||||
/// </summary> | /// </summary> | ||||
/// <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 get operation. The task result contains the text channel channel where | |||||
/// A task that represents the asynchronous get operation. The task result contains the text channel where | |||||
/// admins and moderators of Community guilds receive notices from Discord; <see langword="null"/> if none is set. | /// admins and moderators of Community guilds receive notices from Discord; <see langword="null"/> if none is set. | ||||
/// </returns> | /// </returns> | ||||
public async Task<RestTextChannel> GetPublicUpdatesChannelAsync(RequestOptions options = null) | public async Task<RestTextChannel> GetPublicUpdatesChannelAsync(RequestOptions options = null) | ||||
@@ -914,7 +914,7 @@ namespace Discord.Rest | |||||
#region Interactions | #region Interactions | ||||
/// <summary> | /// <summary> | ||||
/// Gets this guilds slash commands commands | |||||
/// Gets this guilds slash commands | |||||
/// </summary> | /// </summary> | ||||
/// <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> | ||||
@@ -1,7 +1,6 @@ | |||||
using Discord.API; | using Discord.API; | ||||
using Discord.API.Rest; | using Discord.API.Rest; | ||||
using Discord.Net; | using Discord.Net; | ||||
//using Discord.Rest.Entities.Interactions; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -26,7 +26,7 @@ namespace Discord.Rest | |||||
/// Gets the guild that this custom sticker is in. | /// Gets the guild that this custom sticker is in. | ||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
/// <b>Note</b>: This property can be <see langword="null"/> if the sticker wasnt fetched from a guild. | |||||
/// <b>Note</b>: This property can be <see langword="null"/> if the sticker wasn't fetched from a guild. | |||||
/// </remarks> | /// </remarks> | ||||
public RestGuild Guild { get; private set; } | public RestGuild Guild { get; private set; } | ||||
@@ -35,7 +35,7 @@ namespace Discord.Rest | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// Deletes this object and all of it's childern. | |||||
/// Deletes this object and all of it's children. | |||||
/// </summary> | /// </summary> | ||||
/// <returns>A task that represents the asynchronous delete operation.</returns> | /// <returns>A task that represents the asynchronous delete operation.</returns> | ||||
public Task DeleteAsync() | public Task DeleteAsync() | ||||
@@ -60,7 +60,7 @@ namespace Discord.Rest | |||||
/// A task that represents the asynchronous modification operation. | /// A task that represents the asynchronous modification operation. | ||||
/// </returns> | /// </returns> | ||||
/// <exception cref="InvalidOperationException">The token used to modify/delete this message expired.</exception> | /// <exception cref="InvalidOperationException">The token used to modify/delete this message expired.</exception> | ||||
/// /// <exception cref="Discord.Net.HttpException">Somthing went wrong during the request.</exception> | |||||
/// /// <exception cref="Discord.Net.HttpException">Something went wrong during the request.</exception> | |||||
public new async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null) | public new async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null) | ||||
{ | { | ||||
try | try | ||||
@@ -31,7 +31,7 @@ namespace Discord.Rest | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// Deletes this object and all of it's childern. | |||||
/// Deletes this object and all of it's children. | |||||
/// </summary> | /// </summary> | ||||
/// <returns>A task that represents the asynchronous delete operation.</returns> | /// <returns>A task that represents the asynchronous delete operation.</returns> | ||||
public Task DeleteAsync() | public Task DeleteAsync() | ||||
@@ -56,7 +56,7 @@ namespace Discord.Rest | |||||
/// A task that represents the asynchronous modification operation. | /// A task that represents the asynchronous modification operation. | ||||
/// </returns> | /// </returns> | ||||
/// <exception cref="InvalidOperationException">The token used to modify/delete this message expired.</exception> | /// <exception cref="InvalidOperationException">The token used to modify/delete this message expired.</exception> | ||||
/// /// <exception cref="Discord.Net.HttpException">Somthing went wrong during the request.</exception> | |||||
/// /// <exception cref="Discord.Net.HttpException">Something went wrong during the request.</exception> | |||||
public new async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null) | public new async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null) | ||||
{ | { | ||||
try | try | ||||
@@ -33,6 +33,5 @@ namespace Discord.Rest | |||||
{ | { | ||||
await client.ApiClient.DeleteWebhookAsync(webhook.Id, options).ConfigureAwait(false); | await client.ApiClient.DeleteWebhookAsync(webhook.Id, options).ConfigureAwait(false); | ||||
} | } | ||||
} | } | ||||
} | } |
@@ -435,7 +435,7 @@ namespace Discord.Net.Queue | |||||
if (!hasQueuedReset || resetTick > _resetTick) | if (!hasQueuedReset || resetTick > _resetTick) | ||||
{ | { | ||||
_resetTick = resetTick; | _resetTick = resetTick; | ||||
LastAttemptAt = resetTick.Value; //Make sure we dont destroy this until after its been reset | |||||
LastAttemptAt = resetTick.Value; //Make sure we don't destroy this until after its been reset | |||||
#if DEBUG_LIMITS | #if DEBUG_LIMITS | ||||
Debug.WriteLine($"[{id}] Reset in {(int)Math.Ceiling((resetTick - DateTimeOffset.UtcNow).Value.TotalMilliseconds)} ms"); | Debug.WriteLine($"[{id}] Reset in {(int)Math.Ceiling((resetTick - DateTimeOffset.UtcNow).Value.TotalMilliseconds)} ms"); | ||||
#endif | #endif | ||||
@@ -456,7 +456,7 @@ namespace Discord.Net.Queue | |||||
lock (_lock) | lock (_lock) | ||||
{ | { | ||||
millis = (int)Math.Ceiling((_resetTick.Value - DateTimeOffset.UtcNow).TotalMilliseconds); | millis = (int)Math.Ceiling((_resetTick.Value - DateTimeOffset.UtcNow).TotalMilliseconds); | ||||
if (millis <= 0) //Make sure we havent gotten a more accurate reset time | |||||
if (millis <= 0) //Make sure we haven't gotten a more accurate reset time | |||||
{ | { | ||||
#if DEBUG_LIMITS | #if DEBUG_LIMITS | ||||
Debug.WriteLine($"[{id}] * Reset *"); | Debug.WriteLine($"[{id}] * Reset *"); | ||||
@@ -14,7 +14,7 @@ namespace Discord.API.Voice | |||||
[JsonProperty("modes")] | [JsonProperty("modes")] | ||||
public string[] Modes { get; set; } | public string[] Modes { get; set; } | ||||
[JsonProperty("heartbeat_interval")] | [JsonProperty("heartbeat_interval")] | ||||
[Obsolete("This field is errorneous and should not be used", true)] | |||||
[Obsolete("This field is erroneous and should not be used", true)] | |||||
public int HeartbeatInterval { get; set; } | public int HeartbeatInterval { get; set; } | ||||
} | } | ||||
} | } |
@@ -125,7 +125,7 @@ namespace Discord.Audio.Streams | |||||
timestamp += OpusEncoder.FrameSamplesPerChannel; | timestamp += OpusEncoder.FrameSamplesPerChannel; | ||||
} | } | ||||
#if DEBUG | #if DEBUG | ||||
var _ = _logger?.DebugAsync("Buffer underrun"); | |||||
var _ = _logger?.DebugAsync("Buffer under run"); | |||||
#endif | #endif | ||||
} | } | ||||
} | } | ||||
@@ -51,7 +51,7 @@ namespace Discord.WebSocket | |||||
/// Provides access to a REST-only client with a shared state from this client. | /// Provides access to a REST-only client with a shared state from this client. | ||||
/// </summary> | /// </summary> | ||||
public override DiscordSocketRestClient Rest { get; } | public override DiscordSocketRestClient Rest { get; } | ||||
/// <summary> Gets the shard of of this client. </summary> | |||||
/// <summary> Gets the shard of this client. </summary> | |||||
public int ShardId { get; } | public int ShardId { get; } | ||||
/// <summary> Gets the current connection state of this client. </summary> | /// <summary> Gets the current connection state of this client. </summary> | ||||
public ConnectionState ConnectionState => _connection.State; | public ConnectionState ConnectionState => _connection.State; | ||||
@@ -438,7 +438,7 @@ namespace Discord.WebSocket | |||||
var entity = State.GetOrAddCommand(model.Id, (id) => SocketApplicationCommand.Create(this, model)); | var entity = State.GetOrAddCommand(model.Id, (id) => SocketApplicationCommand.Create(this, model)); | ||||
//Update it incase it was cached | |||||
//Update it in case it was cached | |||||
entity.Update(model); | entity.Update(model); | ||||
return entity; | return entity; | ||||
@@ -1522,7 +1522,7 @@ namespace Discord.WebSocket | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
//Edited message isnt in cache, create a detached one | |||||
//Edited message isn't in cache, create a detached one | |||||
SocketUser author; | SocketUser author; | ||||
if (data.Author.IsSpecified) | if (data.Author.IsSpecified) | ||||
{ | { | ||||
@@ -79,7 +79,7 @@ namespace Discord.WebSocket | |||||
/// <remarks> | /// <remarks> | ||||
/// <para> | /// <para> | ||||
/// By default, the Discord gateway will only send offline members if a guild has less than a certain number | /// By default, the Discord gateway will only send offline members if a guild has less than a certain number | ||||
/// of members (determined by <see cref="LargeThreshold"/> in this library). This behaviour is why | |||||
/// of members (determined by <see cref="LargeThreshold"/> in this library). This behavior is why | |||||
/// sometimes a user may be missing from the WebSocket cache for collections such as | /// sometimes a user may be missing from the WebSocket cache for collections such as | ||||
/// <see cref="Discord.WebSocket.SocketGuild.Users"/>. | /// <see cref="Discord.WebSocket.SocketGuild.Users"/>. | ||||
/// </para> | /// </para> | ||||
@@ -11,7 +11,7 @@ using StageInstance = Discord.API.StageInstance; | |||||
namespace Discord.WebSocket | namespace Discord.WebSocket | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Represents a stage channel recieved over the gateway. | |||||
/// Represents a stage channel received over the gateway. | |||||
/// </summary> | /// </summary> | ||||
public class SocketStageChannel : SocketVoiceChannel, IStageChannel | public class SocketStageChannel : SocketVoiceChannel, IStageChannel | ||||
{ | { | ||||
@@ -1551,7 +1551,7 @@ namespace Discord.WebSocket | |||||
} | } | ||||
internal async Task FinishConnectAudio(string url, string token) | internal async Task FinishConnectAudio(string url, string token) | ||||
{ | { | ||||
//TODO: Mem Leak: Disconnected/Connected handlers arent cleaned up | |||||
//TODO: Mem Leak: Disconnected/Connected handlers aren't cleaned up | |||||
var voiceState = GetVoiceState(Discord.CurrentUser.Id).Value; | var voiceState = GetVoiceState(Discord.CurrentUser.Id).Value; | ||||
await _audioLock.WaitAsync().ConfigureAwait(false); | await _audioLock.WaitAsync().ConfigureAwait(false); | ||||
@@ -10,7 +10,7 @@ namespace Discord.WebSocket | |||||
public class SocketMessageCommandData : SocketCommandBaseData | public class SocketMessageCommandData : SocketCommandBaseData | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Gets the messagte associated with this message command. | |||||
/// Gets the message associated with this message command. | |||||
/// </summary> | /// </summary> | ||||
public SocketMessage Message | public SocketMessage Message | ||||
=> ResolvableData?.Messages.FirstOrDefault().Value; | => ResolvableData?.Messages.FirstOrDefault().Value; | ||||
@@ -131,7 +131,7 @@ namespace Discord.WebSocket | |||||
/// Updates the message which this component resides in with the type <see cref="InteractionResponseType.UpdateMessage"/> | /// Updates the message which this component resides in with the type <see cref="InteractionResponseType.UpdateMessage"/> | ||||
/// </summary> | /// </summary> | ||||
/// <param name="func">A delegate containing the properties to modify the message with.</param> | /// <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> | |||||
/// <param name="options">The request options for this <see langword="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> | ||||
public async Task UpdateAsync(Action<MessageProperties> func, RequestOptions options = null) | public async Task UpdateAsync(Action<MessageProperties> func, RequestOptions options = null) | ||||
{ | { | ||||
@@ -330,7 +330,7 @@ namespace Discord.WebSocket | |||||
/// Defers an interaction and responds with type 5 (<see cref="InteractionResponseType.DeferredChannelMessageWithSource"/>) | /// Defers an interaction and responds with type 5 (<see cref="InteractionResponseType.DeferredChannelMessageWithSource"/>) | ||||
/// </summary> | /// </summary> | ||||
/// <param name="ephemeral"><see langword="true"/> to send this message ephemerally, otherwise <see langword="false"/>.</param> | /// <param name="ephemeral"><see langword="true"/> to send this message ephemerally, otherwise <see langword="false"/>.</param> | ||||
/// <param name="options">The request options for this async request.</param> | |||||
/// <param name="options">The request options for this <see langword="async"/> request.</param> | |||||
/// <returns> | /// <returns> | ||||
/// A task that represents the asynchronous operation of acknowledging the interaction. | /// A task that represents the asynchronous operation of acknowledging the interaction. | ||||
/// </returns> | /// </returns> | ||||
@@ -75,7 +75,7 @@ namespace Discord.WebSocket | |||||
/// <inheritdoc/> | /// <inheritdoc/> | ||||
[Obsolete("Autocomplete interactions cannot be defered!", true)] | |||||
[Obsolete("Autocomplete interactions cannot be deferred!", true)] | |||||
public override Task DeferAsync(bool ephemeral = false, RequestOptions options = null) => throw new NotSupportedException(); | public override Task DeferAsync(bool ephemeral = false, RequestOptions options = null) => throw new NotSupportedException(); | ||||
/// <inheritdoc/> | /// <inheritdoc/> | ||||
@@ -35,7 +35,7 @@ namespace Discord.WebSocket | |||||
public ulong Version { get; } | public ulong Version { get; } | ||||
/// <summary> | /// <summary> | ||||
/// Gets the current autocomplete option that is activly being filled out. | |||||
/// Gets the current autocomplete option that is actively being filled out. | |||||
/// </summary> | /// </summary> | ||||
public AutocompleteOption Current { get; } | public AutocompleteOption Current { get; } | ||||
@@ -6,7 +6,7 @@ using Model = Discord.API.ApplicationCommandInteractionDataOption; | |||||
namespace Discord.WebSocket | namespace Discord.WebSocket | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Represents a Websocket-based <see cref="IApplicationCommandInteractionDataOption"/> recieved by the gateway | |||||
/// Represents a Websocket-based <see cref="IApplicationCommandInteractionDataOption"/> received by the gateway | |||||
/// </summary> | /// </summary> | ||||
public class SocketSlashCommandDataOption : IApplicationCommandInteractionDataOption | public class SocketSlashCommandDataOption : IApplicationCommandInteractionDataOption | ||||
{ | { | ||||
@@ -8,7 +8,7 @@ using System.IO; | |||||
namespace Discord.WebSocket | namespace Discord.WebSocket | ||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Represents an Interaction recieved over the gateway. | |||||
/// Represents an Interaction received over the gateway. | |||||
/// </summary> | /// </summary> | ||||
public abstract class SocketInteraction : SocketEntity<ulong>, IDiscordInteraction | public abstract class SocketInteraction : SocketEntity<ulong>, IDiscordInteraction | ||||
{ | { | ||||
@@ -23,7 +23,7 @@ namespace Discord.WebSocket | |||||
/// <remarks> | /// <remarks> | ||||
/// <note> | /// <note> | ||||
/// This may return <see langword="null"/> in the WebSocket implementation due to incomplete user collection in | /// This may return <see langword="null"/> in the WebSocket implementation due to incomplete user collection in | ||||
/// large guilds, or the bot doesnt have the MANAGE_EMOJIS_AND_STICKERS permission. | |||||
/// large guilds, or the bot doesn't have the MANAGE_EMOJIS_AND_STICKERS permission. | |||||
/// </note> | /// </note> | ||||
/// </remarks> | /// </remarks> | ||||
public SocketGuildUser Author | public SocketGuildUser Author | ||||
@@ -171,7 +171,7 @@ namespace Discord | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// Tests that valid urls do not throw any exceptions. | |||||
/// Tests that valid url's do not throw any exceptions. | |||||
/// </summary> | /// </summary> | ||||
/// <param name="url">The url to set.</param> | /// <param name="url">The url to set.</param> | ||||
[Theory] | [Theory] | ||||
@@ -68,7 +68,7 @@ namespace Discord | |||||
[InlineData(">>__uwu__", "uwu")] | [InlineData(">>__uwu__", "uwu")] | ||||
[InlineData("```uwu```", "uwu")] | [InlineData("```uwu```", "uwu")] | ||||
[InlineData("~uwu~", "uwu")] | [InlineData("~uwu~", "uwu")] | ||||
[InlineData("berries __and__ *Cream**, i'm a little lad who loves berries and cream", "berries and Cream, i'm a little lad who loves berries and cream")] | |||||
[InlineData("berries __and__ *Cream**, I'm a little lad who loves berries and cream", "berries and Cream, I'm a little lad who loves berries and cream")] | |||||
public void StripMarkdown(string input, string expected) | public void StripMarkdown(string input, string expected) | ||||
{ | { | ||||
var test = Format.StripMarkDown(input); | var test = Format.StripMarkDown(input); | ||||