diff --git a/src/Discord.Net.Core/Entities/Activities/ActivityType.cs b/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
index c7db7b247..4cc71b119 100644
--- a/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
+++ b/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
@@ -1,10 +1,17 @@
-namespace Discord
+namespace Discord
{
+ ///
+ /// Defines user's activity type.
+ ///
public enum ActivityType
{
+ /// Activity that represents a user that is playing a game.
Playing = 0,
+ /// Activity that represents a user that is streaming online.
Streaming = 1,
+ /// Activity that represents a user that is listening to a song.
Listening = 2,
+ /// Activity that represents a user that is watching a media.
Watching = 3
}
}
diff --git a/src/Discord.Net.Core/Entities/Messages/IAttachment.cs b/src/Discord.Net.Core/Entities/Messages/IAttachment.cs
index 225e9cf2e..d0f99ba4a 100644
--- a/src/Discord.Net.Core/Entities/Messages/IAttachment.cs
+++ b/src/Discord.Net.Core/Entities/Messages/IAttachment.cs
@@ -1,14 +1,21 @@
-namespace Discord
+namespace Discord
{
public interface IAttachment
{
+ /// The snowflake ID of the attachment.
ulong Id { get; }
+ /// The filename of the attachment.
string Filename { get; }
+ /// The URL of the attachment.
string Url { get; }
+ /// The proxied URL of the attachment.
string ProxyUrl { get; }
+ /// The file size of the attachment.
int Size { get; }
+ /// The height of the attachment if it is an image, or return when it is not.
int? Height { get; }
+ /// The width of the attachment if it is an image, or return when it is not.
int? Width { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs b/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
index 740b6c30b..3db506487 100644
--- a/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
+++ b/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
namespace Discord
{
@@ -6,33 +6,54 @@ namespace Discord
public enum ChannelPermission : ulong
{
// General
+ /// Allows creation of instant invites.
CreateInstantInvite = 0x00_00_00_01,
- ManageChannels = 0x00_00_00_10,
+ /// Allows management and editing of channels.
+ ManageChannels = 0x00_00_00_10,
// Text
- AddReactions = 0x00_00_00_40,
+ /// Allows for the addition of reactions to messages.
+ AddReactions = 0x00_00_00_40,
+ /// Allows for reading of message.
[Obsolete("Use ViewChannel instead.")]
- ReadMessages = ViewChannel,
- ViewChannel = 0x00_00_04_00,
- SendMessages = 0x00_00_08_00,
- SendTTSMessages = 0x00_00_10_00,
- ManageMessages = 0x00_00_20_00,
- EmbedLinks = 0x00_00_40_00,
- AttachFiles = 0x00_00_80_00,
- ReadMessageHistory = 0x00_01_00_00,
- MentionEveryone = 0x00_02_00_00,
- UseExternalEmojis = 0x00_04_00_00,
+ ReadMessages = ViewChannel,
+ /// Allows guild members to view a channel, which includes reading messages in text channels.
+ ViewChannel = 0x00_00_04_00,
+ /// Allows for sending messages in a channel.
+ SendMessages = 0x00_00_08_00,
+ /// Allows for sending of text-to-speech messages.
+ SendTTSMessages = 0x00_00_10_00,
+ /// Allows for deletion of other users messages.
+ ManageMessages = 0x00_00_20_00,
+ /// Links sent by users with this permission will be auto-embedded.
+ EmbedLinks = 0x00_00_40_00,
+ /// Allows for uploading images and files.
+ AttachFiles = 0x00_00_80_00,
+ /// Allows for reading of message history.
+ ReadMessageHistory = 0x00_01_00_00,
+ /// Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel.
+ MentionEveryone = 0x00_02_00_00,
+ /// Allows the usage of custom emojis from other servers.
+ UseExternalEmojis = 0x00_04_00_00,
// Voice
- Connect = 0x00_10_00_00,
- Speak = 0x00_20_00_00,
- MuteMembers = 0x00_40_00_00,
- DeafenMembers = 0x00_80_00_00,
- MoveMembers = 0x01_00_00_00,
- UseVAD = 0x02_00_00_00,
+ /// Allows for joining of a voice channel.
+ Connect = 0x00_10_00_00,
+ /// Allows for speaking in a voice channel.
+ Speak = 0x00_20_00_00,
+ /// Allows for muting members in a voice channel.
+ MuteMembers = 0x00_40_00_00,
+ /// Allows for deafening of members in a voice channel.
+ DeafenMembers = 0x00_80_00_00,
+ /// Allows for moving of members between voice channels.
+ MoveMembers = 0x01_00_00_00,
+ /// Allows for using voice-activity-detection in a voice channel.
+ UseVAD = 0x02_00_00_00,
// More General
- ManageRoles = 0x10_00_00_00,
- ManageWebhooks = 0x20_00_00_00,
+ /// Allows management and editing of roles.
+ ManageRoles = 0x10_00_00_00,
+ /// Allows management and editing of webhooks.
+ ManageWebhooks = 0x20_00_00_00,
}
}
diff --git a/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs b/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
index 1a8aad53c..92cc90c09 100644
--- a/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
+++ b/src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -7,17 +7,17 @@ namespace Discord
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct ChannelPermissions
{
- /// Gets a blank ChannelPermissions that grants no permissions.
+ /// Gets a blank that grants no permissions.
public static readonly ChannelPermissions None = new ChannelPermissions();
- /// Gets a ChannelPermissions that grants all permissions for text channels.
+ /// Gets a that grants all permissions for text channels.
public static readonly ChannelPermissions Text = new ChannelPermissions(0b01100_0000000_1111111110001_010001);
- /// Gets a ChannelPermissions that grants all permissions for voice channels.
+ /// Gets a that grants all permissions for voice channels.
public static readonly ChannelPermissions Voice = new ChannelPermissions(0b00100_1111110_0000000000000_010001);
- /// Gets a ChannelPermissions that grants all permissions for direct message channels.
+ /// Gets a that grants all permissions for direct message channels.
public static readonly ChannelPermissions DM = new ChannelPermissions(0b00000_1000110_1011100110000_000000);
- /// Gets a ChannelPermissions that grants all permissions for group channels.
+ /// Gets a that grants all permissions for group channels.
public static readonly ChannelPermissions Group = new ChannelPermissions(0b00000_1000110_0001101100000_000000);
- /// Gets a ChannelPermissions that grants all permissions for a given channelType.
+ /// Gets a that grants all permissions for a given channelType.
public static ChannelPermissions All(IChannel channel)
{
switch (channel)
@@ -30,7 +30,7 @@ namespace Discord
}
}
- /// Gets a packed value representing all the permissions in this ChannelPermissions.
+ /// Gets a packed value representing all the permissions in this .
public ulong RawValue { get; }
/// If True, a user may create invites.
@@ -117,7 +117,7 @@ namespace Discord
RawValue = value;
}
- /// Creates a new ChannelPermissions with the provided permissions.
+ /// Creates a new with the provided permissions.
public ChannelPermissions(bool createInstantInvite = false, bool manageChannel = false,
bool addReactions = false,
bool viewChannel = false, bool sendMessages = false, bool sendTTSMessages = false, bool manageMessages = false,
@@ -129,7 +129,7 @@ namespace Discord
speak, muteMembers, deafenMembers, moveMembers, useVoiceActivation, manageRoles, manageWebhooks)
{ }
- /// Creates a new ChannelPermissions from this one, changing the provided non-null permissions.
+ /// Creates a new from this one, changing the provided non-null permissions.
public ChannelPermissions Modify(bool? createInstantInvite = null, bool? manageChannel = null,
bool? addReactions = null,
bool? viewChannel = null, bool? sendMessages = null, bool? sendTTSMessages = null, bool? manageMessages = null,
@@ -157,4 +157,4 @@ namespace Discord
public override string ToString() => RawValue.ToString();
private string DebuggerDisplay => $"{string.Join(", ", ToList())}";
}
-}
\ No newline at end of file
+}
diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
index e9f069a50..c1fdc5af5 100644
--- a/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
@@ -1,11 +1,17 @@
-namespace Discord
+namespace Discord
{
+ /// Defines the types of channels.
public enum ChannelType
{
+ /// Represents a text channel.
Text = 0,
+ /// Represents a Direct Message channel.
DM = 1,
+ /// Represents a voice channel.
Voice = 2,
+ /// Represents a group channel.
Group = 3,
+ /// Represents a category channel.
Category = 4
}
}
diff --git a/src/Discord.Net.Rest/Entities/Messages/Attachment.cs b/src/Discord.Net.Rest/Entities/Messages/Attachment.cs
index e185234ac..9d3912bfc 100644
--- a/src/Discord.Net.Rest/Entities/Messages/Attachment.cs
+++ b/src/Discord.Net.Rest/Entities/Messages/Attachment.cs
@@ -1,4 +1,4 @@
-using System.Diagnostics;
+using System.Diagnostics;
using Model = Discord.API.Attachment;
namespace Discord
@@ -6,12 +6,19 @@ namespace Discord
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class Attachment : IAttachment
{
+ ///
public ulong Id { get; }
+ ///
public string Filename { get; }
+ ///
public string Url { get; }
+ ///
public string ProxyUrl { get; }
+ ///
public int Size { get; }
+ ///
public int? Height { get; }
+ ///
public int? Width { get; }
internal Attachment(ulong id, string filename, string url, string proxyUrl, int size, int? height, int? width)