diff --git a/DisCatSharp.CommandsNext/CommandsNextExtension.cs b/DisCatSharp.CommandsNext/CommandsNextExtension.cs
index e9447807ab..717168ad73 100644
--- a/DisCatSharp.CommandsNext/CommandsNextExtension.cs
+++ b/DisCatSharp.CommandsNext/CommandsNextExtension.cs
@@ -185,7 +185,7 @@ internal CommandsNextExtension(CommandsNextConfiguration cfg)
/// DO NOT USE THIS MANUALLY.
///
/// DO NOT USE THIS MANUALLY.
- ///
+ ///
protected internal override void Setup(DiscordClient client)
{
if (this.Client != null)
diff --git a/DisCatSharp.Common/Attributes/DateTimeFormatAttribute.cs b/DisCatSharp.Common/Attributes/DateTimeFormatAttribute.cs
index c2c2232d6d..adb5c3447e 100644
--- a/DisCatSharp.Common/Attributes/DateTimeFormatAttribute.cs
+++ b/DisCatSharp.Common/Attributes/DateTimeFormatAttribute.cs
@@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Serialization;
///
-/// Defines the format for string-serialized and objects.
+/// Defines the format for string-serialized and objects.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class DateTimeFormatAttribute : SerializationAttribute
@@ -90,7 +90,7 @@ public DateTimeFormatAttribute(string format)
}
///
-/// Defines which built-in format to use for for and serialization.
+/// Defines which built-in format to use for for and serialization.
/// See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings and https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings for more details.
///
public enum DateTimeFormatKind : int
diff --git a/DisCatSharp.Common/Attributes/TimeSpanAttributes.cs b/DisCatSharp.Common/Attributes/TimeSpanAttributes.cs
index af1e257edb..b5b123fbae 100644
--- a/DisCatSharp.Common/Attributes/TimeSpanAttributes.cs
+++ b/DisCatSharp.Common/Attributes/TimeSpanAttributes.cs
@@ -25,7 +25,7 @@
namespace DisCatSharp.Common.Serialization;
///
-/// Specifies that this will be serialized as a number of whole seconds.
+/// Specifies that this will be serialized as a number of whole seconds.
/// This value will always be serialized as a number.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
@@ -33,7 +33,7 @@ public sealed class TimeSpanSecondsAttribute : SerializationAttribute
{ }
///
-/// Specifies that this will be serialized as a number of whole milliseconds.
+/// Specifies that this will be serialized as a number of whole milliseconds.
/// This value will always be serialized as a number.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
diff --git a/DisCatSharp.Common/Attributes/TimeSpanFormatAttribute.cs b/DisCatSharp.Common/Attributes/TimeSpanFormatAttribute.cs
index af570ce41f..8506149121 100644
--- a/DisCatSharp.Common/Attributes/TimeSpanFormatAttribute.cs
+++ b/DisCatSharp.Common/Attributes/TimeSpanFormatAttribute.cs
@@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Serialization;
///
-/// Defines the format for string-serialized objects.
+/// Defines the format for string-serialized objects.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class TimeSpanFormatAttribute : SerializationAttribute
@@ -90,7 +90,7 @@ public TimeSpanFormatAttribute(string format)
}
///
-/// Defines which built-in format to use for serialization.
+/// Defines which built-in format to use for serialization.
/// See https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings and https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-timespan-format-strings for more details.
///
public enum TimeSpanFormatKind : int
diff --git a/DisCatSharp.Common/Attributes/UnixTimestampAttributes.cs b/DisCatSharp.Common/Attributes/UnixTimestampAttributes.cs
index cf3b9aed8d..32144740a8 100644
--- a/DisCatSharp.Common/Attributes/UnixTimestampAttributes.cs
+++ b/DisCatSharp.Common/Attributes/UnixTimestampAttributes.cs
@@ -25,7 +25,7 @@
namespace DisCatSharp.Common.Serialization;
///
-/// Specifies that this or will be serialized as Unix timestamp seconds.
+/// Specifies that this or will be serialized as Unix timestamp seconds.
/// This value will always be serialized as a number.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
@@ -33,7 +33,7 @@ public sealed class UnixSecondsAttribute : SerializationAttribute
{ }
///
-/// Specifies that this or will be serialized as Unix timestamp milliseconds.
+/// Specifies that this or will be serialized as Unix timestamp milliseconds.
/// This value will always be serialized as a number.
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
diff --git a/DisCatSharp.Common/Types/CharSpanLookupDictionary.cs b/DisCatSharp.Common/Types/CharSpanLookupDictionary.cs
index 3ace497bc4..75e2141ea6 100644
--- a/DisCatSharp.Common/Types/CharSpanLookupDictionary.cs
+++ b/DisCatSharp.Common/Types/CharSpanLookupDictionary.cs
@@ -28,7 +28,7 @@
namespace DisCatSharp.Common;
///
-/// Represents collection of string keys and values, allowing the use of for dictionary operations.
+/// Represents collection of string keys and values, allowing the use of for dictionary operations.
///
/// Type of items in this dictionary.
public sealed class CharSpanLookupDictionary :
diff --git a/DisCatSharp.Common/Types/CharSpanLookupReadOnlyDictionary.cs b/DisCatSharp.Common/Types/CharSpanLookupReadOnlyDictionary.cs
index b8c3b2a1d5..e10dd97ff7 100644
--- a/DisCatSharp.Common/Types/CharSpanLookupReadOnlyDictionary.cs
+++ b/DisCatSharp.Common/Types/CharSpanLookupReadOnlyDictionary.cs
@@ -29,7 +29,7 @@
namespace DisCatSharp.Common;
///
-/// Represents collection of string keys and values, allowing the use of for dictionary operations.
+/// Represents collection of string keys and values, allowing the use of for dictionary operations.
///
/// Type of items in this dictionary.
public sealed class CharSpanLookupReadOnlyDictionary : IReadOnlyDictionary
diff --git a/DisCatSharp.Common/Types/ContinuousMemoryBuffer.cs b/DisCatSharp.Common/Types/ContinuousMemoryBuffer.cs
index 0368bb08dc..95937b8fb6 100644
--- a/DisCatSharp.Common/Types/ContinuousMemoryBuffer.cs
+++ b/DisCatSharp.Common/Types/ContinuousMemoryBuffer.cs
@@ -55,7 +55,7 @@ public sealed class ContinuousMemoryBuffer : IMemoryBuffer where T : unman
/// Creates a new buffer with a specified segment size, specified number of initially-allocated segments, and supplied memory pool.
///
/// Initial size of the buffer in bytes. Defaults to 64KiB.
- /// Memory pool to use for renting buffers. Defaults to .
+ /// Memory pool to use for renting buffers. Defaults to .
/// Determines whether the underlying buffers should be cleared on exit. If dealing with sensitive data, it might be a good idea to set this option to true.
public ContinuousMemoryBuffer(int initialSize = 65536, MemoryPool memPool = default, bool clearOnDispose = false)
{
diff --git a/DisCatSharp.Common/Types/MemoryBuffer.cs b/DisCatSharp.Common/Types/MemoryBuffer.cs
index bc90b25aab..fd91cdd1f5 100644
--- a/DisCatSharp.Common/Types/MemoryBuffer.cs
+++ b/DisCatSharp.Common/Types/MemoryBuffer.cs
@@ -59,7 +59,7 @@ public sealed class MemoryBuffer : IMemoryBuffer where T : unmanaged
///
/// Byte size of an individual segment. Defaults to 64KiB.
/// Number of segments to allocate. Defaults to 0.
- /// Memory pool to use for renting buffers. Defaults to .
+ /// Memory pool to use for renting buffers. Defaults to .
/// Determines whether the underlying buffers should be cleared on exit. If dealing with sensitive data, it might be a good idea to set this option to true.
public MemoryBuffer(int segmentSize = 65536, int initialSegmentCount = 0, MemoryPool memPool = default, bool clearOnDispose = false)
{
diff --git a/DisCatSharp.Common/Types/SecureRandom.cs b/DisCatSharp.Common/Types/SecureRandom.cs
index 917747b7c7..c7a8002522 100644
--- a/DisCatSharp.Common/Types/SecureRandom.cs
+++ b/DisCatSharp.Common/Types/SecureRandom.cs
@@ -29,7 +29,7 @@
namespace DisCatSharp.Common;
///
-/// Provides a cryptographically-secure pseudorandom number generator (CSPRNG) implementation compatible with .
+/// Provides a cryptographically-secure pseudorandom number generator (CSPRNG) implementation compatible with .
///
public sealed class SecureRandom : Random, IDisposable
{
diff --git a/DisCatSharp.Common/Types/Serialization/ComplexDecomposer.cs b/DisCatSharp.Common/Types/Serialization/ComplexDecomposer.cs
index dc7f309762..b6c5e5e39e 100644
--- a/DisCatSharp.Common/Types/Serialization/ComplexDecomposer.cs
+++ b/DisCatSharp.Common/Types/Serialization/ComplexDecomposer.cs
@@ -27,7 +27,7 @@
namespace DisCatSharp.Common.Serialization;
///
-/// Decomposes numbers into tuples (arrays of 2).
+/// Decomposes numbers into tuples (arrays of 2).
///
public sealed class ComplexDecomposer : IDecomposer
{
diff --git a/DisCatSharp.Common/Utilities/AsyncEvent/AsyncEvent.cs b/DisCatSharp.Common/Utilities/AsyncEvent/AsyncEvent.cs
index 55496f2433..d838d23af3 100644
--- a/DisCatSharp.Common/Utilities/AsyncEvent/AsyncEvent.cs
+++ b/DisCatSharp.Common/Utilities/AsyncEvent/AsyncEvent.cs
@@ -56,7 +56,7 @@ public sealed class AsyncEvent : AsyncEvent
where TArgs : AsyncEventArgs
{
///
- /// Gets the maximum allotted execution time for all handlers. Any event which causes the handler to time out
+ /// Gets the maximum allotted execution time for all handlers. Any event which causes the handler to time out
/// will raise a non-fatal .
///
public TimeSpan MaximumExecutionTime { get; }
@@ -69,7 +69,7 @@ public sealed class AsyncEvent : AsyncEvent
/// Creates a new asynchronous event with specified name and exception handler.
///
/// Name of this event.
- /// Maximum handler execution time. A value of means infinite.
+ /// Maximum handler execution time. A value of means infinite.
/// Delegate which handles exceptions caused by this event.
public AsyncEvent(string name, TimeSpan maxExecutionTime, AsyncEventExceptionHandler exceptionHandler)
: base(name)
diff --git a/DisCatSharp.Common/Utilities/AsyncManualResetEvent.cs b/DisCatSharp.Common/Utilities/AsyncManualResetEvent.cs
index 1dd49f83da..129a9fdb13 100644
--- a/DisCatSharp.Common/Utilities/AsyncManualResetEvent.cs
+++ b/DisCatSharp.Common/Utilities/AsyncManualResetEvent.cs
@@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Utilities;
///
-/// Represents a thread synchronization event that, when signaled, must be reset manually. Unlike , this event is asynchronous.
+/// Represents a thread synchronization event that, when signaled, must be reset manually. Unlike , this event is asynchronous.
///
public sealed class AsyncManualResetEvent
{
diff --git a/DisCatSharp.Common/Utilities/Extensions.cs b/DisCatSharp.Common/Utilities/Extensions.cs
index 7777aa83f1..ce4dee7a53 100644
--- a/DisCatSharp.Common/Utilities/Extensions.cs
+++ b/DisCatSharp.Common/Utilities/Extensions.cs
@@ -32,8 +32,8 @@ namespace DisCatSharp.Common;
public static class Extensions
{
///
- /// Deconstructs a key-value pair item () into 2 separate variables.
- /// This allows for enumerating over dictionaries in foreach blocks by using a (k, v) tuple as the enumerator variable, instead of having to use a directly.
+ /// Deconstructs a key-value pair item () into 2 separate variables.
+ /// This allows for enumerating over dictionaries in foreach blocks by using a (k, v) tuple as the enumerator variable, instead of having to use a directly.
///
/// Type of dictionary item key.
/// Type of dictionary item value.
diff --git a/DisCatSharp.Interactivity/EventHandling/Requests/PaginationRequest.cs b/DisCatSharp.Interactivity/EventHandling/Requests/PaginationRequest.cs
index dd28566208..5cc48ff5a8 100644
--- a/DisCatSharp.Interactivity/EventHandling/Requests/PaginationRequest.cs
+++ b/DisCatSharp.Interactivity/EventHandling/Requests/PaginationRequest.cs
@@ -179,7 +179,7 @@ public async Task PreviousPageAsync()
///
/// Gets the buttons async.
///
- ///
+ ///
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
public async Task> GetButtonsAsync()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
diff --git a/DisCatSharp.Interactivity/Extensions/ChannelExtensions.cs b/DisCatSharp.Interactivity/Extensions/ChannelExtensions.cs
index 2f9e96daa3..5710cd1868 100644
--- a/DisCatSharp.Interactivity/Extensions/ChannelExtensions.cs
+++ b/DisCatSharp.Interactivity/Extensions/ChannelExtensions.cs
@@ -43,7 +43,7 @@ public static class ChannelExtensions
/// The channel to monitor.
/// A predicate that should return if a message matches.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task> GetNextMessageAsync(this DiscordChannel channel, Func predicate, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).WaitForMessageAsync(msg => msg.ChannelId == channel.Id && predicate(msg), timeoutOverride);
@@ -52,7 +52,7 @@ public static Task> GetNextMessageAsync(this
///
/// The channel to monitor.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task> GetNextMessageAsync(this DiscordChannel channel, TimeSpan? timeoutOverride = null)
=> channel.GetNextMessageAsync(msg => true, timeoutOverride);
@@ -62,7 +62,7 @@ public static Task> GetNextMessageAsync(this
/// The channel to monitor.
/// The target user.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task> GetNextMessageAsync(this DiscordChannel channel, DiscordUser user, TimeSpan? timeoutOverride = null)
=> channel.GetNextMessageAsync(msg => msg.Author.Id == user.Id, timeoutOverride);
@@ -72,7 +72,7 @@ public static Task> GetNextMessageAsync(this
/// The target channel.
/// The target user.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task> WaitForUserTypingAsync(this DiscordChannel channel, DiscordUser user, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).WaitForUserTypingAsync(user, channel, timeoutOverride);
@@ -87,7 +87,7 @@ public static Task> WaitForUserTypingA
/// Pagination behaviour (when hitting max and min indices).
/// Deletion behaviour.
/// Override timeout period.
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable pages, PaginationEmojis emojis, PaginationBehaviour? behaviour = default, PaginationDeletion? deletion = default, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, emojis, behaviour, deletion, timeoutOverride);
@@ -101,7 +101,7 @@ public static Task SendPaginatedMessageAsync(this DiscordChannel channel, Discor
/// Pagination behaviour.
/// Deletion behaviour
/// A custom cancellation token that can be cancelled at any point.
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable pages, PaginationButtons buttons, PaginationBehaviour? behaviour = default, ButtonPaginationBehavior? deletion = default, CancellationToken token = default)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, buttons, behaviour, deletion, token);
@@ -119,7 +119,7 @@ public static Task SendPaginatedMessageAsync(this DiscordChannel channel, Discor
/// Pagination behaviour.
/// Deletion behaviour.
/// Override timeout period.
- /// Thrown if interactivity is not enabled for the client associated with the channel.
+ /// Thrown if interactivity is not enabled for the client associated with the channel.
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable pages, PaginationButtons buttons, TimeSpan? timeoutOverride, PaginationBehaviour? behaviour = default, ButtonPaginationBehavior? deletion = default)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, buttons, timeoutOverride, behaviour, deletion);
diff --git a/DisCatSharp.Interactivity/Extensions/ClientExtensions.cs b/DisCatSharp.Interactivity/Extensions/ClientExtensions.cs
index 036fe37577..80279d85e8 100644
--- a/DisCatSharp.Interactivity/Extensions/ClientExtensions.cs
+++ b/DisCatSharp.Interactivity/Extensions/ClientExtensions.cs
@@ -39,7 +39,7 @@ public static class ClientExtensions
/// The client to enable interactivity for.
/// A configuration instance. Default configuration values will be used if none is provided.
/// A brand new instance.
- /// Thrown if interactivity has already been enabled for the client instance.
+ /// Thrown if interactivity has already been enabled for the client instance.
public static InteractivityExtension UseInteractivity(this DiscordClient client, InteractivityConfiguration configuration = null)
{
if (client.GetExtension() != null) throw new InvalidOperationException($"Interactivity is already enabled for this {(client.IsShard ? "shard" : "client")}.");
diff --git a/DisCatSharp.Interactivity/Extensions/MessageExtensions.cs b/DisCatSharp.Interactivity/Extensions/MessageExtensions.cs
index 215cb40a3b..7351706846 100644
--- a/DisCatSharp.Interactivity/Extensions/MessageExtensions.cs
+++ b/DisCatSharp.Interactivity/Extensions/MessageExtensions.cs
@@ -125,7 +125,7 @@ public static Task> Wai
///
/// The message to wait on.
/// The predicate to filter interactions by.
- /// A token to cancel interactivity with at any time. Pass to wait indefinitely.
+ /// A token to cancel interactivity with at any time. Pass to wait indefinitely.
public static Task> WaitForButtonAsync(this DiscordMessage message, Func predicate, CancellationToken token)
=> GetInteractivity(message).WaitForButtonAsync(message, predicate, token);
@@ -135,7 +135,7 @@ public static Task> Wai
/// The message to wait for.
/// A filter predicate.
/// Override the timeout period specified in .
- /// Thrown when the message doesn't contain any dropdowns
+ /// Thrown when the message doesn't contain any dropdowns
public static Task> WaitForSelectAsync(this DiscordMessage message, Func predicate, TimeSpan? timeoutOverride = null)
=> GetInteractivity(message).WaitForSelectAsync(message, predicate, timeoutOverride);
@@ -145,8 +145,8 @@ public static Task> Wai
///
/// The message to wait for.
/// A filter predicate.
- /// A token that can be used to cancel interactivity. Pass to wait indefinitely.
- /// Thrown when the message doesn't contain any dropdowns
+ /// A token that can be used to cancel interactivity. Pass to wait indefinitely.
+ /// Thrown when the message doesn't contain any dropdowns
public static Task> WaitForSelectAsync(this DiscordMessage message, Func predicate, CancellationToken token)
=> GetInteractivity(message).WaitForSelectAsync(message, predicate, token);
@@ -194,7 +194,7 @@ public static Task> Wai
/// Target message.
/// The target user.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the message.
+ /// Thrown if interactivity is not enabled for the client associated with the message.
public static Task> WaitForReactionAsync(this DiscordMessage message, DiscordUser user, TimeSpan? timeoutOverride = null)
=> GetInteractivity(message).WaitForReactionAsync(message, user, timeoutOverride);
@@ -205,7 +205,7 @@ public static Task> WaitForReac
/// The target user.
/// The target emoji.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the message.
+ /// Thrown if interactivity is not enabled for the client associated with the message.
public static Task> WaitForReactionAsync(this DiscordMessage message, DiscordUser user, DiscordEmoji emoji, TimeSpan? timeoutOverride = null)
=> GetInteractivity(message).WaitForReactionAsync(e => e.Emoji == emoji, message, user, timeoutOverride);
@@ -214,7 +214,7 @@ public static Task> WaitForReac
///
/// The message to collect reactions from.
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the message.
+ /// Thrown if interactivity is not enabled for the client associated with the message.
public static Task> CollectReactionsAsync(this DiscordMessage message, TimeSpan? timeoutOverride = null)
=> GetInteractivity(message).CollectReactionsAsync(message, timeoutOverride);
@@ -226,7 +226,7 @@ public static Task> CollectReactionsAsync(this Disc
/// Options for this poll.
/// Overrides the action set in
/// Overrides the timeout set in
- /// Thrown if interactivity is not enabled for the client associated with the message.
+ /// Thrown if interactivity is not enabled for the client associated with the message.
public static Task> DoPollAsync(this DiscordMessage message, IEnumerable emojis, PollBehaviour? behaviorOverride = null, TimeSpan? timeoutOverride = null)
=> GetInteractivity(message).DoPollAsync(message, emojis, behaviorOverride, timeoutOverride);
diff --git a/DisCatSharp.Interactivity/InteractivityExtension.cs b/DisCatSharp.Interactivity/InteractivityExtension.cs
index 42cfda735b..c0fa81fed5 100644
--- a/DisCatSharp.Interactivity/InteractivityExtension.cs
+++ b/DisCatSharp.Interactivity/InteractivityExtension.cs
@@ -135,8 +135,8 @@ public async Task> DoPollAsync(DiscordMessage m, I
/// A collection of buttons to listen for.
/// Override the timeout period in .
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public Task> WaitForButtonAsync(DiscordMessage message, IEnumerable buttons, TimeSpan? timeoutOverride = null)
=> this.WaitForButtonAsync(message, buttons, this.GetCancellationToken(timeoutOverride));
@@ -147,8 +147,8 @@ public Task> WaitForBut
/// A collection of buttons to listen for.
/// A custom cancellation token that can be cancelled at any point.
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public async Task> WaitForButtonAsync(DiscordMessage message, IEnumerable buttons, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -204,8 +204,8 @@ await this
/// The message to wait for the button on.
/// Override the timeout period specified in .
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public Task> WaitForButtonAsync(DiscordMessage message, TimeSpan? timeoutOverride = null)
=> this.WaitForButtonAsync(message, this.GetCancellationToken(timeoutOverride));
@@ -215,8 +215,8 @@ public Task> WaitForBut
/// The message to wait for the button on.
/// A custom cancellation token that can be cancelled at any point.
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public async Task> WaitForButtonAsync(DiscordMessage message, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -246,8 +246,8 @@ await this
/// The user to wait for the button press from.
/// Override the timeout period specified in .
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public Task> WaitForButtonAsync(DiscordMessage message, DiscordUser user, TimeSpan? timeoutOverride = null)
=> this.WaitForButtonAsync(message, user, this.GetCancellationToken(timeoutOverride));
@@ -258,8 +258,8 @@ public Task> WaitForBut
/// The user to wait for the button press from.
/// A custom cancellation token that can be cancelled at any point.
/// A with the result of button that was pressed, if any.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public async Task> WaitForButtonAsync(DiscordMessage message, DiscordUser user, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -287,8 +287,8 @@ public async Task> Wait
/// The Id of the button to wait for.
/// Override the timeout period specified in .
/// A with the result of the operation.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public Task> WaitForButtonAsync(DiscordMessage message, string id, TimeSpan? timeoutOverride = null)
=> this.WaitForButtonAsync(message, id, this.GetCancellationToken(timeoutOverride));
@@ -299,8 +299,8 @@ public Task> WaitForBut
/// The Id of the button to wait for.
/// Override the timeout period specified in .
/// A with the result of the operation.
- /// Thrown when attempting to wait for a message that is not authored by the current user.
- /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
+ /// Thrown when attempting to wait for a message that is not authored by the current user.
+ /// Thrown when the message does not contain a button with the specified Id, or any buttons at all.
public async Task> WaitForButtonAsync(DiscordMessage message, string id, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -336,7 +336,7 @@ public Task> WaitForBut
///
/// The message to wait on.
/// The predicate to filter interactions by.
- /// A token to cancel interactivity with at any time. Pass to wait indefinitely.
+ /// A token to cancel interactivity with at any time. Pass to wait indefinitely.
public async Task> WaitForButtonAsync(DiscordMessage message, Func predicate, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -363,7 +363,7 @@ public async Task> Wait
/// The message to wait for.
/// A filter predicate.
/// Override the timeout period specified in .
- /// Thrown when the Provided message does not contain any dropdowns
+ /// Thrown when the Provided message does not contain any dropdowns
public Task> WaitForSelectAsync(DiscordMessage message, Func predicate, TimeSpan? timeoutOverride = null)
=> this.WaitForSelectAsync(message, predicate, this.GetCancellationToken(timeoutOverride));
@@ -372,8 +372,8 @@ public Task> WaitForSel
///
/// The message to wait for.
/// A filter predicate.
- /// A token that can be used to cancel interactivity. Pass to wait indefinitely.
- /// Thrown when the Provided message does not contain any dropdowns
+ /// A token that can be used to cancel interactivity. Pass to wait indefinitely.
+ /// Thrown when the Provided message does not contain any dropdowns
public async Task> WaitForSelectAsync(DiscordMessage message, Func predicate, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -400,7 +400,7 @@ public async Task> Wait
/// The message to wait on.
/// The Id of the dropdown to wait on.
/// Override the timeout period specified in .
- /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
+ /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
public Task> WaitForSelectAsync(DiscordMessage message, string id, TimeSpan? timeoutOverride = null)
=> this.WaitForSelectAsync(message, id, this.GetCancellationToken(timeoutOverride));
@@ -410,7 +410,7 @@ public Task> WaitForSel
/// The message to wait on.
/// The Id of the dropdown to wait on.
/// A custom cancellation token that can be cancelled at any point.
- /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
+ /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
public async Task> WaitForSelectAsync(DiscordMessage message, string id, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
@@ -440,7 +440,7 @@ public async Task> Wait
/// The user to wait on.
/// The Id of the dropdown to wait on.
/// Override the timeout period specified in .
- /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
+ /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
public Task> WaitForSelectAsync(DiscordMessage message, DiscordUser user, string id, TimeSpan? timeoutOverride = null)
=> this.WaitForSelectAsync(message, user, id, this.GetCancellationToken(timeoutOverride));
@@ -451,7 +451,7 @@ public Task> WaitForSel
/// The user to wait on.
/// The Id of the dropdown to wait on.
/// A custom cancellation token that can be cancelled at any point.
- /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
+ /// Thrown when the message does not have any dropdowns or any dropdown with the specified Id.
public async Task> WaitForSelectAsync(DiscordMessage message, DiscordUser user, string id, CancellationToken token)
{
if (message.Author != this.Client.CurrentUser)
diff --git a/DisCatSharp.Lavalink/LavalinkExtension.cs b/DisCatSharp.Lavalink/LavalinkExtension.cs
index 9aa3231dd0..7f21597542 100644
--- a/DisCatSharp.Lavalink/LavalinkExtension.cs
+++ b/DisCatSharp.Lavalink/LavalinkExtension.cs
@@ -66,7 +66,7 @@ internal LavalinkExtension()
/// DO NOT USE THIS MANUALLY.
///
/// DO NOT USE THIS MANUALLY.
- ///
+ ///
protected internal override void Setup(DiscordClient client)
{
if (this.Client != null)
diff --git a/DisCatSharp.VoiceNext/StreamExtensions.cs b/DisCatSharp.VoiceNext/StreamExtensions.cs
index 7f7357bc2b..7c0c62b111 100644
--- a/DisCatSharp.VoiceNext/StreamExtensions.cs
+++ b/DisCatSharp.VoiceNext/StreamExtensions.cs
@@ -36,7 +36,7 @@ public static class StreamExtensions
///
/// Asynchronously reads the bytes from the current stream and writes them to the specified .
///
- /// The source
+ /// The source
/// The target
/// The size, in bytes, of the buffer. This value must be greater than zero. If , defaults to the packet size specified by .
/// The token to monitor for cancellation requests.
diff --git a/DisCatSharp.VoiceNext/VoiceNextExtension.cs b/DisCatSharp.VoiceNext/VoiceNextExtension.cs
index fc7f47b3f8..3ab3182459 100644
--- a/DisCatSharp.VoiceNext/VoiceNextExtension.cs
+++ b/DisCatSharp.VoiceNext/VoiceNextExtension.cs
@@ -82,7 +82,7 @@ internal VoiceNextExtension(VoiceNextConfiguration config)
/// DO NOT USE THIS MANUALLY.
///
/// DO NOT USE THIS MANUALLY.
- ///
+ ///
protected internal override void Setup(DiscordClient client)
{
if (this.Client != null)
diff --git a/DisCatSharp/Clients/BaseDiscordClient.cs b/DisCatSharp/Clients/BaseDiscordClient.cs
index d223c1b6e8..77a35bc46c 100644
--- a/DisCatSharp/Clients/BaseDiscordClient.cs
+++ b/DisCatSharp/Clients/BaseDiscordClient.cs
@@ -83,7 +83,7 @@ public DisCatSharpTeam LibraryDeveloperTeamAsync
public DiscordApplication CurrentApplication { get; internal set; }
///
- /// Exposes a Http Client for custom operations.
+ /// Exposes a Http Client for custom operations.
///
public HttpClient RestClient { get; internal set; }
@@ -230,7 +230,7 @@ public async Task GetCurrentApplicationAsync()
///
/// Gets a list of voice regions.
///
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when Discord is unable to process the request.
public Task> ListVoiceRegionsAsync()
=> this.ApiClient.ListVoiceRegionsAsync();
diff --git a/DisCatSharp/Clients/DiscordClient.cs b/DisCatSharp/Clients/DiscordClient.cs
index c6ab4654dd..739119e5bb 100644
--- a/DisCatSharp/Clients/DiscordClient.cs
+++ b/DisCatSharp/Clients/DiscordClient.cs
@@ -286,9 +286,9 @@ public T GetExtension() where T : BaseExtension
/// The activity to set. Defaults to null.
/// The optional status to set. Defaults to null.
/// Since when is the client performing the specified activity. Defaults to null.
- /// Thrown when an invalid token was provided.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid token was provided.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task ConnectAsync(DiscordActivity activity = null, UserStatus? status = null, DateTimeOffset? idlesince = null)
{
// Check if connection lock is already set, and set it if it isn't
@@ -400,8 +400,8 @@ public async Task DisconnectAsync()
/// Id of the user
/// Whether to fetch the user again. Defaults to true.
/// The requested user.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetUserAsync(ulong userId, bool fetch = true)
{
if (!fetch)
@@ -437,14 +437,14 @@ public async Task RemoveGlobalApplicationCommandsAsync()
///
/// Removes all global application commands for a specific guild id.
///
- /// The target guild id.
+ /// The target guild id.
public async Task RemoveGuildApplicationCommandsAsync(ulong guildId)
=> await this.ApiClient.BulkOverwriteGuildApplicationCommandsAsync(this.CurrentApplication.Id, guildId, Array.Empty());
///
/// Removes all global application commands for a specific guild.
///
- /// The target guild.
+ /// The target guild.
public async Task RemoveGuildApplicationCommandsAsync(DiscordGuild guild)
=> await this.RemoveGuildApplicationCommandsAsync(guild.Id);
@@ -453,9 +453,9 @@ public async Task RemoveGuildApplicationCommandsAsync(DiscordGuild guild)
///
/// The id of the channel to get.
/// The requested channel.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetChannelAsync(ulong id)
=> this.InternalGetCachedChannel(id) ?? await this.ApiClient.GetChannelAsync(id).ConfigureAwait(false);
@@ -464,9 +464,9 @@ public async Task GetChannelAsync(ulong id)
///
/// The id of the thread to get.
/// The requested thread.
- /// Thrown when the thread does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the thread does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetThreadAsync(ulong id)
=> this.InternalGetCachedThread(id) ?? await this.ApiClient.GetThreadAsync(id).ConfigureAwait(false);
@@ -476,10 +476,10 @@ public async Task GetThreadAsync(ulong id)
/// The channel to send to.
/// The message content to send.
/// The message that was sent.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordChannel channel, string content)
=> this.ApiClient.CreateMessageAsync(channel.Id, content, embeds: null, sticker: null, replyMessageId: null, mentionReply: false, failOnInvalidReply: false);
@@ -489,10 +489,10 @@ public Task SendMessageAsync(DiscordChannel channel, string cont
/// The channel to send to.
/// The embed to attach to the message.
/// The message that was sent.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordChannel channel, DiscordEmbed embed)
=> this.ApiClient.CreateMessageAsync(channel.Id, null, embed != null ? new[] { embed } : null, sticker: null, replyMessageId: null, mentionReply: false, failOnInvalidReply: false);
@@ -503,10 +503,10 @@ public Task SendMessageAsync(DiscordChannel channel, DiscordEmbe
/// The message content to send.
/// The embed to attach to the message.
/// The message that was sent.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordChannel channel, string content, DiscordEmbed embed)
=> this.ApiClient.CreateMessageAsync(channel.Id, content, embed != null ? new[] { embed } : null, sticker: null, replyMessageId: null, mentionReply: false, failOnInvalidReply: false);
@@ -516,23 +516,23 @@ public Task SendMessageAsync(DiscordChannel channel, string cont
/// The channel to send the message to.
/// The message builder.
/// The message that was sent.
- /// Thrown when the client does not have the permission if TTS is false and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission if TTS is false and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordChannel channel, DiscordMessageBuilder builder)
=> this.ApiClient.CreateMessageAsync(channel.Id, builder);
///
- /// Sends a message with an .
+ /// Sends a message with an .
///
/// The channel to send the message to.
/// The message builder.
/// The message that was sent.
- /// Thrown when the client does not have the permission if TTS is false and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission if TTS is false and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordChannel channel, Action action)
{
var builder = new DiscordMessageBuilder();
@@ -551,9 +551,9 @@ public Task SendMessageAsync(DiscordChannel channel, ActionDefault message notification settings for the guild.
/// System channel flags for the guild.
/// The created guild.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateGuildAsync(string name, string region = null, Optional icon = default, VerificationLevel? verificationLevel = null,
DefaultMessageNotifications? defaultMessageNotifications = null, SystemChannelFlags? systemChannelFlags = null)
{
@@ -568,8 +568,8 @@ public Task CreateGuildAsync(string name, string region = null, Op
/// Name of the guild.
/// Stream containing the icon for the guild.
/// The created guild.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateGuildFromTemplateAsync(string code, string name, Optional icon = default)
{
var iconb64 = ImageTool.Base64FromStream(icon);
@@ -591,9 +591,9 @@ public Task CreateGuildFromTemplateAsync(string code, string name,
/// The json body.
/// The additional headers.
/// The ratelimit wait override.
- /// Thrown when the resource does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the resource does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
/// A awaitable RestResponse
[Obsolete("This is no longer needed. Use DiscordClient.RestClient instead.", false)]
public async Task ExecuteRawRequestAsync(RestRequestMethod method, string route, object routeParams, string jsonBody = null, Dictionary additionalHeaders = null, double? ratelimitWaitOverride = null)
@@ -613,9 +613,9 @@ public async Task ExecuteRawRequestAsync(RestRequestMethod method,
/// The guild ID to search for.
/// Whether to include approximate presence and member counts in the returned guild.
/// The requested Guild.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetGuildAsync(ulong id, bool? withCounts = null)
{
if (this.GuildsInternal.TryGetValue(id, out var guild) && (!withCounts.HasValue || !withCounts.Value))
@@ -633,9 +633,9 @@ public async Task GetGuildAsync(ulong id, bool? withCounts = null)
///
/// The guild ID.
///
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetGuildPreviewAsync(ulong id)
=> this.ApiClient.GetGuildPreviewAsync(id);
@@ -647,17 +647,17 @@ public Task GetGuildPreviewAsync(ulong id)
/// Whether to include the expiration date in the returned invite.
/// The scheduled event id.
/// The requested Invite.
- /// Thrown when the invite does not exists.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the invite does not exists.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetInviteByCodeAsync(string code, bool? withCounts = null, bool? withExpiration = null, ulong? scheduledEventId = null)
=> this.ApiClient.GetInviteAsync(code, withCounts, withExpiration, scheduledEventId);
///
/// Gets a list of user connections.
///
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetConnectionsAsync()
=> this.ApiClient.GetUserConnectionsAsync();
@@ -666,9 +666,9 @@ public Task> GetConnectionsAsync()
///
/// The requested sticker.
/// The id of the sticker.
- /// Thrown when the sticker does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the sticker does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetStickerAsync(ulong id)
=> this.ApiClient.GetStickerAsync(id);
@@ -677,8 +677,8 @@ public Task GetStickerAsync(ulong id)
/// Gets all nitro sticker packs.
///
/// List of sticker packs.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetStickerPacksAsync()
=> this.ApiClient.GetStickerPacksAsync();
@@ -708,9 +708,9 @@ public Uri GetInAppOAuth(Permissions permissions = Permissions.None, OAuthScopes
///
/// The target webhook id.
/// The requested webhook.
- /// Thrown when the webhook does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the webhook does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetWebhookAsync(ulong id)
=> this.ApiClient.GetWebhookAsync(id);
@@ -720,9 +720,9 @@ public Task GetWebhookAsync(ulong id)
/// The target webhook id.
/// The target webhook token.
/// The requested webhook.
- /// Thrown when the webhook does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the webhook does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetWebhookWithTokenAsync(ulong id, string token)
=> this.ApiClient.GetWebhookWithTokenAsync(id, token);
@@ -742,9 +742,9 @@ public Task UpdateStatusAsync(DiscordActivity activity = null, UserStatus? userS
/// New username.
/// New avatar.
/// The modified user.
- /// Thrown when the user does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the user does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task UpdateCurrentUserAsync(string username = null, Optional avatar = default)
{
var av64 = ImageTool.Base64FromStream(avatar);
@@ -762,8 +762,8 @@ public async Task UpdateCurrentUserAsync(string username = null, Op
///
/// The code of the template.
/// The guild template for the code.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task GetTemplateAsync(string code)
=> this.ApiClient.GetTemplateAsync(code);
diff --git a/DisCatSharp/Clients/DiscordShardedClient.cs b/DisCatSharp/Clients/DiscordShardedClient.cs
index c45a220824..5fd5084e78 100644
--- a/DisCatSharp/Clients/DiscordShardedClient.cs
+++ b/DisCatSharp/Clients/DiscordShardedClient.cs
@@ -152,8 +152,8 @@ public DiscordShardedClient(DiscordConfiguration config)
///
/// Initializes and connects all shards.
///
- ///
- ///
+ ///
+ ///
public async Task StartAsync()
{
if (this._isStarted)
@@ -206,7 +206,7 @@ public async Task StartAsync()
///
/// Disconnects and disposes all shards.
///
- ///
+ ///
public Task StopAsync()
=> this.InternalStopAsync();
diff --git a/DisCatSharp/DiscordConfiguration.cs b/DisCatSharp/DiscordConfiguration.cs
index 9f28db6f00..58c670f55e 100644
--- a/DisCatSharp/DiscordConfiguration.cs
+++ b/DisCatSharp/DiscordConfiguration.cs
@@ -61,7 +61,7 @@ public string Token
///
/// Sets the minimum logging level for messages.
- /// Typically, the default value of is ok for most uses.
+ /// Typically, the default value of is ok for most uses.
///
public LogLevel MinimumLogLevel { internal get; set; } = LogLevel.Information;
@@ -161,8 +161,8 @@ public string Token
///
/// Sets the factory method used to create instances of WebSocket clients.
- /// Use and equivalents on other implementations to switch out client implementations.
- /// Defaults to .
+ /// Use and equivalents on other implementations to switch out client implementations.
+ /// Defaults to .
///
public WebSocketClientFactoryDelegate WebSocketClientFactory
{
diff --git a/DisCatSharp/Entities/Channel/DiscordChannel.cs b/DisCatSharp/Entities/Channel/DiscordChannel.cs
index b01b117432..aea3d05d56 100644
--- a/DisCatSharp/Entities/Channel/DiscordChannel.cs
+++ b/DisCatSharp/Entities/Channel/DiscordChannel.cs
@@ -315,10 +315,10 @@ internal DiscordChannel()
///
/// Content of the message to send.
/// The sent message.
- /// Thrown when the client does not have the permission if TTS is true and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission if TTS is true and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(string content) =>
!this.IsWritable()
? throw new ArgumentException("Cannot send a text message to a non-text channel.")
@@ -329,10 +329,10 @@ public Task SendMessageAsync(string content) =>
///
/// Embed to attach to the message.
/// The sent message.
- /// Thrown when the client does not have the permission and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordEmbed embed) =>
!this.IsWritable()
? throw new ArgumentException("Cannot send a text message to a non-text channel.")
@@ -344,10 +344,10 @@ public Task SendMessageAsync(DiscordEmbed embed) =>
/// Embed to attach to the message.
/// Content of the message to send.
/// The sent message.
- /// Thrown when the client does not have the permission if TTS is true and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission if TTS is true and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(string content, DiscordEmbed embed) =>
!this.IsWritable()
? throw new ArgumentException("Cannot send a text message to a non-text channel.")
@@ -358,10 +358,10 @@ public Task SendMessageAsync(string content, DiscordEmbed embed)
///
/// The builder with all the items to send.
/// The sent message.
- /// Thrown when the client does not have the permission TTS is true and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission TTS is true and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(DiscordMessageBuilder builder)
=> this.Discord.ApiClient.CreateMessageAsync(this.Id, builder);
@@ -370,10 +370,10 @@ public Task SendMessageAsync(DiscordMessageBuilder builder)
///
/// The builder with all the items to send.
/// The sent message.
- /// Thrown when the client does not have the permission TTS is true and if TTS is true.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission TTS is true and if TTS is true.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task SendMessageAsync(Action action)
{
var builder = new DiscordMessageBuilder();
@@ -389,10 +389,10 @@ public Task SendMessageAsync(Action actio
/// Deletes a guild channel
///
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteAsync(string reason = null)
=> this.Discord.ApiClient.DeleteChannelAsync(this.Id, reason);
@@ -401,10 +401,10 @@ public Task DeleteAsync(string reason = null)
///
/// Reason for audit logs.
/// Newly-created channel.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CloneAsync(string reason = null)
{
if (this.Guild == null)
@@ -443,10 +443,10 @@ public async Task CloneAsync(string reason = null)
///
/// The id of the message
/// Whether to bypass the message cache
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetMessageAsync(ulong id, bool bypassCache = false) =>
this.Discord.Configuration.MessageCacheSize > 0
&& !bypassCache
@@ -460,11 +460,11 @@ public async Task GetMessageAsync(ulong id, bool bypassCache = f
/// Modifies the current channel.
///
/// Action to perform on this channel
- /// Thrown when the client does not have the .
- /// Thrown when the client does not have the correct for modifying the .
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the .
+ /// Thrown when the client does not have the correct for modifying the .
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task ModifyAsync(Action action)
{
if (this.Type == ChannelType.Forum)
@@ -486,11 +486,11 @@ public Task ModifyAsync(Action action)
/// Modifies the current forum channel.
///
/// Action to perform on this channel
- /// Thrown when the client does not have the .
- /// Thrown when the client does not have the correct for modifying the .
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the .
+ /// Thrown when the client does not have the correct for modifying the .
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task ModifyForumAsync(Action action)
{
if (this.Type != ChannelType.Forum)
@@ -518,10 +518,10 @@ public Task ModifyForumAsync(Action action)
///
/// Position the channel should be moved to.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task ModifyPositionAsync(int position, string reason = null)
{
if (this.Guild == null)
@@ -550,12 +550,12 @@ public Task ModifyPositionAsync(int position, string reason = null)
///
/// The position.
/// The reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
- /// Thrown when is out of range.
- /// Thrown when function is called on a channel without a parent channel.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
+ /// Thrown when is out of range.
+ /// Thrown when function is called on a channel without a parent channel.
public async Task ModifyPositionInCategoryAsync(int position, string reason = null)
{
if (!this.IsMovableInParent())
@@ -651,12 +651,12 @@ public async Task RefreshPositionsAsync()
/// The mode. Valid: '+' or 'down' to move a channel down | '-' or 'up' to move a channel up
/// The position.
/// The reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
- /// Thrown when is out of range.
- /// Thrown when function is called on a channel without a parent channel, a wrong mode is given or given position is zero.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
+ /// Thrown when is out of range.
+ /// Thrown when function is called on a channel without a parent channel, a wrong mode is given or given position is zero.
public Task ModifyPositionInCategorySmartAsync(string mode, int position, string reason = null)
{
if (!this.IsMovableInParent())
@@ -684,10 +684,10 @@ public Task ModifyPositionInCategorySmartAsync(string mode, int position, string
/// New parent for channel. Use to remove from parent.
/// Sync permissions with parent. Defaults to null.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task ModifyParentAsync(DiscordChannel newParent, bool? lockPermissions = null, string reason = null)
{
if (this.Guild == null)
@@ -727,10 +727,10 @@ public Task ModifyParentAsync(DiscordChannel newParent, bool? lockPermissions =
/// Moves the channel out of a category.
///
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task RemoveParentAsync(string reason = null)
{
if (this.Guild == null)
@@ -764,10 +764,10 @@ public Task RemoveParentAsync(string reason = null)
/// The amount of messages to fetch.
/// Message to fetch before from.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetMessagesBeforeAsync(ulong before, int limit = 100)
=> this.GetMessagesInternalAsync(limit, before, null, null);
@@ -776,10 +776,10 @@ public Task> GetMessagesBeforeAsync(ulong before,
/// The amount of messages to fetch.
/// Message to fetch after from.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetMessagesAfterAsync(ulong after, int limit = 100)
=> this.GetMessagesInternalAsync(limit, null, after, null);
@@ -788,10 +788,10 @@ public Task> GetMessagesAfterAsync(ulong after, in
/// The amount of messages to fetch.
/// Message to fetch around from.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetMessagesAroundAsync(ulong around, int limit = 100)
=> this.GetMessagesInternalAsync(limit, null, null, around);
@@ -799,10 +799,10 @@ public Task> GetMessagesAroundAsync(ulong around,
/// Returns a list of messages from the last message in the channel.
/// The amount of messages to fetch.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetMessagesAsync(int limit = 100) =>
this.GetMessagesInternalAsync(limit, null, null, null);
@@ -859,14 +859,14 @@ private async Task> GetMessagesInternalAsync(int l
}
///
- /// Deletes multiple messages if they are less than 14 days old. If they are older, none of the messages will be deleted and you will receive a error.
+ /// Deletes multiple messages if they are less than 14 days old. If they are older, none of the messages will be deleted and you will receive a error.
///
/// A collection of messages to delete.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task DeleteMessagesAsync(IEnumerable messages, string reason = null)
{
// don't enumerate more than once
@@ -889,20 +889,20 @@ public async Task DeleteMessagesAsync(IEnumerable messages, stri
///
/// The message to be deleted.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteMessageAsync(DiscordMessage message, string reason = null)
=> this.Discord.ApiClient.DeleteMessageAsync(this.Id, message.Id, reason);
///
/// Returns a list of invite objects
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetInvitesAsync() =>
this.Guild == null
? throw new ArgumentException("Cannot get the invites of a channel that does not belong to a guild.")
@@ -919,10 +919,10 @@ public Task> GetInvitesAsync() =>
/// The target activity. Defaults to null.
/// The target user id. Defaults to null.
/// The audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateInviteAsync(int maxAge = 86400, int maxUses = 0, bool temporary = false, bool unique = false, TargetType? targetType = null, TargetActivity? targetApplication = null, ulong? targetUser = null, string reason = null)
=> this.Discord.ApiClient.CreateChannelInviteAsync(this.Id, maxAge, maxUses, targetType, targetApplication, targetUser, temporary, unique, reason);
@@ -936,10 +936,10 @@ public Task CreateInviteAsync(int maxAge = 86400, int maxUses = 0
/// Privacy level of the stage (Defaults to .
/// Audit log reason.
/// Stage instance
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task OpenStageAsync(string topic, bool sendStartNotification = false, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly, string reason = null)
=> await this.Discord.ApiClient.CreateStageInstanceAsync(this.Id, topic, sendStartNotification, privacyLevel, reason);
@@ -949,10 +949,10 @@ public async Task OpenStageAsync(string topic, bool sendSt
/// New topic of the stage.
/// New privacy level of the stage.
/// Audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task ModifyStageAsync(Optional topic, Optional privacyLevel, string reason = null)
=> await this.Discord.ApiClient.ModifyStageInstanceAsync(this.Id, topic, privacyLevel, reason);
@@ -960,10 +960,10 @@ public async Task ModifyStageAsync(Optional topic, Optional
/// Audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CloseStageAsync(string reason = null)
=> await this.Discord.ApiClient.DeleteStageInstanceAsync(this.Id, reason);
@@ -971,10 +971,10 @@ public async Task CloseStageAsync(string reason = null)
/// Gets a stage.
///
/// The requested stage.
- /// Thrown when the client does not have the or permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the or permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetStageAsync()
=> await this.Discord.ApiClient.GetStageInstanceAsync(this.Id);
@@ -991,9 +991,9 @@ public async Task GetStageAsync()
/// The cover image.
/// The reason.
/// A scheduled event.
- /// Thrown when the resource does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the resource does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreateScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, string description = null, Optional coverImage = default, string reason = null)
{
if (!this.IsVoiceJoinable())
@@ -1019,11 +1019,11 @@ public async Task CreateScheduledEventAsync(string name,
/// The per user ratelimit, aka slowdown.
/// Audit log reason.
/// The created thread.
- /// Thrown when the client does not have the or or if creating a private thread the permission.
- /// Thrown when the guild hasn't enabled threads atm.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
- /// Thrown when the cannot be modified. This happens, when the guild hasn't reached a certain boost . Or if is not enabled for guild. This happens, if the guild does not have
+ /// Thrown when the client does not have the or or if creating a private thread the permission.
+ /// Thrown when the guild hasn't enabled threads atm.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
+ /// Thrown when the cannot be modified. This happens, when the guild hasn't reached a certain boost . Or if is not enabled for guild. This happens, if the guild does not have
public async Task CreateThreadAsync(string name, ThreadAutoArchiveDuration autoArchiveDuration = ThreadAutoArchiveDuration.OneHour, ChannelType type = ChannelType.PublicThread, int? rateLimitPerUser = null, string reason = null) =>
type != ChannelType.NewsThread && type != ChannelType.PublicThread && type != ChannelType.PrivateThread
? throw new NotSupportedException("Wrong thread type given.")
@@ -1048,10 +1048,10 @@ public async Task CreateThreadAsync(string name, ThreadAut
/// The tags to add on creation.
/// Audit log reason.
/// The created thread.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild hasn't enabled threads atm.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild hasn't enabled threads atm.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreatePostAsync(string name, DiscordMessageBuilder builder, int? rateLimitPerUser = null, IEnumerable? tags = null, string reason = null)
{
if (this.Type != ChannelType.Forum)
@@ -1066,10 +1066,10 @@ public async Task CreatePostAsync(string name, DiscordMess
///
/// Get threads created before this thread id.
/// Defines the limit of returned .
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetJoinedPrivateArchivedThreadsAsync(ulong? before, int? limit)
=> await this.Discord.ApiClient.GetJoinedPrivateArchivedThreadsAsync(this.Id, before, limit);
@@ -1079,10 +1079,10 @@ public async Task GetJoinedPrivateArchivedThreadsAsync(ulon
///
/// Get threads created before this thread id.
/// Defines the limit of returned .
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetPublicArchivedThreadsAsync(ulong? before, int? limit)
=> await this.Discord.ApiClient.GetPublicArchivedThreadsAsync(this.Id, before, limit);
@@ -1092,10 +1092,10 @@ public async Task GetPublicArchivedThreadsAsync(ulong? befo
///
/// Get threads created before this thread id.
/// Defines the limit of returned .
- /// Thrown when the client does not have the or permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the or permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetPrivateArchivedThreadsAsync(ulong? before, int? limit)
=> await this.Discord.ApiClient.GetPrivateArchivedThreadsAsync(this.Id, before, limit);
@@ -1118,10 +1118,10 @@ public ForumPostTag GetForumPostTag(ulong id)
/// The emoji of the tag. Has to be either a of the current guild or a .
/// Whether only moderators should be able to apply this tag.
/// The audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the tag does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the tag does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreateForumPostTagAsync(string name, DiscordEmoji emoji, bool moderated = false, string reason = null)
=> await this.Discord.ApiClient.CreateForumTagAsync(this.Id, name, emoji, moderated, reason);
@@ -1130,10 +1130,10 @@ public async Task CreateForumPostTagAsync(string name, DiscordEmoj
///
/// The id of the tag to delete.
/// The audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the tag does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the tag does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteForumPostTag(ulong id, string reason = null)
=> this.Discord.ApiClient.DeleteForumTagAsync(id, this.Id, reason);
@@ -1146,10 +1146,10 @@ public Task DeleteForumPostTag(ulong id, string reason = null)
/// The permissions to allow.
/// The permissions to deny.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task AddOverwriteAsync(DiscordRole role, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)
=> this.Discord.ApiClient.EditChannelPermissionsAsync(this.Id, role.Id, allow, deny, "role", reason);
@@ -1161,10 +1161,10 @@ public Task AddOverwriteAsync(DiscordRole role, Permissions allow = Permissions.
/// The permissions to allow.
/// The permissions to deny.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task AddOverwriteAsync(DiscordMember member, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)
=> this.Discord.ApiClient.EditChannelPermissionsAsync(this.Id, member.Id, allow, deny, "member", reason);
@@ -1173,10 +1173,10 @@ public Task AddOverwriteAsync(DiscordMember member, Permissions allow = Permissi
///
/// The member to have the permission deleted.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteOverwriteAsync(DiscordMember member, string reason = null)
=> this.Discord.ApiClient.DeleteChannelPermissionAsync(this.Id, member.Id, reason);
@@ -1185,19 +1185,19 @@ public Task DeleteOverwriteAsync(DiscordMember member, string reason = null)
///
/// The role to have the permission deleted.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteOverwriteAsync(DiscordRole role, string reason = null)
=> this.Discord.ApiClient.DeleteChannelPermissionAsync(this.Id, role.Id, reason);
///
/// Post a typing indicator.
///
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task TriggerTypingAsync() =>
!this.IsWritable()
? throw new ArgumentException("Cannot start typing in a non-text channel.")
@@ -1206,10 +1206,10 @@ public Task TriggerTypingAsync() =>
///
/// Returns all pinned messages.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task> GetPinnedMessagesAsync() =>
!this.IsWritable()
? throw new ArgumentException("A non-text channel does not have pinned messages.")
@@ -1221,10 +1221,10 @@ public Task> GetPinnedMessagesAsync() =>
/// The name of the webhook.
/// The image for the default webhook avatar.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreateWebhookAsync(string name, Optional avatar = default, string reason = null)
=> await this.Discord.ApiClient.CreateWebhookAsync(this.IsThread() ? this.ParentId!.Value : this.Id, name,
ImageTool.Base64FromStream(avatar), reason).ConfigureAwait(false);
@@ -1232,9 +1232,9 @@ public async Task CreateWebhookAsync(string name, Optional
/// Returns a list of webhooks.
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exist.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exist.
+ /// Thrown when Discord is unable to process the request.
public Task> GetWebhooksAsync()
=> this.Discord.ApiClient.GetChannelWebhooksAsync(this.IsThread() ? this.ParentId!.Value : this.Id);
@@ -1242,10 +1242,10 @@ public Task> GetWebhooksAsync()
/// Moves a member to this voice channel.
///
/// The member to be moved.
- /// Thrown when the client does not have the permission.
- /// Thrown when the channel does not exists or if the Member does not exists.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the channel does not exists or if the Member does not exists.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task PlaceMemberAsync(DiscordMember member)
{
if (!this.IsVoiceJoinable())
@@ -1259,8 +1259,8 @@ await this.Discord.ApiClient.ModifyGuildMemberAsync(this.Guild.Id, member.Id, de
/// Follows a news channel.
///
/// Channel to crosspost messages to.
- /// Thrown when trying to follow a non-news channel.
- /// Thrown when the current user doesn't have on the target channel.
+ /// Thrown when trying to follow a non-news channel.
+ /// Thrown when the current user doesn't have on the target channel.
public Task FollowAsync(DiscordChannel targetChannel) =>
this.Type != ChannelType.News
? throw new ArgumentException("Cannot follow a non-news channel.")
@@ -1270,8 +1270,8 @@ public Task FollowAsync(DiscordChannel targetChannel) =>
/// Publishes a message in a news channel to following channels.
///
/// Message to publish.
- /// Thrown when the message has already been crossposted.
- ///
+ /// Thrown when the message has already been crossposted.
+ ///
/// Thrown when the current user doesn't have and/or
///
public Task CrosspostMessageAsync(DiscordMessage message) =>
@@ -1284,7 +1284,7 @@ public Task CrosspostMessageAsync(DiscordMessage message) =>
///
/// Toggles the suppress state.
/// Sets the time the user requested to speak.
- /// Thrown when the channel is not a stage channel.
+ /// Thrown when the channel is not a stage channel.
public async Task UpdateCurrentUserVoiceStateAsync(bool? suppress, DateTimeOffset? requestToSpeakTimestamp = null)
{
if (this.Type != ChannelType.Stage)
diff --git a/DisCatSharp/Entities/Channel/DiscordDmChannel.cs b/DisCatSharp/Entities/Channel/DiscordDmChannel.cs
index 24e6b9e770..b81343aa23 100644
--- a/DisCatSharp/Entities/Channel/DiscordDmChannel.cs
+++ b/DisCatSharp/Entities/Channel/DiscordDmChannel.cs
@@ -73,9 +73,9 @@ public string IconUrl
/// The id of the user to add.
/// The OAuth2 access token.
/// The nickname to give to the user.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task AddDmRecipientAsync(ulong userId, string accessToken, string nickname)
=> this.Discord.ApiClient.AddGroupDmRecipientAsync(this.Id, userId, accessToken, nickname);
@@ -84,9 +84,9 @@ public Task AddDmRecipientAsync(ulong userId, string accessToken, string nicknam
///
/// The id of the User to remove.
/// The OAuth2 access token.
- /// Thrown when the channel does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the channel does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task RemoveDmRecipientAsync(ulong userId, string accessToken)
=> this.Discord.ApiClient.RemoveGroupDmRecipientAsync(this.Id, userId);
}
diff --git a/DisCatSharp/Entities/Channel/Overwrite/DiscordOverwrite.cs b/DisCatSharp/Entities/Channel/Overwrite/DiscordOverwrite.cs
index 71c61516db..f847dea21a 100644
--- a/DisCatSharp/Entities/Channel/Overwrite/DiscordOverwrite.cs
+++ b/DisCatSharp/Entities/Channel/Overwrite/DiscordOverwrite.cs
@@ -60,10 +60,10 @@ public class DiscordOverwrite : SnowflakeObject
/// Deletes this channel overwrite.
///
/// Reason as to why this overwrite gets deleted.
- /// Thrown when the client does not have the permission.
- /// Thrown when the overwrite does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the overwrite does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteAsync(string reason = null) => this.Discord.ApiClient.DeleteChannelPermissionAsync(this.ChannelId, this.Id, reason);
///
@@ -72,10 +72,10 @@ public class DiscordOverwrite : SnowflakeObject
/// Permissions that are allowed.
/// Permissions that are denied.
/// Reason as to why you made this change.
- /// Thrown when the client does not have the permission.
- /// Thrown when the overwrite does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the overwrite does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task UpdateAsync(Permissions? allow = null, Permissions? deny = null, string reason = null)
=> this.Discord.ApiClient.EditChannelPermissionsAsync(this.ChannelId, this.Id, allow ?? this.Allowed, deny ?? this.Denied, this.Type.ToString().ToLowerInvariant(), reason);
@@ -83,10 +83,10 @@ public Task UpdateAsync(Permissions? allow = null, Permissions? deny = null, str
/// Gets the DiscordMember that is affected by this overwrite.
///
/// The DiscordMember that is affected by this overwrite
- /// Thrown when the client does not have the permission.
- /// Thrown when the overwrite does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the overwrite does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetMemberAsync() =>
this.Type != OverwriteType.Member
? throw new ArgumentException(nameof(this.Type), "This overwrite is for a role, not a member.")
@@ -96,9 +96,9 @@ public async Task GetMemberAsync() =>
/// Gets the DiscordRole that is affected by this overwrite.
///
/// The DiscordRole that is affected by this overwrite
- /// Thrown when the role does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the role does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetRoleAsync() =>
this.Type != OverwriteType.Role
? throw new ArgumentException(nameof(this.Type), "This overwrite is for a member, not a role.")
diff --git a/DisCatSharp/Entities/DiscordUri.cs b/DisCatSharp/Entities/DiscordUri.cs
index 95eefc0385..3ef455f2d2 100644
--- a/DisCatSharp/Entities/DiscordUri.cs
+++ b/DisCatSharp/Entities/DiscordUri.cs
@@ -87,11 +87,11 @@ internal DiscordUri(string value)
public override string ToString() => this._value.ToString();
///
- /// Converts this DiscordUri into a canonical representation of a if it can be represented as
+ /// Converts this DiscordUri into a canonical representation of a if it can be represented as
/// such, throwing an exception otherwise.
///
/// A canonical representation of this DiscordUri.
- /// If is not , as
+ /// If is not , as
/// that would mean creating an invalid Uri, which would result in loss of data.
public Uri ToUri()
=> this.Type == DiscordUriType.Standard
@@ -148,7 +148,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
public enum DiscordUriType : byte
{
///
- /// Represents a URI that conforms to RFC 3986, meaning it's stored internally as a and will
+ /// Represents a URI that conforms to RFC 3986, meaning it's stored internally as a and will
/// contain a trailing slash after the domain name.
///
Standard,
diff --git a/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs b/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs
index 2fb98ea376..d1c3ee3895 100644
--- a/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs
+++ b/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs
@@ -47,8 +47,8 @@ public partial class DiscordGuild
/// Filter by member responsible.
/// Filter by action type.
/// A collection of requested audit log entries.
- /// Thrown when the client does not have the permission.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when Discord is unable to process the request.
public async Task> GetAuditLogsAsync(int? limit = null, DiscordMember byMember = null, AuditLogActionType? actionType = null)
{
var alrs = new List();
diff --git a/DisCatSharp/Entities/Guild/DiscordGuild.cs b/DisCatSharp/Entities/Guild/DiscordGuild.cs
index 2f4cd19f13..4f7c0173e1 100644
--- a/DisCatSharp/Entities/Guild/DiscordGuild.cs
+++ b/DisCatSharp/Entities/Guild/DiscordGuild.cs
@@ -678,10 +678,10 @@ public Task> SearchMembersAsync(string name, int? l
/// new roles
/// whether this user has to be muted
/// whether this user has to be deafened
- /// Thrown when the client does not have the permission.
- /// Thrown when the or is not found.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the or is not found.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task AddMemberAsync(DiscordUser user, string accessToken, string nickname = null, IEnumerable roles = null,
bool muted = false, bool deaf = false)
=> this.Discord.ApiClient.AddGuildMemberAsync(this.Id, user.Id, accessToken, nickname, roles, muted, deaf);
@@ -689,8 +689,8 @@ public Task AddMemberAsync(DiscordUser user, string accessToken, string nickname
///
/// Deletes this guild. Requires the caller to be the owner of the guild.
///
- /// Thrown when the client is not the owner of the guild.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client is not the owner of the guild.
+ /// Thrown when Discord is unable to process the request.
public Task DeleteAsync()
=> this.Discord.ApiClient.DeleteGuildAsync(this.Id);
@@ -698,9 +698,9 @@ public Task DeleteAsync()
/// Enables the mfa requirement for this guild.
///
/// The audit log reason.
- /// Thrown when the current user is not the guilds owner.
- /// Thrown when the guild does not exist.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the current user is not the guilds owner.
+ /// Thrown when the guild does not exist.
+ /// Thrown when Discord is unable to process the request.
public Task EnableMfaAsync(string reason = null)
=> this.IsOwner ? this.Discord.ApiClient.EnableGuildMfaAsync(this.Id, reason) : throw new Exception("The current user does not own the guild.");
@@ -708,9 +708,9 @@ public Task EnableMfaAsync(string reason = null)
/// Disables the mfa requirement for this guild.
///
/// The audit log reason.
- /// Thrown when the current user is not the guilds owner.
- /// Thrown when the guild does not exist.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the current user is not the guilds owner.
+ /// Thrown when the guild does not exist.
+ /// Thrown when Discord is unable to process the request.
public Task DisableMfaAsync(string reason = null)
=> this.IsOwner ? this.Discord.ApiClient.DisableGuildMfaAsync(this.Id, reason) : throw new Exception("The current user does not own the guild.");
@@ -720,10 +720,10 @@ public Task DisableMfaAsync(string reason = null)
///
/// Action to perform on this guild.
/// The modified guild object.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task ModifyAsync(Action action)
{
var mdl = new GuildEditModel();
@@ -766,10 +766,10 @@ public async Task ModifyAsync(Action action)
/// The description.
/// The default message notifications. Defaults to
/// The audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task ModifyCommunitySettingsAsync(bool enabled, DiscordChannel rulesChannel = null, DiscordChannel publicUpdatesChannel = null, string preferredLocale = "en-US", string description = null, DefaultMessageNotifications defaultMessageNotifications = DefaultMessageNotifications.MentionsOnly, string reason = null)
{
var verificationLevel = this.VerificationLevel;
@@ -808,10 +808,10 @@ public async Task ModifyCommunitySettingsAsync(bool enabled, Disco
/// Enables invites for the guild.
///
/// The audit log reason.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task EnableInvitesAsync(string reason = null)
{
List features = new();
@@ -828,10 +828,10 @@ public async Task EnableInvitesAsync(string reason = null)
///
///
///
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task DisableInvitesAsync(string reason = null)
{
List features = new();
@@ -849,10 +849,10 @@ public async Task DisableInvitesAsync(string reason = null)
/// Member to timeout.
/// The datetime offset to time out the user. Up to 28 days.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task TimeoutAsync(ulong memberId, DateTimeOffset until, string reason = null)
=> until.Subtract(DateTimeOffset.UtcNow).Days > 28
? throw new ArgumentException("Timeout can not be longer than 28 days")
@@ -864,10 +864,10 @@ public Task TimeoutAsync(ulong memberId, DateTimeOffset until, string reason = n
/// Member to timeout.
/// The timespan to time out the user. Up to 28 days.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task TimeoutAsync(ulong memberId, TimeSpan until, string reason = null)
=> this.TimeoutAsync(memberId, DateTimeOffset.UtcNow + until, reason);
@@ -877,10 +877,10 @@ public Task TimeoutAsync(ulong memberId, TimeSpan until, string reason = null)
/// Member to timeout.
/// The datetime to time out the user. Up to 28 days.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task TimeoutAsync(ulong memberId, DateTime until, string reason = null)
=> this.TimeoutAsync(memberId, until.ToUniversalTime() - DateTime.UtcNow, reason);
@@ -889,10 +889,10 @@ public Task TimeoutAsync(ulong memberId, DateTime until, string reason = null)
///
/// Member to remove the timeout from.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task RemoveTimeoutAsync(ulong memberId, string reason = null)
=> this.Discord.ApiClient.ModifyTimeoutAsync(this.Id, memberId, null, reason);
@@ -902,10 +902,10 @@ public Task RemoveTimeoutAsync(ulong memberId, string reason = null)
/// Member to ban.
/// How many days to remove messages from.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task BanMemberAsync(DiscordMember member, int deleteMessageDays = 0, string reason = null)
=> this.Discord.ApiClient.CreateGuildBanAsync(this.Id, member.Id, deleteMessageDays, reason);
@@ -915,10 +915,10 @@ public Task BanMemberAsync(DiscordMember member, int deleteMessageDays = 0, stri
/// ID of the user to ban.
/// How many days to remove messages from.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the member does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the member does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task BanMemberAsync(ulong userId, int deleteMessageDays = 0, string reason = null)
=> this.Discord.ApiClient.CreateGuildBanAsync(this.Id, userId, deleteMessageDays, reason);
@@ -927,10 +927,10 @@ public Task BanMemberAsync(ulong userId, int deleteMessageDays = 0, string reaso
///
/// User to unban.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the user does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the user does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task UnbanMemberAsync(DiscordUser user, string reason = null)
=> this.Discord.ApiClient.RemoveGuildBanAsync(this.Id, user.Id, reason);
@@ -939,17 +939,17 @@ public Task UnbanMemberAsync(DiscordUser user, string reason = null)
///
/// ID of the user to unban.
/// Reason for audit logs.
- /// Thrown when the client does not have the permission.
- /// Thrown when the user does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the user does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task UnbanMemberAsync(ulong userId, string reason = null)
=> this.Discord.ApiClient.RemoveGuildBanAsync(this.Id, userId, reason);
///
/// Leaves this guild.
///
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when Discord is unable to process the request.
public Task LeaveAsync()
=> this.Discord.ApiClient.LeaveGuildAsync(this.Id);
@@ -960,8 +960,8 @@ public Task LeaveAsync()
/// The Id of the user before which to fetch the bans. Overrides if both are present.
/// The Id of the user after which to fetch the bans.
/// Collection of bans in this guild in ascending order by user id.
- /// Thrown when the client does not have the permission.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when Discord is unable to process the request.
public Task> GetBansAsync(int? limit = null, ulong? before = null, ulong? after = null)
=> this.Discord.ApiClient.GetGuildBansAsync(this.Id, limit, before, after);
@@ -970,7 +970,7 @@ public Task> GetBansAsync(int? limit = null, ulong? be
///
/// The Id of the user to get the ban for.
/// The requested ban object.
- /// Thrown when the specified user is not banned.
+ /// Thrown when the specified user is not banned.
public Task GetBanAsync(ulong userId)
=> this.Discord.ApiClient.GetGuildBanAsync(this.Id, userId);
@@ -979,7 +979,7 @@ public Task GetBanAsync(ulong userId)
///
/// The user to get the ban for.
/// The requested ban object.
- /// Thrown when the specified user is not banned.
+ /// Thrown when the specified user is not banned.
public Task GetBanAsync(DiscordUser user)
=> this.GetBanAsync(user.Id);
@@ -998,9 +998,9 @@ public Task GetBanAsync(DiscordUser user)
/// The cover image.
/// The reason.
/// A scheduled event.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreateScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, DateTimeOffset? scheduledEndTime = null, DiscordChannel channel = null, DiscordScheduledEventEntityMetadata metadata = null, string description = null, ScheduledEventEntityType type = ScheduledEventEntityType.StageInstance, Optional coverImage = default, string reason = null)
{
var coverb64 = ImageTool.Base64FromStream(coverImage);
@@ -1018,9 +1018,9 @@ public async Task CreateScheduledEventAsync(string name,
/// The cover image.
/// The reason.
/// A scheduled event.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task CreateExternalScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, DateTimeOffset scheduledEndTime, string location, string description = null, Optional coverImage = default, string reason = null)
{
var coverb64 = ImageTool.Base64FromStream(coverImage);
@@ -1034,9 +1034,9 @@ public async Task CreateExternalScheduledEventAsync(strin
/// The Id of the event to get.
/// Whether to include user count.
/// A scheduled event.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetScheduledEventAsync(ulong scheduledEventId, bool? withUserCount = null)
=> this.ScheduledEventsInternal.TryGetValue(scheduledEventId, out var ev) ? ev : await this.Discord.ApiClient.GetGuildScheduledEventAsync(this.Id, scheduledEventId, withUserCount);
@@ -1046,9 +1046,9 @@ public async Task GetScheduledEventAsync(ulong scheduledE
/// The event to get.
/// Whether to include user count.
/// A scheduled event.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task GetScheduledEventAsync(DiscordScheduledEvent scheduledEvent, bool? withUserCount = null)
=> await this.GetScheduledEventAsync(scheduledEvent.Id, withUserCount);
@@ -1057,9 +1057,9 @@ public async Task GetScheduledEventAsync(DiscordScheduled
///
/// Whether to include user count.
/// A list of the guilds scheduled events.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public async Task> GetScheduledEventsAsync(bool? withUserCount = null)
=> await this.Discord.ApiClient.ListGuildScheduledEventsAsync(this.Id, withUserCount);
#endregion
@@ -1076,10 +1076,10 @@ public async Task> GetSchedule
/// The default auto archive duration for new threads.
/// Reason for audit logs.
/// The newly-created channel.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateTextChannelAsync(string name, DiscordChannel parent = null, Optional topic = default, IEnumerable overwrites = null, bool? nsfw = null, Optional perUserRateLimit = default, ThreadAutoArchiveDuration defaultAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay, string reason = null)
=> this.CreateChannelAsync(name, ChannelType.Text, parent, topic, null, null, overwrites, nsfw, perUserRateLimit, null, defaultAutoArchiveDuration, reason);
@@ -1098,10 +1098,10 @@ public Task CreateTextChannelAsync(string name, DiscordChannel p
/// The default auto archive duration for new threads.
/// Reason for audit logs.
/// The newly-created channel.
- /// Thrown when the client does not have the permission or the guild does not have the forum channel feature.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission or the guild does not have the forum channel feature.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateForumChannelAsync(string name, DiscordChannel parent = null, Optional topic = default, IEnumerable overwrites = null, bool? nsfw = null, Optional defaultReactionEmoji = default, Optional perUserRateLimit = default, Optional postCreateUserRateLimit = default, ThreadAutoArchiveDuration defaultAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay, string reason = null)
=> this.Discord.ApiClient.CreateForumChannelAsync(this.Id, name, parent?.Id, topic, null, nsfw, defaultReactionEmoji, perUserRateLimit, postCreateUserRateLimit, defaultAutoArchiveDuration, overwrites, reason);
@@ -1112,10 +1112,10 @@ public Task CreateForumChannelAsync(string name, DiscordChannel
/// Permission overwrites for this category.
/// Reason for audit logs.
/// The newly-created channel category.
- /// Thrown when the client does not have the permission.
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
+ /// Thrown when the client does not have the permission.
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
public Task CreateChannelCategoryAsync(string name, IEnumerable overwrites = null, string reason = null)
=> this.CreateChannelAsync(name, ChannelType.Category, null, Optional.None, null, null, overwrites, null, Optional.None, null, null, reason);
@@ -1126,11 +1126,11 @@ public Task CreateChannelCategoryAsync(string name, IEnumerable<
/// Permission overwrites for this stage channel.
/// Reason for audit logs.
/// The newly-created stage channel.
- /// Thrown when the client does not have the .
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
- /// Thrown when the guilds has not enabled community.
+ /// Thrown when the client does not have the .
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guilds has not enabled community.
public Task CreateStageChannelAsync(string name, IEnumerable overwrites = null, string reason = null)
=> this.Features.HasCommunityEnabled ? this.CreateChannelAsync(name, ChannelType.Stage, null, Optional.None, null, null, overwrites, null, Optional.None, null, null, reason) : throw new NotSupportedException("Guild has not enabled community. Can not create a stage channel.");
@@ -1142,11 +1142,11 @@ public Task CreateStageChannelAsync(string name, IEnumerableThe default auto archive duration for new threads.
/// Reason for audit logs.
/// The newly-created news channel.
- /// Thrown when the client does not have the .
- /// Thrown when the guild does not exist.
- /// Thrown when an invalid parameter was provided.
- /// Thrown when Discord is unable to process the request.
- /// Thrown when the guilds has not enabled community.
+ /// Thrown when the client does not have the .
+ /// Thrown when the guild does not exist.
+ /// Thrown when an invalid parameter was provided.
+ /// Thrown when Discord is unable to process the request.
+ /// Thrown when the guilds has not enabled community.
public Task CreateNewsChannelAsync(string name, IEnumerable overwrites = null, string reason = null, ThreadAutoArchiveDuration defaultAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay)
=> this.Features.HasCommunityEnabled ? this.CreateChannelAsync(name, ChannelType.News, null, Optional.None, null, null, overwrites, null, Optional.None, null, defaultAutoArchiveDuration, reason) : throw new NotSupportedException("Guild has not enabled community. Can not create a news channel.");
@@ -1161,10 +1161,10 @@ public Task CreateNewsChannelAsync(string name, IEnumerableVideo quality mode of the channel.
///