diff --git a/src/Discord.Net.Commands/Attributes/ParameterPreconditionAttribute.cs b/src/Discord.Net.Commands/Attributes/ParameterPreconditionAttribute.cs
index 9b750809b..8ee46f9f9 100644
--- a/src/Discord.Net.Commands/Attributes/ParameterPreconditionAttribute.cs
+++ b/src/Discord.Net.Commands/Attributes/ParameterPreconditionAttribute.cs
@@ -15,7 +15,7 @@ namespace Discord.Commands
///
/// The context of the command.
/// The parameter of the command being checked against.
- /// The raw value of the type.
+ /// The raw value of the parameter.
/// The service collection used for dependency injection.
public abstract Task CheckPermissionsAsync(ICommandContext context, ParameterInfo parameter, object value, IServiceProvider services);
}
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
index 14d19bfa3..ddb4f9b10 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
@@ -47,6 +47,14 @@ namespace Discord.Rest
public Task CloseAsync(RequestOptions options = null)
=> ChannelHelper.DeleteAsync(this, Discord, options);
+
+ ///
+ /// Gets a user in this channel from the provided .
+ ///
+ /// The snowflake identifier of the user.
+ ///
+ /// A object that is a recipient of this channel; otherwise null.
+ ///
public RestUser GetUser(ulong id)
{
if (id == Recipient.Id)
@@ -175,10 +183,10 @@ namespace Discord.Rest
///
async Task> IMessageChannel.GetPinnedMessagesAsync(RequestOptions options)
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
-
+ ///
async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendFileAsync(filePath, text, isTTS, embed, options).ConfigureAwait(false);
-
+ ///
async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendFileAsync(stream, filename, text, isTTS, embed, options).ConfigureAwait(false);
///
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
index cc52a9864..5895500bd 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
@@ -72,6 +72,13 @@ namespace Discord.Rest
public Task DeleteAsync(RequestOptions options = null)
=> ChannelHelper.DeleteAsync(this, Discord, options);
+ ///
+ /// Gets the overwrite permissions of the specified .
+ ///
+ /// The user that you want to get the overwrite permissions for.
+ ///
+ /// The overwrite permissions for the requested user; otherwise null.
+ ///
public OverwritePermissions? GetPermissionOverwrite(IUser user)
{
for (int i = 0; i < _overwrites.Length; i++)
@@ -81,6 +88,14 @@ namespace Discord.Rest
}
return null;
}
+
+ ///
+ /// Gets the overwrite permissions of the specified .
+ ///
+ /// The role that you want to get the overwrite permissions for.
+ ///
+ /// The overwrite permissions for the requested role; otherwise null.
+ ///
public OverwritePermissions? GetPermissionOverwrite(IRole role)
{
for (int i = 0; i < _overwrites.Length; i++)
@@ -90,16 +105,45 @@ namespace Discord.Rest
}
return null;
}
+
+ ///
+ /// Adds an overwrite permission for the specified .
+ ///
+ /// The user you want the overwrite permission to apply to.
+ /// The overwrite permission you want to add.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable .
+ ///
public async Task AddPermissionOverwriteAsync(IUser user, OverwritePermissions perms, RequestOptions options = null)
{
await ChannelHelper.AddPermissionOverwriteAsync(this, Discord, user, perms, options).ConfigureAwait(false);
_overwrites = _overwrites.Add(new Overwrite(user.Id, PermissionTarget.User, new OverwritePermissions(perms.AllowValue, perms.DenyValue)));
}
+
+ ///
+ /// Adds an overwrite permission for the specified .
+ ///
+ /// The role you want the overwrite permission to apply to.
+ /// The overwrite permission you want to add.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable .
+ ///
public async Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions perms, RequestOptions options = null)
{
await ChannelHelper.AddPermissionOverwriteAsync(this, Discord, role, perms, options).ConfigureAwait(false);
_overwrites = _overwrites.Add(new Overwrite(role.Id, PermissionTarget.Role, new OverwritePermissions(perms.AllowValue, perms.DenyValue)));
}
+
+ ///
+ /// Removes an overwrite permission for the specified .
+ ///
+ /// The user you want to remove the overwrite permission from.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable .
+ ///
public async Task RemovePermissionOverwriteAsync(IUser user, RequestOptions options = null)
{
await ChannelHelper.RemovePermissionOverwriteAsync(this, Discord, user, options).ConfigureAwait(false);
@@ -113,6 +157,15 @@ namespace Discord.Rest
}
}
}
+
+ ///
+ /// Removes an overwrite permission for the specified .
+ ///
+ /// The role you want the overwrite permissions to be removed from.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable .
+ ///
public async Task RemovePermissionOverwriteAsync(IRole role, RequestOptions options = null)
{
await ChannelHelper.RemovePermissionOverwriteAsync(this, Discord, role, options).ConfigureAwait(false);
@@ -127,11 +180,38 @@ namespace Discord.Rest
}
}
+ ///
+ /// Gets the invites for this channel.
+ ///
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing an .
+ /// contains information such as, the number of times the invite has
+ /// been used, who created the invite, and when the invite was created.
+ ///
public async Task> GetInvitesAsync(RequestOptions options = null)
=> await ChannelHelper.GetInvitesAsync(this, Discord, options).ConfigureAwait(false);
+
+ ///
+ /// Creates an invite for this channel.
+ ///
+ /// The number of seconds that you want the invite to be valid for.
+ /// The number of times this invite can be used before it expires.
+ /// Whether or not the invite grants temporary membership.
+ /// Whether to try reuse a similar invite or not.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing a .
+ ///
public async Task CreateInviteAsync(int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
=> await ChannelHelper.CreateInviteAsync(this, Discord, maxAge, maxUses, isTemporary, isUnique, options).ConfigureAwait(false);
+ ///
+ /// Gets the name of this channel.
+ ///
+ ///
+ /// A string that is the name of this channel.
+ ///
public override string ToString() => Name;
//IGuildChannel
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
index f1a282dc9..b7409c180 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
@@ -49,8 +49,25 @@ namespace Discord.Rest
Update(model);
}
+ ///
+ /// Gets a user that is able to view this channel from the associate .
+ ///
+ /// The snowflake identifier of the user you want to get.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing a .
+ ///
public Task GetUserAsync(ulong id, RequestOptions options = null)
=> ChannelHelper.GetUserAsync(this, Guild, Discord, id, options);
+
+ ///
+ /// Gets the collection of users that can view this channel.
+ ///
+ /// The options to be used when sending the request.
+ ///
+ /// Paged collection of users. Flattening the paginated response into a collection of
+ /// with is required if you wish to access the users.
+ ///
public IAsyncEnumerable> GetUsersAsync(RequestOptions options = null)
=> ChannelHelper.GetUsersAsync(this, Guild, Discord, null, null, options);
@@ -128,7 +145,16 @@ namespace Discord.Rest
///
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);
-
+
+ ///
+ /// Creates a webhook for this channel.
+ ///
+ /// The name you want to give the webhook.
+ /// The avatar that you want the webook to have.
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing a .
+ ///
public Task CreateWebhookAsync(string name, Stream avatar = null, RequestOptions options = null)
=> ChannelHelper.CreateWebhookAsync(this, Discord, name, avatar, options);
public Task GetWebhookAsync(ulong id, RequestOptions options = null)
@@ -136,6 +162,13 @@ namespace Discord.Rest
public Task> GetWebhooksAsync(RequestOptions options = null)
=> ChannelHelper.GetWebhooksAsync(this, Discord, options);
+ ///
+ /// Gets the parent category of this channel.
+ ///
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing an .
+ ///
public Task GetCategoryAsync(RequestOptions options = null)
=> ChannelHelper.GetCategoryAsync(this, Discord, options);
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestVoiceChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestVoiceChannel.cs
index a2b086258..6fd068ed1 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestVoiceChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestVoiceChannel.cs
@@ -47,6 +47,13 @@ namespace Discord.Rest
Update(model);
}
+ ///
+ /// Gets the parent category of this channel.
+ ///
+ /// The options to be used when sending the request.
+ ///
+ /// An awaitable containing an .
+ ///
public Task GetCategoryAsync(RequestOptions options = null)
=> ChannelHelper.GetCategoryAsync(this, Discord, options);
diff --git a/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs b/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
index 6d18beaad..c6ca82604 100644
--- a/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
+++ b/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
@@ -13,6 +13,9 @@ namespace Discord.Rest
///
public IMessageChannel Channel { get; }
+ ///
+ /// Gets the Author of the message.
+ ///
public IUser Author { get; }
///
public MessageSource Source { get; }
@@ -28,12 +31,21 @@ namespace Discord.Rest
public virtual bool IsPinned => false;
///
public virtual DateTimeOffset? EditedTimestamp => null;
+ ///
+ /// Gets a collection of the 's on the message.
+ ///
public virtual IReadOnlyCollection Attachments => ImmutableArray.Create();
+ ///
+ /// Gets a collection of the 's on the message.
+ ///
public virtual IReadOnlyCollection