Browse Source

Add XMLDocs

To many files.
pull/988/head
Hsu Still 7 years ago
parent
commit
81ad8abf59
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
69 changed files with 262 additions and 95 deletions
  1. +1
    -1
      src/Discord.Net.Commands/Attributes/CommandAttribute.cs
  2. +1
    -0
      src/Discord.Net.Commands/Attributes/DontAutoLoadAttribute.cs
  3. +1
    -0
      src/Discord.Net.Commands/Attributes/DontInjectAttribute.cs
  4. +2
    -2
      src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs
  5. +1
    -1
      src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs
  6. +1
    -1
      src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs
  7. +1
    -1
      src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs
  8. +1
    -1
      src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs
  9. +2
    -2
      src/Discord.Net.Commands/Attributes/PriorityAttribute.cs
  10. +6
    -1
      src/Discord.Net.Core/ConnectionState.cs
  11. +5
    -7
      src/Discord.Net.Core/Entities/Activities/ActivityType.cs
  12. +3
    -0
      src/Discord.Net.Core/Entities/Activities/Game.cs
  13. +1
    -1
      src/Discord.Net.Core/Entities/Activities/GameAsset.cs
  14. +1
    -1
      src/Discord.Net.Core/Entities/Activities/GameTimestamps.cs
  15. +4
    -1
      src/Discord.Net.Core/Entities/Activities/IActivity.cs
  16. +9
    -0
      src/Discord.Net.Core/Entities/Activities/SpotifyGame.cs
  17. +5
    -2
      src/Discord.Net.Core/Entities/Activities/StreamingGame.cs
  18. +1
    -0
      src/Discord.Net.Core/Entities/CacheMode.cs
  19. +5
    -1
      src/Discord.Net.Core/Entities/Channels/Direction.cs
  20. +2
    -1
      src/Discord.Net.Core/Entities/Guilds/DefaultMessageNotifications.cs
  21. +1
    -1
      src/Discord.Net.Core/Entities/Guilds/GuildEmbedProperties.cs
  22. +5
    -1
      src/Discord.Net.Core/Entities/Guilds/GuildIntegrationProperties.cs
  23. +2
    -1
      src/Discord.Net.Core/Entities/Guilds/MfaLevel.cs
  24. +4
    -1
      src/Discord.Net.Core/Entities/Guilds/PermissionTarget.cs
  25. +2
    -1
      src/Discord.Net.Core/Entities/Guilds/VerificationLevel.cs
  26. +2
    -1
      src/Discord.Net.Core/Entities/IDeletable.cs
  27. +2
    -1
      src/Discord.Net.Core/Entities/IMentionable.cs
  28. +1
    -0
      src/Discord.Net.Core/Entities/ISnowflakeEntity.cs
  29. +2
    -1
      src/Discord.Net.Core/Entities/IUpdateable.cs
  30. +1
    -1
      src/Discord.Net.Core/Entities/ImageFormat.cs
  31. +14
    -1
      src/Discord.Net.Core/Entities/Messages/Embed.cs
  32. +6
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedAuthor.cs
  33. +2
    -4
      src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
  34. +5
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedField.cs
  35. +5
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedFooter.cs
  36. +6
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedImage.cs
  37. +4
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedProvider.cs
  38. +6
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedThumbnail.cs
  39. +10
    -0
      src/Discord.Net.Core/Entities/Messages/EmbedType.cs
  40. +5
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedVideo.cs
  41. +8
    -8
      src/Discord.Net.Core/Entities/Messages/IAttachment.cs
  42. +15
    -1
      src/Discord.Net.Core/Entities/Messages/IEmbed.cs
  43. +2
    -1
      src/Discord.Net.Core/Entities/Messages/IMessage.cs
  44. +3
    -1
      src/Discord.Net.Core/Entities/Messages/IReaction.cs
  45. +2
    -1
      src/Discord.Net.Core/Entities/Messages/IUserMessage.cs
  46. +1
    -1
      src/Discord.Net.Core/Entities/Messages/MessageProperties.cs
  47. +5
    -0
      src/Discord.Net.Core/Entities/Messages/MessageSource.cs
  48. +9
    -1
      src/Discord.Net.Core/Entities/Messages/MessageType.cs
  49. +4
    -3
      src/Discord.Net.Core/Entities/Messages/ReactionMetadata.cs
  50. +10
    -2
      src/Discord.Net.Core/Entities/Messages/TagHandling.cs
  51. +8
    -1
      src/Discord.Net.Core/Entities/Messages/TagType.cs
  52. +1
    -0
      src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
  53. +2
    -1
      src/Discord.Net.Core/Entities/Permissions/GuildPermission.cs
  54. +5
    -1
      src/Discord.Net.Core/Entities/Permissions/PermValue.cs
  55. +1
    -0
      src/Discord.Net.Core/Entities/Roles/Color.cs
  56. +4
    -3
      src/Discord.Net.Core/Entities/Roles/ReorderRoleProperties.cs
  57. +8
    -8
      src/Discord.Net.Core/Entities/Roles/RoleProperties.cs
  58. +2
    -1
      src/Discord.Net.Core/Entities/Users/IGroupUser.cs
  59. +2
    -2
      src/Discord.Net.Core/Entities/Users/IGuildUser.cs
  60. +3
    -2
      src/Discord.Net.Core/Entities/Users/IPresence.cs
  61. +2
    -1
      src/Discord.Net.Core/Entities/Users/ISelfUser.cs
  62. +1
    -0
      src/Discord.Net.Core/Entities/Users/IUser.cs
  63. +2
    -1
      src/Discord.Net.Core/Entities/Users/IWebhookUser.cs
  64. +2
    -2
      src/Discord.Net.Core/Entities/Users/SelfUserProperties.cs
  65. +8
    -1
      src/Discord.Net.Core/Entities/Users/UserStatus.cs
  66. +6
    -6
      src/Discord.Net.Core/Entities/Webhooks/WebhookProperties.cs
  67. +1
    -0
      src/Discord.Net.Core/Logging/LogSeverity.cs
  68. +6
    -1
      src/Discord.Net.Core/LoginState.cs
  69. +1
    -0
      src/Discord.Net.Core/TokenType.cs

+ 1
- 1
src/Discord.Net.Commands/Attributes/CommandAttribute.cs View File

