@@ -15,7 +15,7 @@ namespace Discord.Commands | |||
/// </summary> | |||
/// <remarks> | |||
/// <see cref="Preconditions" /> of the same group require only one of the preconditions to pass in order to | |||
/// be successful (A || B). Specifying <see cref="Group" /> = <see langword="null" /> or not at all will | |||
/// be successful (A || B). Specifying <see cref="Group" /> = <c>null</c> or not at all will | |||
/// require *all* preconditions to pass, just like normal (A && B). | |||
/// </remarks> | |||
public string Group { get; set; } = null; | |||
@@ -129,7 +129,7 @@ namespace Discord.Commands | |||
/// <typeparam name="T">The type of module.</typeparam> | |||
/// <param name="services"> | |||
/// The <see cref="IServiceProvider" /> for your dependency injection solution, if using one - otherwise, pass | |||
/// <see langword="null" />. | |||
/// <c>null</c>. | |||
/// </param> | |||
/// <returns> | |||
/// A built module. | |||
@@ -144,7 +144,7 @@ namespace Discord.Commands | |||
/// <param name="type">The type of module.</param> | |||
/// <param name="services"> | |||
/// The <see cref="IServiceProvider" /> for your dependency injection solution, if using one - otherwise, pass | |||
/// <see langword="null" />. | |||
/// <c>null</c>. | |||
/// </param> | |||
/// <returns> | |||
/// A built module. | |||
@@ -183,7 +183,7 @@ namespace Discord.Commands | |||
/// <param name="assembly">The <see cref="Assembly" /> containing command modules.</param> | |||
/// <param name="services"> | |||
/// An <see cref="IServiceProvider" /> for your dependency injection solution, if using one - otherwise, pass | |||
/// <see langword="null" />. | |||
/// <c>null</c>. | |||
/// </param> | |||
/// <returns> | |||
/// A collection of built modules. | |||
@@ -8,7 +8,7 @@ namespace Discord.Commands | |||
/// <summary> | |||
/// Initializes a new <see cref="RuntimeResult" /> class with the type of error and reason. | |||
/// </summary> | |||
/// <param name="error">The type of failure, or <see langword="null" /> if none.</param> | |||
/// <param name="error">The type of failure, or <c>null</c> if none.</param> | |||
/// <param name="reason">The reason of failure.</param> | |||
protected RuntimeResult(CommandError? error, string reason) | |||
{ | |||
@@ -63,10 +63,10 @@ namespace Discord | |||
/// The max amount of times this invite may be used. Set to <c>null</c> to have unlimited uses. | |||
/// </param> | |||
/// <param name="isTemporary"> | |||
/// If <see langword="true"/>, a user accepting this invite will be kicked from the guild after closing their client. | |||
/// If <c>true</c>, a user accepting this invite will be kicked from the guild after closing their client. | |||
/// </param> | |||
/// <param name="isUnique"> | |||
/// If <see langword="true"/>, don't try to reuse a similar invite (useful for creating many unique one time use invites). | |||
/// If <c>true</c>, don't try to reuse a similar invite (useful for creating many unique one time use invites). | |||
/// </param> | |||
/// <param name="options"> | |||
/// The options to be used when sending the request. | |||
@@ -14,7 +14,7 @@ namespace Discord | |||
/// Determines whether the channel is NSFW. | |||
/// </summary> | |||
/// <returns> | |||
/// <see langword="true"/> if the channel has the NSFW flag enabled; otherwise, <see langword="false"/>. | |||
/// <c>true</c> if the channel has the NSFW flag enabled; otherwise, <c>false</c>. | |||
/// </returns> | |||
bool IsNsfw { get; } | |||
@@ -23,7 +23,7 @@ namespace Discord | |||
/// Determines if this guild is embeddable (i.e. can use widget). | |||
/// </summary> | |||
/// <returns> | |||
/// <see langword="true"/> if this guild can be embedded via widgets; otherwise <see langword="false"/>. | |||
/// <c>true</c> if this guild can be embedded via widgets; otherwise <c>false</c>. | |||
/// </returns> | |||
bool IsEmbeddable { get; } | |||
/// <summary> | |||
@@ -59,7 +59,7 @@ namespace Discord | |||
/// Determines if this guild is currently connected and ready to be used. | |||
/// </summary> | |||
/// <returns> | |||
/// Returns <see langword="true"/> if this guild is currently connected and ready to be used. Only applies | |||
/// Returns <c>true</c> if this guild is currently connected and ready to be used. Only applies | |||
/// to the WebSocket client. | |||
/// </returns> | |||
bool Available { get; } | |||
@@ -260,7 +260,7 @@ namespace Discord | |||
/// </returns> | |||
Task<IReadOnlyCollection<ITextChannel>> GetTextChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | |||
/// <summary> | |||
/// Gets a text channel in this guild with the provided ID, or <see langword="null" /> if not found. | |||
/// Gets a text channel in this guild with the provided ID, or <c>null</c> if not found. | |||
/// </summary> | |||
/// <param name="id">The text channel ID.</param> | |||
/// <param name="mode"> | |||
@@ -328,7 +328,7 @@ namespace Discord | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <returns> | |||
/// An awaitable <see cref="Task"/> containing the system channel within this guild, or | |||
/// <see langword="null" /> if none is set. | |||
/// <c>null</c> if none is set. | |||
/// </returns> | |||
Task<ITextChannel> GetSystemChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | |||
/// <summary> | |||
@@ -459,25 +459,29 @@ namespace Discord | |||
/// </returns> | |||
Task DownloadUsersAsync(); | |||
/// <summary> | |||
/// Removes all users from this guild if they have not logged on in a provided number of | |||
/// <paramref name="days" /> or, if <paramref name="simulate" /> is <see langword="true"/>, returns the | |||
/// number of users that would be removed. | |||
/// Prunes inactive users. | |||
/// </summary> | |||
/// <remarks> | |||
/// This method removes all users that have not logged on in the provided number of days or, if | |||
/// <paramref name="simulate"/> is <c>true</c>, returns the number of users that would be removed. | |||
/// </remarks> | |||
/// <param name="days">The number of days required for the users to be kicked.</param> | |||
/// <param name="simulate">Whether this prune action is a simulation.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <returns> | |||
/// An awaitable <see cref="Task"/> containing the number of users to be or has been removed from this guild. | |||
/// An awaitable <see cref="Task" /> containing the number of users to be or has been removed from this | |||
/// guild. | |||
/// </returns> | |||
Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null); | |||
/// <summary> | |||
/// Gets the webhook in this guild with the provided ID, or <c>null</c> if not found. | |||
/// Gets a webhook found within this guild. | |||
/// </summary> | |||
/// <param name="id">The webhook ID.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <returns> | |||
/// An awaitable <see cref="Task"/> containing the webhook with the specified ID, otherwise <c>null</c>. | |||
/// An awaitable <see cref="Task"/> containing the webhook with the specified ID; <c>null</c> if none is | |||
/// found. | |||
/// </returns> | |||
Task<IWebhook> GetWebhookAsync(ulong id, RequestOptions options = null); | |||
/// <summary> | |||
@@ -11,7 +11,7 @@ namespace Discord | |||
/// </summary> | |||
string IconUrl { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if the current user owns this guild. | |||
/// Returns <c>true</c> if the current user owns this guild. | |||
/// </summary> | |||
bool IsOwner { get; } | |||
/// <summary> | |||
@@ -14,19 +14,19 @@ namespace Discord | |||
/// </summary> | |||
string Name { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this voice region is exclusive to VIP accounts. | |||
/// Returns <c>true</c> if this voice region is exclusive to VIP accounts. | |||
/// </summary> | |||
bool IsVip { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this voice region is the closest to your machine. | |||
/// Returns <c>true</c> if this voice region is the closest to your machine. | |||
/// </summary> | |||
bool IsOptimal { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this is a deprecated voice region (avoid switching to these). | |||
/// Returns <c>true</c> if this is a deprecated voice region (avoid switching to these). | |||
/// </summary> | |||
bool IsDeprecated { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this is a custom voice region (used for events/etc). | |||
/// Returns <c>true</c> if this is a custom voice region (used for events/etc). | |||
/// </summary> | |||
bool IsCustom { get; } | |||
} | |||
@@ -35,7 +35,7 @@ namespace Discord | |||
/// <paramref name="path" /> is a zero-length string, contains only white space, or contains one or more invalid | |||
/// characters as defined by <see cref="Path.GetInvalidPathChars" />. | |||
/// </exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="path" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="path" /> is <c>null</c>.</exception> | |||
/// <exception cref="PathTooLongException"> | |||
/// The specified path, file name, or both exceed the system-defined maximum length. For example, on | |||
/// Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 | |||
@@ -10,11 +10,11 @@ namespace Discord | |||
/// </summary> | |||
IUser Inviter { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this invite was revoked. | |||
/// Returns <c>true</c> if this invite was revoked. | |||
/// </summary> | |||
bool IsRevoked { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if users accepting this invite will be removed from the guild when they | |||
/// Returns <c>true</c> if users accepting this invite will be removed from the guild when they | |||
/// log off. | |||
/// </summary> | |||
bool IsTemporary { get; } | |||
@@ -125,28 +125,28 @@ namespace Discord | |||
/// Gets or sets the timestamp of an <see cref="Embed" />. | |||
/// </summary> | |||
/// <returns> | |||
/// The timestamp of the embed, or <see langword="null" /> if none is set. | |||
/// The timestamp of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
public DateTimeOffset? Timestamp { get; set; } | |||
/// <summary> | |||
/// Gets or sets the sidebar color of an <see cref="Embed" />. | |||
/// </summary> | |||
/// <returns> | |||
/// The color of the embed, or <see langword="null" /> if none is set. | |||
/// The color of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
public Color? Color { get; set; } | |||
/// <summary> | |||
/// Gets or sets the <see cref="EmbedAuthorBuilder" /> of an <see cref="Embed" />. | |||
/// </summary> | |||
/// <returns> | |||
/// The author field builder of the embed, or <see langword="null" /> if none is set. | |||
/// The author field builder of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
public EmbedAuthorBuilder Author { get; set; } | |||
/// <summary> | |||
/// Gets or sets the <see cref="EmbedFooterBuilder" /> of an <see cref="Embed" />. | |||
/// </summary> | |||
/// <returns> | |||
/// The footer field builder of the embed, or <see langword="null" /> if none is set. | |||
/// The footer field builder of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
public EmbedFooterBuilder Footer { get; set; } | |||
@@ -452,7 +452,7 @@ namespace Discord | |||
/// Gets or sets the field name. | |||
/// </summary> | |||
/// <exception cref="ArgumentException"> | |||
/// <para>Field name is <see langword="null" />, empty or entirely whitespace.</para> | |||
/// <para>Field name is <c>null</c>, empty or entirely whitespace.</para> | |||
/// <para><c>- or -</c></para> | |||
/// <para>Field name length exceeds <see cref="MaxFieldNameLength"/>.</para> | |||
/// </exception> | |||
@@ -474,7 +474,7 @@ namespace Discord | |||
/// Gets or sets the field value. | |||
/// </summary> | |||
/// <exception cref="ArgumentException" accessor="set"> | |||
/// <para>Field value is <see langword="null" />, empty or entirely whitespace.</para> | |||
/// <para>Field value is <c>null</c>, empty or entirely whitespace.</para> | |||
/// <para><c>- or -</c></para> | |||
/// <para>Field value length exceeds <see cref="MaxFieldValueLength"/>.</para> | |||
/// </exception> | |||
@@ -540,7 +540,7 @@ namespace Discord | |||
/// The current builder. | |||
/// </returns> | |||
/// <exception cref="ArgumentException"> | |||
/// <para><see cref="Name"/> or <see cref="Value"/> is <see langword="null" />, empty or entirely whitespace.</para> | |||
/// <para><see cref="Name"/> or <see cref="Value"/> is <c>null</c>, empty or entirely whitespace.</para> | |||
/// <para><c>- or -</c></para> | |||
/// <para><see cref="Name"/> or <see cref="Value"/> exceeds the maximum length allowed by Discord.</para> | |||
/// </exception> | |||
@@ -41,56 +41,56 @@ namespace Discord | |||
/// </summary> | |||
/// <returns> | |||
/// A <see cref="DateTimeOffset"/> based on the timestamp present at the bottom left of the embed, or | |||
/// <see langword="null" /> if none is set. | |||
/// <c>null</c> if none is set. | |||
/// </returns> | |||
DateTimeOffset? Timestamp { get; } | |||
/// <summary> | |||
/// Gets the color of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The color of the embed present on the side of the embed, or <see langword="null" /> if none is set. | |||
/// The color of the embed present on the side of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
Color? Color { get; } | |||
/// <summary> | |||
/// Gets the image of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The image of the embed, or <see langword="null" /> if none is set. | |||
/// The image of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedImage? Image { get; } | |||
/// <summary> | |||
/// Gets the video of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The video of the embed, or <see langword="null" /> if none is set. | |||
/// The video of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedVideo? Video { get; } | |||
/// <summary> | |||
/// Gets the author field of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The author field of the embed, or <see langword="null" /> if none is set. | |||
/// The author field of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedAuthor? Author { get; } | |||
/// <summary> | |||
/// Gets the footer field of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The author field of the embed, or <see langword="null" /> if none is set. | |||
/// The author field of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedFooter? Footer { get; } | |||
/// <summary> | |||
/// Gets the provider of this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The source of the embed, or <see langword="null" /> if none is set. | |||
/// The source of the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedProvider? Provider { get; } | |||
/// <summary> | |||
/// Gets the thumbnail featured in this embed. | |||
/// </summary> | |||
/// <returns> | |||
/// The thumbnail featured in the embed, or <see langword="null" /> if none is set. | |||
/// The thumbnail featured in the embed, or <c>null</c> if none is set. | |||
/// </returns> | |||
EmbedThumbnail? Thumbnail { get; } | |||
/// <summary> | |||
@@ -17,11 +17,11 @@ namespace Discord | |||
/// </summary> | |||
MessageSource Source { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this message was sent as a text-to-speech message. | |||
/// Returns <c>true</c> if this message was sent as a text-to-speech message. | |||
/// </summary> | |||
bool IsTTS { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this message was added to its channel's pinned messages. | |||
/// Returns <c>true</c> if this message was added to its channel's pinned messages. | |||
/// </summary> | |||
bool IsPinned { get; } | |||
/// <summary> | |||
@@ -11,7 +11,7 @@ namespace Discord | |||
public int ReactionCount { get; internal set; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if the current user has used this reaction. | |||
/// Returns <c>true</c> if the current user has used this reaction. | |||
/// </summary> | |||
public bool IsMe { get; internal set; } | |||
} | |||
@@ -37,52 +37,52 @@ namespace Discord | |||
/// <summary> Gets a packed value representing all the permissions in this <see cref="ChannelPermissions"/>. </summary> | |||
public ulong RawValue { get; } | |||
/// <summary> If <see langword="true"/>, a user may create invites. </summary> | |||
/// <summary> If <c>true</c>, a user may create invites. </summary> | |||
public bool CreateInstantInvite => Permissions.GetValue(RawValue, ChannelPermission.CreateInstantInvite); | |||
/// <summary> If <see langword="true"/>, a user may create, delete and modify this channel. </summary> | |||
/// <summary> If <c>true</c>, a user may create, delete and modify this channel. </summary> | |||
public bool ManageChannel => Permissions.GetValue(RawValue, ChannelPermission.ManageChannels); | |||
/// <summary> If <see langword="true"/>, a user may add reactions. </summary> | |||
/// <summary> If <c>true</c>, a user may add reactions. </summary> | |||
public bool AddReactions => Permissions.GetValue(RawValue, ChannelPermission.AddReactions); | |||
/// <summary> If <see langword="true"/>, a user may join channels. </summary> | |||
/// <summary> If <c>true</c>, a user may join channels. </summary> | |||
[Obsolete("Use ViewChannel instead.")] | |||
public bool ReadMessages => ViewChannel; | |||
/// <summary> If <see langword="true"/>, a user may view channels. </summary> | |||
/// <summary> If <c>true</c>, a user may view channels. </summary> | |||
public bool ViewChannel => Permissions.GetValue(RawValue, ChannelPermission.ViewChannel); | |||
/// <summary> If <see langword="true"/>, a user may send messages. </summary> | |||
/// <summary> If <c>true</c>, a user may send messages. </summary> | |||
public bool SendMessages => Permissions.GetValue(RawValue, ChannelPermission.SendMessages); | |||
/// <summary> If <see langword="true"/>, a user may send text-to-speech messages. </summary> | |||
/// <summary> If <c>true</c>, a user may send text-to-speech messages. </summary> | |||
public bool SendTTSMessages => Permissions.GetValue(RawValue, ChannelPermission.SendTTSMessages); | |||
/// <summary> If <see langword="true"/>, a user may delete messages. </summary> | |||
/// <summary> If <c>true</c>, a user may delete messages. </summary> | |||
public bool ManageMessages => Permissions.GetValue(RawValue, ChannelPermission.ManageMessages); | |||
/// <summary> If <see langword="true"/>, Discord will auto-embed links sent by this user. </summary> | |||
/// <summary> If <c>true</c>, Discord will auto-embed links sent by this user. </summary> | |||
public bool EmbedLinks => Permissions.GetValue(RawValue, ChannelPermission.EmbedLinks); | |||
/// <summary> If <see langword="true"/>, a user may send files. </summary> | |||
/// <summary> If <c>true</c>, a user may send files. </summary> | |||
public bool AttachFiles => Permissions.GetValue(RawValue, ChannelPermission.AttachFiles); | |||
/// <summary> If <see langword="true"/>, a user may read previous messages. </summary> | |||
/// <summary> If <c>true</c>, a user may read previous messages. </summary> | |||
public bool ReadMessageHistory => Permissions.GetValue(RawValue, ChannelPermission.ReadMessageHistory); | |||
/// <summary> If <see langword="true"/>, a user may mention @everyone. </summary> | |||
/// <summary> If <c>true</c>, a user may mention @everyone. </summary> | |||
public bool MentionEveryone => Permissions.GetValue(RawValue, ChannelPermission.MentionEveryone); | |||
/// <summary> If <see langword="true"/>, a user may use custom emoji from other guilds. </summary> | |||
/// <summary> If <c>true</c>, a user may use custom emoji from other guilds. </summary> | |||
public bool UseExternalEmojis => Permissions.GetValue(RawValue, ChannelPermission.UseExternalEmojis); | |||
/// <summary> If <see langword="true"/>, a user may connect to a voice channel. </summary> | |||
/// <summary> If <c>true</c>, a user may connect to a voice channel. </summary> | |||
public bool Connect => Permissions.GetValue(RawValue, ChannelPermission.Connect); | |||
/// <summary> If <see langword="true"/>, a user may speak in a voice channel. </summary> | |||
/// <summary> If <c>true</c>, a user may speak in a voice channel. </summary> | |||
public bool Speak => Permissions.GetValue(RawValue, ChannelPermission.Speak); | |||
/// <summary> If <see langword="true"/>, a user may mute users. </summary> | |||
/// <summary> If <c>true</c>, a user may mute users. </summary> | |||
public bool MuteMembers => Permissions.GetValue(RawValue, ChannelPermission.MuteMembers); | |||
/// <summary> If <see langword="true"/>, a user may deafen users. </summary> | |||
/// <summary> If <c>true</c>, a user may deafen users. </summary> | |||
public bool DeafenMembers => Permissions.GetValue(RawValue, ChannelPermission.DeafenMembers); | |||
/// <summary> If <see langword="true"/>, a user may move other users between voice channels. </summary> | |||
/// <summary> If <c>true</c>, a user may move other users between voice channels. </summary> | |||
public bool MoveMembers => Permissions.GetValue(RawValue, ChannelPermission.MoveMembers); | |||
/// <summary> If <see langword="true"/>, a user may use voice-activity-detection rather than push-to-talk. </summary> | |||
/// <summary> If <c>true</c>, a user may use voice-activity-detection rather than push-to-talk. </summary> | |||
public bool UseVAD => Permissions.GetValue(RawValue, ChannelPermission.UseVAD); | |||
/// <summary> If <see langword="true"/>, a user may adjust role permissions. This also implictly grants all other permissions. </summary> | |||
/// <summary> If <c>true</c>, a user may adjust role permissions. This also implictly grants all other permissions. </summary> | |||
public bool ManageRoles => Permissions.GetValue(RawValue, ChannelPermission.ManageRoles); | |||
/// <summary> If <see langword="true"/>, a user may edit the webhooks for this channel. </summary> | |||
/// <summary> If <c>true</c>, a user may edit the webhooks for this channel. </summary> | |||
public bool ManageWebhooks => Permissions.GetValue(RawValue, ChannelPermission.ManageWebhooks); | |||
/// <summary> Creates a new <see cref="ChannelPermissions"/> with the provided packed value. </summary> | |||
@@ -16,65 +16,65 @@ namespace Discord | |||
/// <summary> Gets a packed value representing all the permissions in this <see cref="GuildPermissions"/>. </summary> | |||
public ulong RawValue { get; } | |||
/// <summary> If <see langword="true"/>, a user may create invites. </summary> | |||
/// <summary> If <c>true</c>, a user may create invites. </summary> | |||
public bool CreateInstantInvite => Permissions.GetValue(RawValue, GuildPermission.CreateInstantInvite); | |||
/// <summary> If <see langword="true"/>, a user may ban users from the guild. </summary> | |||
/// <summary> If <c>true</c>, a user may ban users from the guild. </summary> | |||
public bool BanMembers => Permissions.GetValue(RawValue, GuildPermission.BanMembers); | |||
/// <summary> If <see langword="true"/>, a user may kick users from the guild. </summary> | |||
/// <summary> If <c>true</c>, a user may kick users from the guild. </summary> | |||
public bool KickMembers => Permissions.GetValue(RawValue, GuildPermission.KickMembers); | |||
/// <summary> If <see langword="true"/>, a user is granted all permissions, and cannot have them revoked via channel permissions. </summary> | |||
/// <summary> If <c>true</c>, a user is granted all permissions, and cannot have them revoked via channel permissions. </summary> | |||
public bool Administrator => Permissions.GetValue(RawValue, GuildPermission.Administrator); | |||
/// <summary> If <see langword="true"/>, a user may create, delete and modify channels. </summary> | |||
/// <summary> If <c>true</c>, a user may create, delete and modify channels. </summary> | |||
public bool ManageChannels => Permissions.GetValue(RawValue, GuildPermission.ManageChannels); | |||
/// <summary> If <see langword="true"/>, a user may adjust guild properties. </summary> | |||
/// <summary> If <c>true</c>, a user may adjust guild properties. </summary> | |||
public bool ManageGuild => Permissions.GetValue(RawValue, GuildPermission.ManageGuild); | |||
/// <summary> If <see langword="true"/>, a user may add reactions. </summary> | |||
/// <summary> If <c>true</c>, a user may add reactions. </summary> | |||
public bool AddReactions => Permissions.GetValue(RawValue, GuildPermission.AddReactions); | |||
/// <summary> If <see langword="true"/>, a user may view the audit log. </summary> | |||
/// <summary> If <c>true</c>, a user may view the audit log. </summary> | |||
public bool ViewAuditLog => Permissions.GetValue(RawValue, GuildPermission.ViewAuditLog); | |||
/// <summary> If <see langword="true"/>, a user may join channels. </summary> | |||
/// <summary> If <c>true</c>, a user may join channels. </summary> | |||
public bool ReadMessages => Permissions.GetValue(RawValue, GuildPermission.ReadMessages); | |||
/// <summary> If <see langword="true"/>, a user may send messages. </summary> | |||
/// <summary> If <c>true</c>, a user may send messages. </summary> | |||
public bool SendMessages => Permissions.GetValue(RawValue, GuildPermission.SendMessages); | |||
/// <summary> If <see langword="true"/>, a user may send text-to-speech messages. </summary> | |||
/// <summary> If <c>true</c>, a user may send text-to-speech messages. </summary> | |||
public bool SendTTSMessages => Permissions.GetValue(RawValue, GuildPermission.SendTTSMessages); | |||
/// <summary> If <see langword="true"/>, a user may delete messages. </summary> | |||
/// <summary> If <c>true</c>, a user may delete messages. </summary> | |||
public bool ManageMessages => Permissions.GetValue(RawValue, GuildPermission.ManageMessages); | |||
/// <summary> If <see langword="true"/>, Discord will auto-embed links sent by this user. </summary> | |||
/// <summary> If <c>true</c>, Discord will auto-embed links sent by this user. </summary> | |||
public bool EmbedLinks => Permissions.GetValue(RawValue, GuildPermission.EmbedLinks); | |||
/// <summary> If <see langword="true"/>, a user may send files. </summary> | |||
/// <summary> If <c>true</c>, a user may send files. </summary> | |||
public bool AttachFiles => Permissions.GetValue(RawValue, GuildPermission.AttachFiles); | |||
/// <summary> If <see langword="true"/>, a user may read previous messages. </summary> | |||
/// <summary> If <c>true</c>, a user may read previous messages. </summary> | |||
public bool ReadMessageHistory => Permissions.GetValue(RawValue, GuildPermission.ReadMessageHistory); | |||
/// <summary> If <see langword="true"/>, a user may mention @everyone. </summary> | |||
/// <summary> If <c>true</c>, a user may mention @everyone. </summary> | |||
public bool MentionEveryone => Permissions.GetValue(RawValue, GuildPermission.MentionEveryone); | |||
/// <summary> If <see langword="true"/>, a user may use custom emoji from other guilds. </summary> | |||
/// <summary> If <c>true</c>, a user may use custom emoji from other guilds. </summary> | |||
public bool UseExternalEmojis => Permissions.GetValue(RawValue, GuildPermission.UseExternalEmojis); | |||
/// <summary> If <see langword="true"/>, a user may connect to a voice channel. </summary> | |||
/// <summary> If <c>true</c>, a user may connect to a voice channel. </summary> | |||
public bool Connect => Permissions.GetValue(RawValue, GuildPermission.Connect); | |||
/// <summary> If <see langword="true"/>, a user may speak in a voice channel. </summary> | |||
/// <summary> If <c>true</c>, a user may speak in a voice channel. </summary> | |||
public bool Speak => Permissions.GetValue(RawValue, GuildPermission.Speak); | |||
/// <summary> If <see langword="true"/>, a user may mute users. </summary> | |||
/// <summary> If <c>true</c>, a user may mute users. </summary> | |||
public bool MuteMembers => Permissions.GetValue(RawValue, GuildPermission.MuteMembers); | |||
/// <summary> If <see langword="true"/>, a user may deafen users. </summary> | |||
/// <summary> If <c>true</c>, a user may deafen users. </summary> | |||
public bool DeafenMembers => Permissions.GetValue(RawValue, GuildPermission.DeafenMembers); | |||
/// <summary> If <see langword="true"/>, a user may move other users between voice channels. </summary> | |||
/// <summary> If <c>true</c>, a user may move other users between voice channels. </summary> | |||
public bool MoveMembers => Permissions.GetValue(RawValue, GuildPermission.MoveMembers); | |||
/// <summary> If <see langword="true"/>, a user may use voice-activity-detection rather than push-to-talk. </summary> | |||
/// <summary> If <c>true</c>, a user may use voice-activity-detection rather than push-to-talk. </summary> | |||
public bool UseVAD => Permissions.GetValue(RawValue, GuildPermission.UseVAD); | |||
/// <summary> If <see langword="true"/>, a user may change their own nickname. </summary> | |||
/// <summary> If <c>true</c>, a user may change their own nickname. </summary> | |||
public bool ChangeNickname => Permissions.GetValue(RawValue, GuildPermission.ChangeNickname); | |||
/// <summary> If <see langword="true"/>, a user may change the nickname of other users. </summary> | |||
/// <summary> If <c>true</c>, a user may change the nickname of other users. </summary> | |||
public bool ManageNicknames => Permissions.GetValue(RawValue, GuildPermission.ManageNicknames); | |||
/// <summary> If <see langword="true"/>, a user may adjust roles. </summary> | |||
/// <summary> If <c>true</c>, a user may adjust roles. </summary> | |||
public bool ManageRoles => Permissions.GetValue(RawValue, GuildPermission.ManageRoles); | |||
/// <summary> If <see langword="true"/>, a user may edit the webhooks for this guild. </summary> | |||
/// <summary> If <c>true</c>, a user may edit the webhooks for this guild. </summary> | |||
public bool ManageWebhooks => Permissions.GetValue(RawValue, GuildPermission.ManageWebhooks); | |||
/// <summary> If <see langword="true"/>, a user may edit the emojis for this guild. </summary> | |||
/// <summary> If <c>true</c>, a user may edit the emojis for this guild. </summary> | |||
public bool ManageEmojis => Permissions.GetValue(RawValue, GuildPermission.ManageEmojis); | |||
/// <summary> Creates a new <see cref="GuildPermissions"/> with the provided packed value. </summary> | |||
@@ -21,24 +21,24 @@ namespace Discord | |||
/// Determines whether the role can be separated in the user list. | |||
/// </summary> | |||
/// <returns> | |||
/// Returns <see langword="true"/> if users of this role are separated in the user list; otherwise, returns | |||
/// <see langword="false"/>. | |||
/// Returns <c>true</c> if users of this role are separated in the user list; otherwise, returns | |||
/// <c>false</c>. | |||
/// </returns> | |||
bool IsHoisted { get; } | |||
/// <summary> | |||
/// Determines whether the role is managed by Discord. | |||
/// </summary> | |||
/// <returns> | |||
/// Returns <see langword="true"/> if this role is automatically managed by Discord; otherwise, returns | |||
/// <see langword="false"/>. | |||
/// Returns <c>true</c> if this role is automatically managed by Discord; otherwise, returns | |||
/// <c>false</c>. | |||
/// </returns> | |||
bool IsManaged { get; } | |||
/// <summary> | |||
/// Determines whether the role is mentionable. | |||
/// </summary> | |||
/// <returns> | |||
/// Returns <see langword="true"/> if this role may be mentioned in messages; otherwise, returns | |||
/// <see langword="false"/>. | |||
/// Returns <c>true</c> if this role may be mentioned in messages; otherwise, returns | |||
/// <c>false</c>. | |||
/// </returns> | |||
bool IsMentionable { get; } | |||
/// <summary> | |||
@@ -12,21 +12,21 @@ namespace Discord | |||
/// Gets or sets whether the user should be muted in a voice channel. | |||
/// </summary> | |||
/// <remarks> | |||
/// If this value is set to <see langword="true"/>, no user will be able to hear this user speak in the guild. | |||
/// If this value is set to <c>true</c>, no user will be able to hear this user speak in the guild. | |||
/// </remarks> | |||
public Optional<bool> Mute { get; set; } | |||
/// <summary> | |||
/// Gets or sets whether the user should be deafened in a voice channel. | |||
/// </summary> | |||
/// <remarks> | |||
/// If this value is set to <see langword="true"/>, this user will not be able to hear anyone speak in the guild. | |||
/// If this value is set to <c>true</c>, this user will not be able to hear anyone speak in the guild. | |||
/// </remarks> | |||
public Optional<bool> Deaf { get; set; } | |||
/// <summary> | |||
/// Gets or sets the user's nickname. | |||
/// </summary> | |||
/// <remarks> | |||
/// To clear the user's nickname, this value can be set to <see langword="null" /> or | |||
/// To clear the user's nickname, this value can be set to <c>null</c> or | |||
/// <see cref="string.Empty" />. | |||
/// </remarks> | |||
public Optional<string> Nickname { get; set; } | |||
@@ -13,11 +13,11 @@ namespace Discord | |||
/// </summary> | |||
string Email { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this user's email has been verified. | |||
/// Returns <c>true</c> if this user's email has been verified. | |||
/// </summary> | |||
bool IsVerified { get; } | |||
/// <summary> | |||
/// Returns <see langword="true"/> if this user has enabled MFA on their account. | |||
/// Returns <c>true</c> if this user has enabled MFA on their account. | |||
/// </summary> | |||
bool IsMfaEnabled { get; } | |||
@@ -35,11 +35,11 @@ namespace Discord | |||
/// </summary> | |||
ushort DiscriminatorValue { get; } | |||
/// <summary> | |||
/// Gets <see langword="true"/> if this user is a bot user. | |||
/// Gets <c>true</c> if this user is a bot user. | |||
/// </summary> | |||
bool IsBot { get; } | |||
/// <summary> | |||
/// Gets <see langword="true"/> if this user is a webhook user. | |||
/// Gets <c>true</c> if this user is a webhook user. | |||
/// </summary> | |||
bool IsWebhook { get; } | |||
/// <summary> | |||
@@ -6,23 +6,23 @@ namespace Discord | |||
public interface IVoiceState | |||
{ | |||
/// <summary> | |||
/// Returns <see langword="true" /> if the guild has deafened this user. | |||
/// Returns <c>true</c> if the guild has deafened this user. | |||
/// </summary> | |||
bool IsDeafened { get; } | |||
/// <summary> | |||
/// Returns <see langword="true" /> if the guild has muted this user. | |||
/// Returns <c>true</c> if the guild has muted this user. | |||
/// </summary> | |||
bool IsMuted { get; } | |||
/// <summary> | |||
/// Returns <see langword="true" /> if this user has marked themselves as deafened. | |||
/// Returns <c>true</c> if this user has marked themselves as deafened. | |||
/// </summary> | |||
bool IsSelfDeafened { get; } | |||
/// <summary> | |||
/// Returns <see langword="true" /> if this user has marked themselves as muted. | |||
/// Returns <c>true</c> if this user has marked themselves as muted. | |||
/// </summary> | |||
bool IsSelfMuted { get; } | |||
/// <summary> | |||
/// Returns <see langword="true" /> if the guild is temporarily blocking audio to/from this user. | |||
/// Returns <c>true</c> if the guild is temporarily blocking audio to/from this user. | |||
/// </summary> | |||
bool IsSuppressed { get; } | |||
/// <summary> | |||
@@ -165,7 +165,7 @@ namespace Discord | |||
InitializeFromCollection(collection); | |||
} | |||
/// <exception cref="ArgumentNullException"> | |||
/// <paramref name="collection" /> or <paramref name="comparer" /> is <see langword="null" /> | |||
/// <paramref name="collection" /> or <paramref name="comparer" /> is <c>null</c> | |||
/// </exception> | |||
public ConcurrentHashSet(int concurrencyLevel, IEnumerable<T> collection, IEqualityComparer<T> comparer) | |||
: this(concurrencyLevel, DefaultCapacity, false, comparer) | |||
@@ -168,7 +168,7 @@ namespace Discord.Rest | |||
/// invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars" />. | |||
/// </exception> | |||
/// <exception cref="ArgumentNullException"> | |||
/// <paramref name="filePath" /> is <see langword="null" />. | |||
/// <paramref name="filePath" /> is <c>null</c>. | |||
/// </exception> | |||
/// <exception cref="PathTooLongException"> | |||
/// The specified path, file name, or both exceed the system-defined maximum length. For example, on | |||
@@ -94,7 +94,7 @@ namespace Discord.Rest | |||
/// invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars" />. | |||
/// </exception> | |||
/// <exception cref="ArgumentNullException"> | |||
/// <paramref name="filePath" /> is <see langword="null" />. | |||
/// <paramref name="filePath" /> is <c>null</c>. | |||
/// </exception> | |||
/// <exception cref="PathTooLongException"> | |||
/// The specified path, file name, or both exceed the system-defined maximum length. For example, on | |||
@@ -148,7 +148,7 @@ namespace Discord.Rest | |||
} | |||
/// <inheritdoc /> | |||
/// <exception cref="ArgumentNullException"><paramref name="args" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="args" /> is <c>null</c>.</exception> | |||
public async Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null) | |||
{ | |||
var arr = args.ToArray(); | |||
@@ -324,7 +324,7 @@ namespace Discord.Rest | |||
public Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null) | |||
=> GuildHelper.CreateEmoteAsync(this, Discord, name, image, roles, options); | |||
/// <inheritdoc /> | |||
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception> | |||
public Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null) | |||
=> GuildHelper.ModifyEmoteAsync(this, Discord, emote.Id, func, options); | |||
/// <inheritdoc /> | |||
@@ -106,7 +106,7 @@ namespace Discord.WebSocket | |||
/// </summary> | |||
/// <param name="id">The channel snowflake ID.</param> | |||
/// <returns> | |||
/// A generic WebSocket-based channel object (voice, text, category, etc.); <see langword="null" /> when the | |||
/// A generic WebSocket-based channel object (voice, text, category, etc.); <c>null</c> when the | |||
/// channel cannot be found. | |||
/// </returns> | |||
public abstract SocketChannel GetChannel(ulong id); | |||
@@ -105,7 +105,7 @@ namespace Discord.WebSocket | |||
.OrderBy(c => c.Position) | |||
.FirstOrDefault(); | |||
/// <summary> | |||
/// Gets the AFK voice channel, or <see langword="null" /> if none is set. | |||
/// Gets the AFK voice channel, or <c>null</c> if none is set. | |||
/// </summary> | |||
public SocketVoiceChannel AFKChannel | |||
{ | |||
@@ -455,7 +455,7 @@ namespace Discord.WebSocket | |||
/// </summary> | |||
/// <param name="name">The name of the new channel.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <c>null</c>.</exception> | |||
/// <returns> | |||
/// The created text channel. | |||
/// </returns> | |||
@@ -467,7 +467,7 @@ namespace Discord.WebSocket | |||
/// </summary> | |||
/// <param name="name">The name of the new channel.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <c>null</c>.</exception> | |||
/// <returns> | |||
/// The created voice channel. | |||
/// </returns> | |||
@@ -479,7 +479,7 @@ namespace Discord.WebSocket | |||
/// </summary> | |||
/// <param name="name">The name of the new channel.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <c>null</c>.</exception> | |||
/// <returns> | |||
/// The created category channel. | |||
/// </returns> | |||
@@ -537,12 +537,12 @@ namespace Discord.WebSocket | |||
/// </summary> | |||
/// <param name="name">The name of the new role.</param> | |||
/// <param name="permissions"> | |||
/// The permissions that the new role possesses. Set to <see langword="null" /> to use the default permissions. | |||
/// The permissions that the new role possesses. Set to <c>null</c> to use the default permissions. | |||
/// </param> | |||
/// <param name="color">The color of the role. Set to <see langword="null" /> to use the default color.</param> | |||
/// <param name="color">The color of the role. Set to <c>null</c> to use the default color.</param> | |||
/// <param name="isHoisted">Used to determine if users of this role are separated in the user list.</param> | |||
/// <param name="options">The options to be used when sending the request.</param> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <see langword="null" />.</exception> | |||
/// <exception cref="ArgumentNullException"><paramref name="name" /> is <c>null</c>.</exception> | |||
/// <returns> | |||
/// The created role. | |||
/// </returns> | |||
@@ -61,7 +61,7 @@ namespace Discord.WebSocket | |||
public IReadOnlyCollection<SocketRole> Roles | |||
=> _roleIds.Select(id => Guild.GetRole(id)).Where(x => x != null).ToReadOnlyCollection(() => _roleIds.Length); | |||
/// <summary> | |||
/// Returns the voice channel the user is in, or <see langword="null" /> if none. | |||
/// Returns the voice channel the user is in, or <c>null</c> if none. | |||
/// </summary> | |||
public SocketVoiceChannel VoiceChannel => VoiceState?.VoiceChannel; | |||
/// <inheritdoc /> | |||