Added some miscellaneous missing xmldocspull/1161/head
| @@ -1,17 +1,40 @@ | |||||
| using System; | |||||
| using System; | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| public interface IGuildIntegration | public interface IGuildIntegration | ||||
| { | { | ||||
| /// <summary> Gets the integration ID. </summary> | |||||
| /// <returns> An <see cref="ulong"/> representing the unique identifier value of this integration. </returns> | |||||
| ulong Id { get; } | ulong Id { get; } | ||||
| /// <summary> Gets the integration name. </summary> | |||||
| /// <returns> A string containing the name of this integration. </returns> | |||||
| string Name { get; } | string Name { get; } | ||||
| /// <summary> Gets the integration type (twitch, youtube, etc). </summary> | |||||
| /// <returns> A string containing the name of the type of integration. </returns> | |||||
| string Type { get; } | string Type { get; } | ||||
| /// <summary> Gets if this integration is enabled or not. </summary> | |||||
| /// <summary> A value indicating if this integration is enabled. </returns> | |||||
| bool IsEnabled { get; } | bool IsEnabled { get; } | ||||
| /// <summary> Gets if this integration is syncing or not. </summary> | |||||
| /// <returns> A value indicating if this integration is syncing. </returns> | |||||
| /// <remarks> | |||||
| /// An integration with syncing enabled will update its "subscribers" on | |||||
| /// an interval, while one with syncing disabled will not. | |||||
| /// A user must manually choose when sync the integration | |||||
| /// if syncing is disabled. | |||||
| /// </remarks> | |||||
| bool IsSyncing { get; } | bool IsSyncing { get; } | ||||
| /// <summary> Gets the ID that this integration uses for "subscribers". </summary> | |||||
| ulong ExpireBehavior { get; } | ulong ExpireBehavior { get; } | ||||
| /// <summary> Gets the grace period before expiring "subscribers". </summary> | |||||
| ulong ExpireGracePeriod { get; } | ulong ExpireGracePeriod { get; } | ||||
| /// <summary> Gets when this integration was last synced. </summary> | |||||
| /// <returns> A <see cref="DateTimeOffset"/> containing a date and time of day when the integration was last synced. </returns> | |||||
| DateTimeOffset SyncedAt { get; } | DateTimeOffset SyncedAt { get; } | ||||
| /// <summary> | |||||
| /// Gets integration account information. | |||||
| /// </summary> | |||||
| IntegrationAccount Account { get; } | IntegrationAccount Account { get; } | ||||
| IGuild Guild { get; } | IGuild Guild { get; } | ||||
| @@ -1,11 +1,15 @@ | |||||
| using System.Diagnostics; | |||||
| using System.Diagnostics; | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| [DebuggerDisplay("{DebuggerDisplay,nq}")] | [DebuggerDisplay("{DebuggerDisplay,nq}")] | ||||
| public struct IntegrationAccount | public struct IntegrationAccount | ||||
| { | { | ||||
| /// <summary> Gets the ID of the account. </summary> | |||||
| /// <returns> A <see cref="string"> unique identifier of this integration account. </returns> | |||||
| public string Id { get; } | public string Id { get; } | ||||
| /// <summary> Gets the name of the account. </summary> | |||||
| /// <returns> A string containing the name of this integration account. </returns> | |||||
| public string Name { get; private set; } | public string Name { get; private set; } | ||||
| public override string ToString() => Name; | public override string ToString() => Name; | ||||
| @@ -22,7 +22,7 @@ namespace Discord | |||||
| /// </summary> | /// </summary> | ||||
| AddReactions = 0x00_00_00_40, | AddReactions = 0x00_00_00_40, | ||||
| /// <summary> | /// <summary> | ||||
| /// Allows for reading of message. | |||||
| /// Allows for reading of messages. This flag is obsolete, use <see cref = "ViewChannel" /> instead. | |||||
| /// </summary> | /// </summary> | ||||
| [Obsolete("Use ViewChannel instead.")] | [Obsolete("Use ViewChannel instead.")] | ||||
| ReadMessages = ViewChannel, | ReadMessages = ViewChannel, | ||||
| @@ -14,23 +14,43 @@ namespace Discord | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows kicking members. | /// Allows kicking members. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| KickMembers = 0x00_00_00_02, | KickMembers = 0x00_00_00_02, | ||||
| /// <summary> | /// <summary> | ||||
| /// Allows banning members. | /// Allows banning members. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| BanMembers = 0x00_00_00_04, | BanMembers = 0x00_00_00_04, | ||||
| /// <summary> | /// <summary> | ||||
| /// Allows all permissions and bypasses channel permission overwrites. | /// Allows all permissions and bypasses channel permission overwrites. | ||||
| /// </summary> | /// </summary> | ||||
| Administrator = 0x00_00_00_08, | |||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| Administrator = 0x00_00_00_08, | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows management and editing of channels. | /// Allows management and editing of channels. | ||||
| /// </summary> | /// </summary> | ||||
| ManageChannels = 0x00_00_00_10, | |||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageChannels = 0x00_00_00_10, | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows management and editing of the guild. | /// Allows management and editing of the guild. | ||||
| /// </summary> | /// </summary> | ||||
| ManageGuild = 0x00_00_00_20, | |||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageGuild = 0x00_00_00_20, | |||||
| // Text | // Text | ||||
| /// <summary> | /// <summary> | ||||
| @@ -52,7 +72,11 @@ namespace Discord | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows for deletion of other users messages. | /// Allows for deletion of other users messages. | ||||
| /// </summary> | /// </summary> | ||||
| ManageMessages = 0x00_00_20_00, | |||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageMessages = 0x00_00_20_00, | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows links sent by users with this permission will be auto-embedded. | /// Allows links sent by users with this permission will be auto-embedded. | ||||
| /// </summary> | /// </summary> | ||||
| @@ -115,14 +139,26 @@ namespace Discord | |||||
| /// <summary> | /// <summary> | ||||
| /// Allows management and editing of roles. | /// Allows management and editing of roles. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageRoles = 0x10_00_00_00, | ManageRoles = 0x10_00_00_00, | ||||
| /// <summary> | /// <summary> | ||||
| /// Allows management and editing of webhooks. | /// Allows management and editing of webhooks. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageWebhooks = 0x20_00_00_00, | ManageWebhooks = 0x20_00_00_00, | ||||
| /// <summary> | /// <summary> | ||||
| /// Allows management and editing of emojis. | /// Allows management and editing of emojis. | ||||
| /// </summary> | /// </summary> | ||||
| /// <remarks> | |||||
| /// This permission requires the owner account to use two-factor | |||||
| /// authentication when used on a guild that has server-wide 2FA enabled. | |||||
| /// </remarks> | |||||
| ManageEmojis = 0x40_00_00_00 | ManageEmojis = 0x40_00_00_00 | ||||
| } | } | ||||
| } | } | ||||
| @@ -251,8 +251,19 @@ namespace Discord | |||||
| readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, moveMembers, | readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, moveMembers, | ||||
| useVoiceActivation, prioritySpeaker, changeNickname, manageNicknames, manageRoles, manageWebhooks, manageEmojis); | useVoiceActivation, prioritySpeaker, changeNickname, manageNicknames, manageRoles, manageWebhooks, manageEmojis); | ||||
| /// <summary> | |||||
| /// Returns a value that indicates if a specific <see cref="GuildPermission"/> is enabled | |||||
| /// in these permissions. | |||||
| /// </summary> | |||||
| /// <param name="permission">The permission value to check for.</param> | |||||
| /// <returns><c>true</c> if the permission is enabled, <c>false</c> otherwise.</returns> | |||||
| public bool Has(GuildPermission permission) => Permissions.GetValue(RawValue, permission); | public bool Has(GuildPermission permission) => Permissions.GetValue(RawValue, permission); | ||||
| /// <summary> | |||||
| /// Returns a <see cref="List{T}"/> containing all of the <see cref="GuildPermission"/> | |||||
| /// flags that are enabled. | |||||
| /// </summary> | |||||
| /// <returns>A <see cref="List{T}"/> containing <see cref="GuildPermission"/> flags. Empty if none are enabled.</returns> | |||||
| public List<GuildPermission> ToList() | public List<GuildPermission> ToList() | ||||
| { | { | ||||
| var perms = new List<GuildPermission>(); | var perms = new List<GuildPermission>(); | ||||
| @@ -193,6 +193,10 @@ namespace Discord | |||||
| embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | ||||
| moveMembers, useVoiceActivation, manageRoles, manageWebhooks); | moveMembers, useVoiceActivation, manageRoles, manageWebhooks); | ||||
| /// <summary> | |||||
| /// Creates a <see cref="List{T}"/> of all the <see cref="ChannelPermission"/> values that are allowed. | |||||
| /// </summary> | |||||
| /// <returns>A <see cref="List{T}"/> of all allowed <see cref="ChannelPermission"/> flags. If none, the list will be empty.</returns> | |||||
| public List<ChannelPermission> ToAllowList() | public List<ChannelPermission> ToAllowList() | ||||
| { | { | ||||
| var perms = new List<ChannelPermission>(); | var perms = new List<ChannelPermission>(); | ||||
| @@ -205,6 +209,11 @@ namespace Discord | |||||
| } | } | ||||
| return perms; | return perms; | ||||
| } | } | ||||
| /// <summary> | |||||
| /// Creates a <see cref="List{T}"/> of all the <see cref="ChannelPermission"/> values that are denied. | |||||
| /// </summary> | |||||
| /// <returns>A <see cref="List{T}"/> of all denied <see cref="ChannelPermission"/> flags. If none, the list will be empty.</returns> | |||||
| public List<ChannelPermission> ToDenyList() | public List<ChannelPermission> ToDenyList() | ||||
| { | { | ||||
| var perms = new List<ChannelPermission>(); | var perms = new List<ChannelPermission>(); | ||||
| @@ -75,6 +75,10 @@ namespace Discord | |||||
| public static readonly Color DarkerGrey = new Color(0x546E7A); | public static readonly Color DarkerGrey = new Color(0x546E7A); | ||||
| /// <summary> Gets the encoded value for this color. </summary> | /// <summary> Gets the encoded value for this color. </summary> | ||||
| /// <remarks> | |||||
| /// This value is encoded as an unsigned integer value. The most-significant 8 bits contain the red value, | |||||
| /// the middle 8 bits contain the green value, and the least-significant 8 bits contain the blue value. | |||||
| /// </remarks> | |||||
| public uint RawValue { get; } | public uint RawValue { get; } | ||||
| /// <summary> Gets the red component for this color. </summary> | /// <summary> Gets the red component for this color. </summary> | ||||
| @@ -1,14 +1,27 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Collections.Generic; | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| public interface IConnection | public interface IConnection | ||||
| { | { | ||||
| /// <summary> Gets the ID of the connection account. </summary> | |||||
| /// <returns> A <see cref="string"/> representing the unique identifier value of this connection. </returns> | |||||
| string Id { get; } | string Id { get; } | ||||
| /// <summary> Gets the service of the connection (twitch, youtube). </summary> | |||||
| /// <returns> A string containing the name of this type of connection. </returns> | |||||
| string Type { get; } | string Type { get; } | ||||
| /// <summary> Gets the username of the connection account. </summary> | |||||
| /// <returns> A string containing the name of this connection. </returns> | |||||
| string Name { get; } | string Name { get; } | ||||
| /// <summary> Gets whether the connection is revoked. </summary> | |||||
| /// <returns> A value which if true indicates that this connection has been revoked, otherwise false. </returns> | |||||
| bool IsRevoked { get; } | bool IsRevoked { get; } | ||||
| /// <summary> Gets a <see cref="IReadOnlyCollection{T}"/> of integration IDs. </summary> | |||||
| /// <returns> | |||||
| /// An <see cref="IReadOnlyCollection{T}"/> containing <see cref="ulong"/> | |||||
| /// representations of unique identifier values of integrations. | |||||
| /// </returns> | |||||
| IReadOnlyCollection<ulong> IntegrationIds { get; } | IReadOnlyCollection<ulong> IntegrationIds { get; } | ||||
| } | } | ||||
| } | } | ||||