@@ -7,7 +7,7 @@ namespace Discord.Commands
public class CommandAttribute : Attribute public class CommandAttribute : Attribute
{ {
/// <summary> /// <summary>
/// Specifies the text required to be recognized as a command.
/// Gets the text that has been set to be recognized as a command.
/// </summary> /// </summary>
public string Text { get; } public string Text { get; }
/// <summary> /// <summary>


+ 1
- 0
src/Discord.Net.Commands/Attributes/DontAutoLoadAttribute.cs View File

@@ -2,6 +2,7 @@ using System;


namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> Prevents the module from being loaded automatically. </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class DontAutoLoadAttribute : Attribute public class DontAutoLoadAttribute : Attribute
{ {


+ 1
- 0
src/Discord.Net.Commands/Attributes/DontInjectAttribute.cs View File

@@ -2,6 +2,7 @@ using System;


namespace Discord.Commands { namespace Discord.Commands {


/// <summary> Prevents the property from being injected into a module. </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class DontInjectAttribute : Attribute { public class DontInjectAttribute : Attribute {
} }


+ 2
- 2
src/Discord.Net.Commands/Attributes/Preconditions/RequireBotPermissionAttribute.cs View File

@@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> /// <summary>
/// This attribute requires the bot to have a specific permission in the channel a command is invoked in.
/// Requires the bot to have a specific permission in the channel a command is invoked in.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireBotPermissionAttribute : PreconditionAttribute public class RequireBotPermissionAttribute : PreconditionAttribute
@@ -13,7 +13,7 @@ namespace Discord.Commands
public ChannelPermission? ChannelPermission { get; } public ChannelPermission? ChannelPermission { get; }


/// <summary> /// <summary>
/// Requires that the bot account to have a specific <see cref="GuildPermission"/>.
/// Requires the bot account to have a specific <see cref="GuildPermission"/>.
/// </summary> /// </summary>
/// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks> /// <remarks>This precondition will always fail if the command is being invoked in a private channel.</remarks>
/// <param name="permission">The GuildPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together.</param> /// <param name="permission">The GuildPermission that the bot must have. Multiple permissions can be specified by ORing the permissions together.</param>


+ 1
- 1
src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs View File

@@ -13,7 +13,7 @@ namespace Discord.Commands
} }


/// <summary> /// <summary>
/// This attribute requires that the command be invoked in a specified context. (e.g. in guild, DM)
/// Requires the command to be invoked in a specified context. (e.g. in guild, DM)
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireContextAttribute : PreconditionAttribute public class RequireContextAttribute : PreconditionAttribute


+ 1
- 1
src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs View File

@@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> /// <summary>
/// This attribute requires that the command to be invoked in a channel marked NSFW.
/// Requires the command to be invoked in a channel marked NSFW.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireNsfwAttribute : PreconditionAttribute public class RequireNsfwAttribute : PreconditionAttribute


+ 1
- 1
src/Discord.Net.Commands/Attributes/Preconditions/RequireOwnerAttribute.cs View File

@@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> /// <summary>
/// This attribute requires that the command to be invoked by the owner of the bot.
/// Requires the command to be invoked by the owner of the bot.
/// </summary> /// </summary>
/// <remarks>This precondition will only work if the bot is a bot account.</remarks> /// <remarks>This precondition will only work if the bot is a bot account.</remarks>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]


+ 1
- 1
src/Discord.Net.Commands/Attributes/Preconditions/RequireUserPermissionAttribute.cs View File

@@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> /// <summary>
/// This attribute requires that the user invoking the command has a specified permission.
/// Requires the user invoking the command to have a specified permission.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RequireUserPermissionAttribute : PreconditionAttribute public class RequireUserPermissionAttribute : PreconditionAttribute


+ 2
- 2
src/Discord.Net.Commands/Attributes/PriorityAttribute.cs View File

@@ -2,11 +2,11 @@ using System;


namespace Discord.Commands namespace Discord.Commands
{ {
/// <summary> Sets priority of commands </summary>
/// <summary> Sets priority of commands. </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class PriorityAttribute : Attribute public class PriorityAttribute : Attribute
{ {
/// <summary> The priority which has been set for the command </summary>
/// <summary> Gets the priority which has been set for the command. </summary>
public int Priority { get; } public int Priority { get; }


/// <summary> Creates a new <see cref="PriorityAttribute"/> with the given priority. </summary> /// <summary> Creates a new <see cref="PriorityAttribute"/> with the given priority. </summary>


+ 6
- 1
src/Discord.Net.Core/ConnectionState.cs View File

@@ -1,10 +1,15 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the connection state of a client. </summary>
public enum ConnectionState : byte public enum ConnectionState : byte
{ {
/// <summary> Represents that the client has disconnected from the WebSocket. </summary>
Disconnected, Disconnected,
/// <summary> Represents that the client is connecting to the WebSocket. </summary>
Connecting, Connecting,
/// <summary> Represents that the client has established a connection to the WebSocket. </summary>
Connected, Connected,
/// <summary> Represents that the client is disconnecting from the WebSocket. </summary>
Disconnecting Disconnecting
} }
} }

+ 5
- 7
src/Discord.Net.Core/Entities/Activities/ActivityType.cs View File

@@ -1,17 +1,15 @@
namespace Discord namespace Discord
{ {
/// <summary>
/// Defines user's activity type.
/// </summary>
/// <summary> Specifies a Discord user's activity type. </summary>
public enum ActivityType public enum ActivityType
{ {
/// <summary> Activity that represents a user that is playing a game. </summary>
/// <summary> Represents that the user is playing a game. </summary>
Playing = 0, Playing = 0,
/// <summary> Activity that represents a user that is streaming online. </summary>
/// <summary> Represents that the user is streaming online. </summary>
Streaming = 1, Streaming = 1,
/// <summary> Activity that represents a user that is listening to a song. </summary>
/// <summary> Represents that the user is listening to a song. </summary>
Listening = 2, Listening = 2,
/// <summary> Activity that represents a user that is watching a media. </summary>
/// <summary> Represents that the user is watching a media. </summary>
Watching = 3 Watching = 3
} }
} }

+ 3
- 0
src/Discord.Net.Core/Entities/Activities/Game.cs View File

@@ -2,10 +2,13 @@ using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A user's game activity. </summary>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class Game : IActivity public class Game : IActivity
{ {
/// <inheritdoc/>
public string Name { get; internal set; } public string Name { get; internal set; }
/// <inheritdoc/>
public ActivityType Type { get; internal set; } public ActivityType Type { get; internal set; }


internal Game() { } internal Game() { }


+ 1
- 1
src/Discord.Net.Core/Entities/Activities/GameAsset.cs View File

@@ -1,6 +1,6 @@
namespace Discord namespace Discord
{ {
/// <summary> The asset for a <see cref="RichGame"/> object. </summary>
/// <summary> An asset for a <see cref="RichGame"/> object. </summary>
public class GameAsset public class GameAsset
{ {
internal GameAsset() { } internal GameAsset() { }


+ 1
- 1
src/Discord.Net.Core/Entities/Activities/GameTimestamps.cs View File

@@ -2,7 +2,7 @@ using System;


namespace Discord namespace Discord
{ {
/// <summary> The timestamps for a <see cref="RichGame"/> object. </summary>
/// <summary> Timestamps for a <see cref="RichGame"/> object. </summary>
public class GameTimestamps public class GameTimestamps
{ {
public DateTimeOffset? Start { get; } public DateTimeOffset? Start { get; }


+ 4
- 1
src/Discord.Net.Core/Entities/Activities/IActivity.cs View File

@@ -1,8 +1,11 @@
namespace Discord
namespace Discord
{ {
/// <summary> A Discord activity. </summary>
public interface IActivity public interface IActivity
{ {
/// <summary> Gets the name of the activity. </summary>
string Name { get; } string Name { get; }
/// <summary> Gets the type of the activity. </summary>
ActivityType Type { get; } ActivityType Type { get; }
} }
} }

+ 9
- 0
src/Discord.Net.Core/Entities/Activities/SpotifyGame.cs View File

@@ -4,19 +4,28 @@ using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A user's activity for listening to a song on Spotify. </summary>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class SpotifyGame : Game public class SpotifyGame : Game
{ {
/// <summary> Gets the song's artist(s). </summary>
public IEnumerable<string> Artists { get; internal set; } public IEnumerable<string> Artists { get; internal set; }
/// <summary> Gets the Spotify album art for the song. </summary>
public string AlbumArt { get; internal set; } public string AlbumArt { get; internal set; }
/// <summary> Gets the Spotify album title for the song. </summary>
public string AlbumTitle { get; internal set; } public string AlbumTitle { get; internal set; }
/// <summary> Gets the track title for the song. </summary>
public string TrackTitle { get; internal set; } public string TrackTitle { get; internal set; }
/// <summary> Gets the synchronization ID for the song. </summary>
public string SyncId { get; internal set; } public string SyncId { get; internal set; }
/// <summary> Gets the session ID for the song. </summary>
public string SessionId { get; internal set; } public string SessionId { get; internal set; }
/// <summary> Gets the duration for the song. </summary>
public TimeSpan? Duration { get; internal set; } public TimeSpan? Duration { get; internal set; }


internal SpotifyGame() { } internal SpotifyGame() { }


/// <summary> Gets the name of the song. </summary>
public override string ToString() => Name; public override string ToString() => Name;
private string DebuggerDisplay => $"{Name} (Spotify)"; private string DebuggerDisplay => $"{Name} (Spotify)";
} }


+ 5
- 2
src/Discord.Net.Core/Entities/Activities/StreamingGame.cs View File

@@ -1,10 +1,12 @@
using System.Diagnostics;
using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A user's activity for streaming on services such as Twitch. </summary>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class StreamingGame : Game public class StreamingGame : Game
{ {
/// <summary> Gets the URL of the stream. </summary>
public string Url { get; internal set; } public string Url { get; internal set; }


public StreamingGame(string name, string url) public StreamingGame(string name, string url)
@@ -14,7 +16,8 @@ namespace Discord
Type = ActivityType.Streaming; Type = ActivityType.Streaming;
} }


/// <summary> Gets the name of the stream. </summary>
public override string ToString() => Name; public override string ToString() => Name;
private string DebuggerDisplay => $"{Name} ({Url})"; private string DebuggerDisplay => $"{Name} ({Url})";
} }
}
}

+ 1
- 0
src/Discord.Net.Core/Entities/CacheMode.cs View File

@@ -1,5 +1,6 @@
namespace Discord namespace Discord
{ {
/// <summary> Specifies the cache mode that should be used. </summary>
public enum CacheMode public enum CacheMode
{ {
/// <summary> Allows the object to be downloaded if it does not exist in the current cache. </summary> /// <summary> Allows the object to be downloaded if it does not exist in the current cache. </summary>


+ 5
- 1
src/Discord.Net.Core/Entities/Channels/Direction.cs View File

@@ -1,9 +1,13 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the direction of where message(s) should be gotten from. </summary>
public enum Direction public enum Direction
{ {
/// <summary> The message(s) should be retrieved before a message. </summary>
Before, Before,
/// <summary> The message(s) should be retrieved after a message. </summary>
After, After,
/// <summary> The message(s) should be retrieved around a message. </summary>
Around Around
} }
} }

+ 2
- 1
src/Discord.Net.Core/Entities/Guilds/DefaultMessageNotifications.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the default message notification behavior the guild uses. </summary>
public enum DefaultMessageNotifications public enum DefaultMessageNotifications
{ {
/// <summary> By default, all messages will trigger notifications. </summary> /// <summary> By default, all messages will trigger notifications. </summary>


+ 1
- 1
src/Discord.Net.Core/Entities/Guilds/GuildEmbedProperties.cs View File

@@ -1,7 +1,7 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Properties that are used to modify the widget of an <see cref="IGuild"/> with the specified parameters.
/// Properties that are used to modify the widget of an <see cref="IGuild"/> with the specified changes.
/// </summary> /// </summary>
public class GuildEmbedProperties public class GuildEmbedProperties
{ {


+ 5
- 1
src/Discord.Net.Core/Entities/Guilds/GuildIntegrationProperties.cs View File

@@ -1,9 +1,13 @@
namespace Discord
namespace Discord
{ {
/// <summary> Properties used to modify an <see cref="IGuildIntegration"/> with the specified changes.</summary>
public class GuildIntegrationProperties public class GuildIntegrationProperties
{ {
/// <summary> Gets or sets the behavior when an integration subscription lapses. </summary>
public Optional<int> ExpireBehavior { get; set; } public Optional<int> ExpireBehavior { get; set; }
/// <summary> Gets or sets the period (in seconds) where the integration will ignore lapsed subscriptions. </summary>
public Optional<int> ExpireGracePeriod { get; set; } public Optional<int> ExpireGracePeriod { get; set; }
/// <summary> Gets or sets whether emoticons should be synced for this integration. </summary>
public Optional<bool> EnableEmoticons { get; set; } public Optional<bool> EnableEmoticons { get; set; }
} }
} }

+ 2
- 1
src/Discord.Net.Core/Entities/Guilds/MfaLevel.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the guild's Multi-Factor Authentication (MFA) level requirement. </summary>
public enum MfaLevel public enum MfaLevel
{ {
/// <summary> Users have no additional MFA restriction on this guild. </summary> /// <summary> Users have no additional MFA restriction on this guild. </summary>


+ 4
- 1
src/Discord.Net.Core/Entities/Guilds/PermissionTarget.cs View File

@@ -1,8 +1,11 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the target of the permission. </summary>
public enum PermissionTarget public enum PermissionTarget
{ {
/// <summary> The target of the permission is a role. </summary>
Role, Role,
/// <summary> The target of the permission is a user. </summary>
User User
} }
} }

+ 2
- 1
src/Discord.Net.Core/Entities/Guilds/VerificationLevel.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the verification level the guild uses. </summary>
public enum VerificationLevel public enum VerificationLevel
{ {
/// <summary> Users have no additional restrictions on sending messages to this guild. </summary> /// <summary> Users have no additional restrictions on sending messages to this guild. </summary>


+ 2
- 1
src/Discord.Net.Core/Entities/IDeletable.cs View File

@@ -1,7 +1,8 @@
using System.Threading.Tasks;
using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> Represents whether the object is deletable or not. </summary>
public interface IDeletable public interface IDeletable
{ {
/// <summary> Deletes this object and all its children. </summary> /// <summary> Deletes this object and all its children. </summary>


+ 2
- 1
src/Discord.Net.Core/Entities/IMentionable.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Represents whether the object is mentionable or not. </summary>
public interface IMentionable public interface IMentionable
{ {
/// <summary> Returns a special string used to mention this object. </summary> /// <summary> Returns a special string used to mention this object. </summary>


+ 1
- 0
src/Discord.Net.Core/Entities/ISnowflakeEntity.cs View File

@@ -2,6 +2,7 @@ using System;


namespace Discord namespace Discord
{ {
/// <summary> Represents a Discord snowflake entity. </summary>
public interface ISnowflakeEntity : IEntity<ulong> public interface ISnowflakeEntity : IEntity<ulong>
{ {
DateTimeOffset CreatedAt { get; } DateTimeOffset CreatedAt { get; }


+ 2
- 1
src/Discord.Net.Core/Entities/IUpdateable.cs View File

@@ -1,7 +1,8 @@
using System.Threading.Tasks;
using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> Represents whether the object is updatable or not. </summary>
public interface IUpdateable public interface IUpdateable
{ {
/// <summary> Updates this object's properties with its current state. </summary> /// <summary> Updates this object's properties with its current state. </summary>


+ 1
- 1
src/Discord.Net.Core/Entities/ImageFormat.cs View File

@@ -1,6 +1,6 @@
namespace Discord namespace Discord
{ {
/// <summary> The type of format for the image to return. </summary>
/// <summary> Specifies the type of format the image should return in. </summary>
public enum ImageFormat public enum ImageFormat
{ {
Auto, Auto,


+ 14
- 1
src/Discord.Net.Core/Entities/Messages/Embed.cs View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
@@ -8,19 +8,32 @@ namespace Discord
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class Embed : IEmbed public class Embed : IEmbed
{ {
/// <inheritdoc/>
public EmbedType Type { get; } public EmbedType Type { get; }


/// <inheritdoc/>
public string Description { get; internal set; } public string Description { get; internal set; }
/// <inheritdoc/>
public string Url { get; internal set; } public string Url { get; internal set; }
/// <inheritdoc/>
public string Title { get; internal set; } public string Title { get; internal set; }
/// <inheritdoc/>
public DateTimeOffset? Timestamp { get; internal set; } public DateTimeOffset? Timestamp { get; internal set; }
/// <inheritdoc/>
public Color? Color { get; internal set; } public Color? Color { get; internal set; }
/// <inheritdoc/>
public EmbedImage? Image { get; internal set; } public EmbedImage? Image { get; internal set; }
/// <inheritdoc/>
public EmbedVideo? Video { get; internal set; } public EmbedVideo? Video { get; internal set; }
/// <inheritdoc/>
public EmbedAuthor? Author { get; internal set; } public EmbedAuthor? Author { get; internal set; }
/// <inheritdoc/>
public EmbedFooter? Footer { get; internal set; } public EmbedFooter? Footer { get; internal set; }
/// <inheritdoc/>
public EmbedProvider? Provider { get; internal set; } public EmbedProvider? Provider { get; internal set; }
/// <inheritdoc/>
public EmbedThumbnail? Thumbnail { get; internal set; } public EmbedThumbnail? Thumbnail { get; internal set; }
/// <inheritdoc/>
public ImmutableArray<EmbedField> Fields { get; internal set; } public ImmutableArray<EmbedField> Fields { get; internal set; }


internal Embed(EmbedType type) internal Embed(EmbedType type)


+ 6
- 1
src/Discord.Net.Core/Entities/Messages/EmbedAuthor.cs View File

@@ -1,14 +1,19 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> An author field for an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedAuthor public struct EmbedAuthor
{ {
/// <summary> Gets the name of the author field.</summary>
public string Name { get; internal set; } public string Name { get; internal set; }
/// <summary> Gets the URL of the author field.</summary>
public string Url { get; internal set; } public string Url { get; internal set; }
/// <summary> Gets the icon URL of the author field.</summary>
public string IconUrl { get; internal set; } public string IconUrl { get; internal set; }
/// <summary> Gets the proxified icon URL of the author field.</summary>
public string ProxyIconUrl { get; internal set; } public string ProxyIconUrl { get; internal set; }


internal EmbedAuthor(string name, string url, string iconUrl, string proxyIconUrl) internal EmbedAuthor(string name, string url, string iconUrl, string proxyIconUrl)


+ 2
- 4
src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs View File

@@ -1,12 +1,10 @@
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;


namespace Discord namespace Discord
{ {
/// <summary>
/// Builder for creating an <see cref="Embed"/> to be sent.
/// </summary>
/// <summary> A builder for creating an <see cref="Embed"/> to be sent. </summary>
public class EmbedBuilder public class EmbedBuilder
{ {
private readonly Embed _embed; private readonly Embed _embed;


+ 5
- 1
src/Discord.Net.Core/Entities/Messages/EmbedField.cs View File

@@ -1,12 +1,16 @@
using System.Diagnostics;
using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A field for an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedField public struct EmbedField
{ {
/// <summary> Gets the name of the field.</summary>
public string Name { get; internal set; } public string Name { get; internal set; }
/// <summary> Gets the value of the field.</summary>
public string Value { get; internal set; } public string Value { get; internal set; }
/// <summary> Gets whether the field is inline inside an <see cref="Embed"/> or not.</summary>
public bool Inline { get; internal set; } public bool Inline { get; internal set; }


internal EmbedField(string name, string value, bool inline) internal EmbedField(string name, string value, bool inline)


+ 5
- 1
src/Discord.Net.Core/Entities/Messages/EmbedFooter.cs View File

@@ -1,13 +1,17 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A footer field for an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedFooter public struct EmbedFooter
{ {
/// <summary> Gets the text of the footer.</summary>
public string Text { get; internal set; } public string Text { get; internal set; }
/// <summary> Gets the icon URL of the footer.</summary>
public string IconUrl { get; internal set; } public string IconUrl { get; internal set; }
/// <summary> Gets the proxified icon URL of the footer.</summary>
public string ProxyUrl { get; internal set; } public string ProxyUrl { get; internal set; }


internal EmbedFooter(string text, string iconUrl, string proxyUrl) internal EmbedFooter(string text, string iconUrl, string proxyUrl)


+ 6
- 1
src/Discord.Net.Core/Entities/Messages/EmbedImage.cs View File

@@ -1,14 +1,19 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> An image for an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedImage public struct EmbedImage
{ {
/// <summary> Gets the URL of the image.</summary>
public string Url { get; } public string Url { get; }
/// <summary> Gets the proxified URL of the image.</summary>
public string ProxyUrl { get; } public string ProxyUrl { get; }
/// <summary> Gets the height of the image if any is set. </summary>
public int? Height { get; } public int? Height { get; }
/// <summary> Gets the width of the image if any is set. </summary>
public int? Width { get; } public int? Width { get; }


internal EmbedImage(string url, string proxyUrl, int? height, int? width) internal EmbedImage(string url, string proxyUrl, int? height, int? width)


+ 4
- 1
src/Discord.Net.Core/Entities/Messages/EmbedProvider.cs View File

@@ -1,12 +1,15 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A provider field for an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedProvider public struct EmbedProvider
{ {
/// <summary> Gets the name of the provider.</summary>
public string Name { get; } public string Name { get; }
/// <summary> Gets the URL of the provider.</summary>
public string Url { get; } public string Url { get; }


internal EmbedProvider(string name, string url) internal EmbedProvider(string name, string url)


+ 6
- 1
src/Discord.Net.Core/Entities/Messages/EmbedThumbnail.cs View File

@@ -1,14 +1,19 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A thumbnail featured in an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedThumbnail public struct EmbedThumbnail
{ {
/// <summary> Gets the URL of the thumbnail.</summary>
public string Url { get; } public string Url { get; }
/// <summary> Gets the proxified URL of the thumbnail.</summary>
public string ProxyUrl { get; } public string ProxyUrl { get; }
/// <summary> Gets the height of the thumbnail if any is set. </summary>
public int? Height { get; } public int? Height { get; }
/// <summary> Gets the width of the thumbnail if any is set. </summary>
public int? Width { get; } public int? Width { get; }


internal EmbedThumbnail(string url, string proxyUrl, int? height, int? width) internal EmbedThumbnail(string url, string proxyUrl, int? height, int? width)


+ 10
- 0
src/Discord.Net.Core/Entities/Messages/EmbedType.cs View File

@@ -1,15 +1,25 @@
namespace Discord namespace Discord
{ {
/// <summary> Specifies the type of embed. </summary>
public enum EmbedType public enum EmbedType
{ {
/// <summary> An unknown embed type. </summary>
Unknown = -1, Unknown = -1,
/// <summary> A rich embed type. </summary>
Rich, Rich,
/// <summary> A link embed type. </summary>
Link, Link,
/// <summary> A video embed type. </summary>
Video, Video,
/// <summary> An image embed type. </summary>
Image, Image,
/// <summary> A GIFV embed type. </summary>
Gifv, Gifv,
/// <summary> An article embed type. </summary>
Article, Article,
/// <summary> A tweet embed type. </summary>
Tweet, Tweet,
/// <summary> A HTML embed type. </summary>
Html, Html,
} }
} }

+ 5
- 1
src/Discord.Net.Core/Entities/Messages/EmbedVideo.cs View File

@@ -1,13 +1,17 @@
using System;
using System;
using System.Diagnostics; using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A video featured in an <see cref="Embed"/>. </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")] [DebuggerDisplay("{DebuggerDisplay,nq}")]
public struct EmbedVideo public struct EmbedVideo
{ {
/// <summary> Gets the URL of the video. </summary>
public string Url { get; } public string Url { get; }
/// <summary> Gets the height of the video if there is any. </summary>
public int? Height { get; } public int? Height { get; }
/// <summary> Gets the weight of the video if there is any. </summary>
public int? Width { get; } public int? Width { get; }


internal EmbedVideo(string url, int? height, int? width) internal EmbedVideo(string url, int? height, int? width)


+ 8
- 8
src/Discord.Net.Core/Entities/Messages/IAttachment.cs View File

@@ -1,22 +1,22 @@
namespace Discord namespace Discord
{ {
/// <summary> The interface that defines an attachment object. </summary>
/// <summary> Represents a Discord attachment object. </summary>
public interface IAttachment public interface IAttachment
{ {
/// <summary> The snowflake ID of the attachment. </summary>
/// <summary> Gets the snowflake ID of the attachment. </summary>
ulong Id { get; } ulong Id { get; }


/// <summary> The filename of the attachment. </summary>
/// <summary> Gets the filename of the attachment. </summary>
string Filename { get; } string Filename { get; }
/// <summary> The URL of the attachment. </summary>
/// <summary> Gets the URL of the attachment. </summary>
string Url { get; } string Url { get; }
/// <summary> The proxied URL of the attachment. </summary>
/// <summary> Gets the proxied URL of the attachment. </summary>
string ProxyUrl { get; } string ProxyUrl { get; }
/// <summary> The file size of the attachment. </summary>
/// <summary> Gets the file size of the attachment. </summary>
int Size { get; } int Size { get; }
/// <summary> The height of the attachment if it is an image, or return <see langword="null"/> when it is not. </summary>
/// <summary> Gets the height of the attachment if it is an image, or return <see langword="null"/> when it is not. </summary>
int? Height { get; } int? Height { get; }
/// <summary> The width of the attachment if it is an image, or return <see langword="null"/> when it is not. </summary>
/// <summary> Gets the width of the attachment if it is an image, or return <see langword="null"/> when it is not. </summary>
int? Width { get; } int? Width { get; }
} }
} }

+ 15
- 1
src/Discord.Net.Core/Entities/Messages/IEmbed.cs View File

@@ -1,22 +1,36 @@
using System;
using System;
using System.Collections.Immutable; using System.Collections.Immutable;


namespace Discord namespace Discord
{ {
/// <summary> Represents a Discord embed object. </summary>
public interface IEmbed public interface IEmbed
{ {
/// <summary> Gets the title URL of the embed. </summary>
string Url { get; } string Url { get; }
/// <summary> Gets the title of the embed. </summary>
string Title { get; } string Title { get; }
/// <summary> Gets the description of the embed. </summary>
string Description { get; } string Description { get; }
/// <summary> Gets the type of the embed. </summary>
EmbedType Type { get; } EmbedType Type { get; }
/// <summary> Gets the timestamp of the embed. </summary>
DateTimeOffset? Timestamp { get; } DateTimeOffset? Timestamp { get; }
/// <summary> Gets the sidebar color of the embed. </summary>
Color? Color { get; } Color? Color { get; }
/// <summary> Gets the image of the embed. </summary>
EmbedImage? Image { get; } EmbedImage? Image { get; }
/// <summary> Gets the video of the embed. </summary>
EmbedVideo? Video { get; } EmbedVideo? Video { get; }
/// <summary> Gets the author field of the embed. </summary>
EmbedAuthor? Author { get; } EmbedAuthor? Author { get; }
/// <summary> Gets the footer field of the embed. </summary>
EmbedFooter? Footer { get; } EmbedFooter? Footer { get; }
/// <summary> Gets the provider of the embed. </summary>
EmbedProvider? Provider { get; } EmbedProvider? Provider { get; }
/// <summary> Gets the thumbnail featured in the embed. </summary>
EmbedThumbnail? Thumbnail { get; } EmbedThumbnail? Thumbnail { get; }
/// <summary> Gets the fields of the embed. </summary>
ImmutableArray<EmbedField> Fields { get; } ImmutableArray<EmbedField> Fields { get; }
} }
} }

+ 2
- 1
src/Discord.Net.Core/Entities/Messages/IMessage.cs View File

@@ -1,8 +1,9 @@
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;


namespace Discord namespace Discord
{ {
/// <summary> Represents a Discord message object. </summary>
public interface IMessage : ISnowflakeEntity, IDeletable public interface IMessage : ISnowflakeEntity, IDeletable
{ {
/// <summary> Gets the type of this system message. </summary> /// <summary> Gets the type of this system message. </summary>


+ 3
- 1
src/Discord.Net.Core/Entities/Messages/IReaction.cs View File

@@ -1,7 +1,9 @@
namespace Discord
namespace Discord
{ {
/// <summary> Represents a Discord reaction object. </summary>
public interface IReaction public interface IReaction
{ {
/// <summary> The <see cref="IEmote"/> used in the reaction. </summary>
IEmote Emote { get; } IEmote Emote { get; }
} }
} }

+ 2
- 1
src/Discord.Net.Core/Entities/Messages/IUserMessage.cs View File

@@ -1,9 +1,10 @@
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> A Discord message object. </summary>
public interface IUserMessage : IMessage public interface IUserMessage : IMessage
{ {
/// <summary> Modifies this message. </summary> /// <summary> Modifies this message. </summary>


+ 1
- 1
src/Discord.Net.Core/Entities/Messages/MessageProperties.cs View File

@@ -1,7 +1,7 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Properties that are used to modify a message with the specified parameters.
/// Properties that are used to modify an <see cref="IUserMessage"/> with the specified changes.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// The content of a message can be cleared with String.Empty; if and only if an Embed is present. /// The content of a message can be cleared with String.Empty; if and only if an Embed is present.


+ 5
- 0
src/Discord.Net.Core/Entities/Messages/MessageSource.cs View File

@@ -1,10 +1,15 @@
namespace Discord namespace Discord
{ {
/// <summary> Specifies the source of the Discord message. </summary>
public enum MessageSource public enum MessageSource
{ {
/// <summary> The message is sent by the system. </summary>
System, System,
/// <summary> The message is sent by a user. </summary>
User, User,
/// <summary> The message is sent by a bot. </summary>
Bot, Bot,
/// <summary> The message is sent by a webhook. </summary>
Webhook Webhook
} }
} }

+ 9
- 1
src/Discord.Net.Core/Entities/Messages/MessageType.cs View File

@@ -1,13 +1,21 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the type of message. </summary>
public enum MessageType public enum MessageType
{ {
/// <summary> The default message type. </summary>
Default = 0, Default = 0,
/// <summary> The message when a recipient is added. </summary>
RecipientAdd = 1, RecipientAdd = 1,
/// <summary> The message when a recipient is removed. </summary>
RecipientRemove = 2, RecipientRemove = 2,
/// <summary> The message when a user is called. </summary>
Call = 3, Call = 3,
/// <summary> The message when a channel name is changed. </summary>
ChannelNameChange = 4, ChannelNameChange = 4,
/// <summary> The message when a channel icon is changed. </summary>
ChannelIconChange = 5, ChannelIconChange = 5,
/// <summary> The message when another message is pinned. </summary>
ChannelPinnedMessage = 6 ChannelPinnedMessage = 6
} }
} }

+ 4
- 3
src/Discord.Net.Core/Entities/Messages/ReactionMetadata.cs View File

@@ -1,11 +1,12 @@
namespace Discord
namespace Discord
{ {
/// <summary> A metadata containing reaction information. </summary>
public struct ReactionMetadata public struct ReactionMetadata
{ {
/// <summary> Gets the number of reactions </summary>
/// <summary> Gets the number of reactions. </summary>
public int ReactionCount { get; internal set; } public int ReactionCount { get; internal set; }


/// <summary> Returns true if the current user has used this reaction </summary>
/// <summary> Returns true if the current user has used this reaction. </summary>
public bool IsMe { get; internal set; } public bool IsMe { get; internal set; }
} }
} }

+ 10
- 2
src/Discord.Net.Core/Entities/Messages/TagHandling.cs View File

@@ -1,13 +1,21 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the handling type the tag should use. </summary>
public enum TagHandling public enum TagHandling
{ {
/// <summary> Tag handling is ignored. </summary>
Ignore = 0, //<@53905483156684800> -> <@53905483156684800> Ignore = 0, //<@53905483156684800> -> <@53905483156684800>
Remove, //<@53905483156684800> ->
/// <summary> Removes the tag entirely. </summary>
Remove, //<@53905483156684800> ->
/// <summary> Resolves to username (e.g. @User). </summary>
Name, //<@53905483156684800> -> @Voltana Name, //<@53905483156684800> -> @Voltana
/// <summary> Resolves to username without mention prefix (e.g. User). </summary>
NameNoPrefix, //<@53905483156684800> -> Voltana NameNoPrefix, //<@53905483156684800> -> Voltana
/// <summary> Resolves to username with discriminator value. (e.g. @User#0001). </summary>
FullName, //<@53905483156684800> -> @Voltana#8252 FullName, //<@53905483156684800> -> @Voltana#8252
/// <summary> Resolves to username with discriminator value without mention prefix. (e.g. User#0001). </summary>
FullNameNoPrefix, //<@53905483156684800> -> Voltana#8252 FullNameNoPrefix, //<@53905483156684800> -> Voltana#8252
/// <summary> Sanitizes the tag. </summary>
Sanitize //<@53905483156684800> -> <@53905483156684800> (w/ nbsp) Sanitize //<@53905483156684800> -> <@53905483156684800> (w/ nbsp)
} }
} }

+ 8
- 1
src/Discord.Net.Core/Entities/Messages/TagType.cs View File

@@ -1,12 +1,19 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the type of Discord tag. </summary>
public enum TagType public enum TagType
{ {
/// <summary> The object is an user mention. </summary>
UserMention, UserMention,
/// <summary> The object is a channel mention. </summary>
ChannelMention, ChannelMention,
/// <summary> The object is a role mention. </summary>
RoleMention, RoleMention,
/// <summary> The object is an everyone mention. </summary>
EveryoneMention, EveryoneMention,
/// <summary> The object is a here mention. </summary>
HereMention, HereMention,
/// <summary> The object is an emoji. </summary>
Emoji Emoji
} }
} }

+ 1
- 0
src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs View File

@@ -2,6 +2,7 @@ using System;


namespace Discord namespace Discord
{ {
/// <summary> Defines the available permissions for a channel. </summary>
[FlagsAttribute] [FlagsAttribute]
public enum ChannelPermission : ulong public enum ChannelPermission : ulong
{ {


+ 2
- 1
src/Discord.Net.Core/Entities/Permissions/GuildPermission.cs View File

@@ -1,7 +1,8 @@
using System;
using System;


namespace Discord namespace Discord
{ {
/// <summary> Defines the available permissions for a channel. </summary>
[FlagsAttribute] [FlagsAttribute]
public enum GuildPermission : ulong public enum GuildPermission : ulong
{ {


+ 5
- 1
src/Discord.Net.Core/Entities/Permissions/PermValue.cs View File

@@ -1,9 +1,13 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the permission value. </summary>
public enum PermValue public enum PermValue
{ {
/// <summary> Allows this permission. </summary>
Allow, Allow,
/// <summary> Denies this permission. </summary>
Deny, Deny,
/// <summary> Inherits the permission settings. </summary>
Inherit Inherit
} }
} }

+ 1
- 0
src/Discord.Net.Core/Entities/Roles/Color.cs View File

@@ -3,6 +3,7 @@ using System.Diagnostics;


namespace Discord namespace Discord
{ {
/// <summary> A color object that Discord uses. </summary>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public struct Color public struct Color
{ {


+ 4
- 3
src/Discord.Net.Core/Entities/Roles/ReorderRoleProperties.cs View File

@@ -1,10 +1,11 @@
namespace Discord
namespace Discord
{ {
/// <summary> Properties that are used to reorder an <see cref="IRole"/>. </summary>
public class ReorderRoleProperties public class ReorderRoleProperties
{ {
/// <summary>The id of the role to be edited</summary>
/// <summary> Gets the ID of the role to be edited. </summary>
public ulong Id { get; } public ulong Id { get; }
/// <summary>The new zero-based position of the role.</summary>
/// <summary> Gets the new zero-based position of the role. </summary>
public int Position { get; } public int Position { get; }


public ReorderRoleProperties(ulong id, int pos) public ReorderRoleProperties(ulong id, int pos)


+ 8
- 8
src/Discord.Net.Core/Entities/Roles/RoleProperties.cs View File

@@ -1,7 +1,7 @@
namespace Discord
namespace Discord
{ {
/// <summary> /// <summary>
/// Modify an IRole with the specified parameters
/// Properties that are used to modify an <see cref="IRole"/> with the specified changes.
/// </summary> /// </summary>
/// <example> /// <example>
/// <code language="c#"> /// <code language="c#">
@@ -16,39 +16,39 @@
public class RoleProperties public class RoleProperties
{ {
/// <summary> /// <summary>
/// The name of the role
/// Gets or sets the name of the role.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this role is the EveryoneRole, this value may not be set. /// If this role is the EveryoneRole, this value may not be set.
/// </remarks> /// </remarks>
public Optional<string> Name { get; set; } public Optional<string> Name { get; set; }
/// <summary> /// <summary>
/// The role's GuildPermissions
/// Gets or sets the role's <see cref="GuildPermission"/>.
/// </summary> /// </summary>
public Optional<GuildPermissions> Permissions { get; set; } public Optional<GuildPermissions> Permissions { get; set; }
/// <summary> /// <summary>
/// The position of the role. This is 0-based!
/// Gets or sets the position of the role. This is 0-based!
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this role is the EveryoneRole, this value may not be set. /// If this role is the EveryoneRole, this value may not be set.
/// </remarks> /// </remarks>
public Optional<int> Position { get; set; } public Optional<int> Position { get; set; }
/// <summary> /// <summary>
/// The color of the Role.
/// Gets or sets the color of the Role.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this role is the EveryoneRole, this value may not be set. /// If this role is the EveryoneRole, this value may not be set.
/// </remarks> /// </remarks>
public Optional<Color> Color { get; set; } public Optional<Color> Color { get; set; }
/// <summary> /// <summary>
/// Whether or not this role should be displayed independently in the userlist.
/// Gets or sets whether or not this role should be displayed independently in the userlist.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this role is the EveryoneRole, this value may not be set. /// If this role is the EveryoneRole, this value may not be set.
/// </remarks> /// </remarks>
public Optional<bool> Hoist { get; set; } public Optional<bool> Hoist { get; set; }
/// <summary> /// <summary>
/// Whether or not this role can be mentioned.
/// Gets or sets whether or not this role can be mentioned.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this role is the EveryoneRole, this value may not be set. /// If this role is the EveryoneRole, this value may not be set.


+ 2
- 1
src/Discord.Net.Core/Entities/Users/IGroupUser.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Represents a Discord user that is in a group. </summary>
public interface IGroupUser : IUser, IVoiceState public interface IGroupUser : IUser, IVoiceState
{ {
///// <summary> Kicks this user from this group. </summary> ///// <summary> Kicks this user from this group. </summary>


+ 2
- 2
src/Discord.Net.Core/Entities/Users/IGuildUser.cs View File

@@ -1,10 +1,10 @@
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> A Guild-User pairing. </summary>
/// <summary> Represents a Discord user that is in a guild. </summary>
public interface IGuildUser : IUser, IVoiceState public interface IGuildUser : IUser, IVoiceState
{ {
/// <summary> Gets when this user joined this guild. </summary> /// <summary> Gets when this user joined this guild. </summary>


+ 3
- 2
src/Discord.Net.Core/Entities/Users/IPresence.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Represents a Discord user's presence status. </summary>
public interface IPresence public interface IPresence
{ {
/// <summary> Gets the activity this user is currently doing. </summary> /// <summary> Gets the activity this user is currently doing. </summary>
@@ -7,4 +8,4 @@
/// <summary> Gets the current status of this user. </summary> /// <summary> Gets the current status of this user. </summary>
UserStatus Status { get; } UserStatus Status { get; }
} }
}
}

+ 2
- 1
src/Discord.Net.Core/Entities/Users/ISelfUser.cs View File

@@ -3,6 +3,7 @@ using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> Represents a logged-in Discord user. </summary>
public interface ISelfUser : IUser public interface ISelfUser : IUser
{ {
/// <summary> Gets the email associated with this user. </summary> /// <summary> Gets the email associated with this user. </summary>
@@ -14,4 +15,4 @@ namespace Discord


Task ModifyAsync(Action<SelfUserProperties> func, RequestOptions options = null); Task ModifyAsync(Action<SelfUserProperties> func, RequestOptions options = null);
} }
}
}

+ 1
- 0
src/Discord.Net.Core/Entities/Users/IUser.cs View File

@@ -2,6 +2,7 @@ using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
/// <summary> Represents a Discord user. </summary>
public interface IUser : ISnowflakeEntity, IMentionable, IPresence public interface IUser : ISnowflakeEntity, IMentionable, IPresence
{ {
/// <summary> Gets the id of this user's avatar. </summary> /// <summary> Gets the id of this user's avatar. </summary>


+ 2
- 1
src/Discord.Net.Core/Entities/Users/IWebhookUser.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> Represents a Webhook Discord user. </summary>
public interface IWebhookUser : IGuildUser public interface IWebhookUser : IGuildUser
{ {
ulong WebhookId { get; } ulong WebhookId { get; }


+ 2
- 2
src/Discord.Net.Core/Entities/Users/SelfUserProperties.cs View File

@@ -1,7 +1,7 @@
namespace Discord
namespace Discord
{ {
/// <summary> /// <summary>
/// Modify the current user with the specified arguments
/// Properties that are used to modify the <see cref="ISelfUser"/> with the specified changes.
/// </summary> /// </summary>
/// <example> /// <example>
/// <code language="c#"> /// <code language="c#">


+ 8
- 1
src/Discord.Net.Core/Entities/Users/UserStatus.cs View File

@@ -1,12 +1,19 @@
namespace Discord
namespace Discord
{ {
/// <summary> Defines the available Discord user status. </summary>
public enum UserStatus public enum UserStatus
{ {
/// <summary> The user is offline. </summary>
Offline, Offline,
/// <summary> The user is online. </summary>
Online, Online,
/// <summary> The user is idle. </summary>
Idle, Idle,
/// <summary> The user is AFK. </summary>
AFK, AFK,
/// <summary> The user is busy. </summary>
DoNotDisturb, DoNotDisturb,
/// <summary> The user is invisible. </summary>
Invisible, Invisible,
} }
} }

+ 6
- 6
src/Discord.Net.Core/Entities/Webhooks/WebhookProperties.cs View File

@@ -1,7 +1,7 @@
namespace Discord
namespace Discord
{ {
/// <summary> /// <summary>
/// Modify an <see cref="IWebhook"/> with the specified parameters.
/// Properties used to modify an <see cref="IWebhook"/> with the specified changes.
/// </summary> /// </summary>
/// <example> /// <example>
/// <code language="c#"> /// <code language="c#">
@@ -16,22 +16,22 @@
public class WebhookProperties public class WebhookProperties
{ {
/// <summary> /// <summary>
/// The default name of the webhook.
/// Gets or sets the default name of the webhook.
/// </summary> /// </summary>
public Optional<string> Name { get; set; } public Optional<string> Name { get; set; }
/// <summary> /// <summary>
/// The default avatar of the webhook.
/// Gets or sets the default avatar of the webhook.
/// </summary> /// </summary>
public Optional<Image?> Image { get; set; } public Optional<Image?> Image { get; set; }
/// <summary> /// <summary>
/// The channel for this webhook.
/// Gets or sets the channel for this webhook.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This field is not used when authenticated with <see cref="TokenType.Webhook"/>. /// This field is not used when authenticated with <see cref="TokenType.Webhook"/>.
/// </remarks> /// </remarks>
public Optional<ITextChannel> Channel { get; set; } public Optional<ITextChannel> Channel { get; set; }
/// <summary> /// <summary>
/// The channel id for this webhook.
/// Gets or sets the channel ID for this webhook.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This field is not used when authenticated with <see cref="TokenType.Webhook"/>. /// This field is not used when authenticated with <see cref="TokenType.Webhook"/>.


+ 1
- 0
src/Discord.Net.Core/Logging/LogSeverity.cs View File

@@ -1,5 +1,6 @@
namespace Discord namespace Discord
{ {
/// <summary> Specifies the severity of the log message. </summary>
public enum LogSeverity public enum LogSeverity
{ {
/// <summary> /// <summary>


+ 6
- 1
src/Discord.Net.Core/LoginState.cs View File

@@ -1,10 +1,15 @@
namespace Discord
namespace Discord
{ {
/// <summary> Specifies the state of the client's login status. </summary>
public enum LoginState : byte public enum LoginState : byte
{ {
/// <summary> The client is currently logged out. </summary>
LoggedOut, LoggedOut,
/// <summary> The client is currently logging in. </summary>
LoggingIn, LoggingIn,
/// <summary> The client is currently logged in. </summary>
LoggedIn, LoggedIn,
/// <summary> The client is currently logging out. </summary>
LoggingOut LoggingOut
} }
} }

+ 1
- 0
src/Discord.Net.Core/TokenType.cs View File

@@ -2,6 +2,7 @@ using System;


namespace Discord namespace Discord
{ {
/// <summary> Specifies the type of token to use with the client. </summary>
public enum TokenType public enum TokenType
{ {
[Obsolete("User logins are deprecated and may result in a ToS strike against your account - please see https://github.com/RogueException/Discord.Net/issues/827", error: true)] [Obsolete("User logins are deprecated and may result in a ToS strike against your account - please see https://github.com/RogueException/Discord.Net/issues/827", error: true)]


Loading…
Cancel
Save