Browse Source

Replace langword null to code block null instead

- Because DocFX sucks at rendering langword
pull/1161/head
Still Hsu 7 years ago
parent
commit
ac47d84ea7
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
29 changed files with 77 additions and 77 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Activities/GameAsset.cs
  2. +5
    -5
      src/Discord.Net.Core/Entities/Channels/IGuildChannel.cs
  3. +2
    -2
      src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs
  4. +2
    -2
      src/Discord.Net.Core/Entities/Channels/ITextChannel.cs
  5. +1
    -1
      src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs
  6. +1
    -1
      src/Discord.Net.Core/Entities/Channels/VoiceChannelProperties.cs
  7. +2
    -2
      src/Discord.Net.Core/Entities/Guilds/GuildEmbedProperties.cs
  8. +19
    -19
      src/Discord.Net.Core/Entities/Guilds/IGuild.cs
  9. +1
    -1
      src/Discord.Net.Core/Entities/Guilds/IUserGuild.cs
  10. +2
    -2
      src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
  11. +1
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
  12. +2
    -2
      src/Discord.Net.Core/Entities/Messages/EmbedVideo.cs
  13. +2
    -2
      src/Discord.Net.Core/Entities/Messages/IAttachment.cs
  14. +1
    -1
      src/Discord.Net.Core/Entities/Messages/IMessage.cs
  15. +1
    -1
      src/Discord.Net.Core/Entities/Users/IVoiceState.cs
  16. +1
    -1
      src/Discord.Net.Core/Net/HttpException.cs
  17. +1
    -1
      src/Discord.Net.Core/RequestOptions.cs
  18. +1
    -1
      src/Discord.Net.Core/Utils/Cacheable.cs
  19. +4
    -4
      src/Discord.Net.Core/Utils/ConcurrentHashSet.cs
  20. +2
    -2
      src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs
  21. +7
    -7
      src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs
  22. +2
    -2
      src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
  23. +6
    -6
      src/Discord.Net.WebSocket/BaseSocketClient.cs
  24. +1
    -1
      src/Discord.Net.WebSocket/DiscordSocketConfig.cs
  25. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
  26. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs
  27. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
  28. +5
    -5
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
  29. +1
    -1
      src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs

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

@@ -19,7 +19,7 @@ namespace Discord
public string ImageId { get; internal set; }

/// <summary>
/// Returns the image URL of the asset, or <see langword="null"/> when the application ID does not exist.
/// Returns the image URL of the asset, or <c>null</c> when the application ID does not exist.
/// </summary>
public string GetImageUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
=> ApplicationId.HasValue ? CDN.GetRichAssetUrl(ApplicationId.Value, ImageId, size, format) : null;


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

@@ -24,7 +24,7 @@ namespace Discord
/// Gets the parent ID (category) of this channel in the guild's channel list.
/// </summary>
/// <returns>
/// The parent category ID associated with this channel, or <see langword="null"/> if none is set.
/// The parent category ID associated with this channel, or <c>null</c> if none is set.
/// </returns>
ulong? CategoryId { get; }
/// <summary>
@@ -57,10 +57,10 @@ namespace Discord
/// Creates a new invite to this channel.
/// </summary>
/// <param name="maxAge">
/// The time (in seconds) until the invite expires. Set to <see langword="null"/> to never expire.
/// The time (in seconds) until the invite expires. Set to <c>null</c> to never expire.
/// </param>
/// <param name="maxUses">
/// The max amount of times this invite may be used. Set to <see langword="null"/> to have unlimited uses.
/// 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.
@@ -86,12 +86,12 @@ namespace Discord
Task ModifyAsync(Action<GuildChannelProperties> func, RequestOptions options = null);

/// <summary>
/// Gets the permission overwrite for a specific role, or <see langword="null"/> if one does not exist.
/// Gets the permission overwrite for a specific role, or <c>null</c> if one does not exist.
/// </summary>
/// <param name="role">The role to get the overwrite from.</param>
OverwritePermissions? GetPermissionOverwrite(IRole role);
/// <summary>
/// Gets the permission overwrite for a specific user, or <see langword="null"/> if one does not exist.
/// Gets the permission overwrite for a specific user, or <c>null</c> if one does not exist.
/// </summary>
/// <param name="user">The user to get the overwrite from.</param>
OverwritePermissions? GetPermissionOverwrite(IUser user);


+ 2
- 2
src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs View File

@@ -60,13 +60,13 @@ namespace Discord
Task<IUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);

/// <summary>
/// Gets a message from this message channel with the given id, or <see langword="null"/> if not found.
/// Gets a message from this message channel with the given id, or <c>null</c> if not found.
/// </summary>
/// <param name="id">The ID of the message.</param>
/// <param name="mode">The <see cref="CacheMode"/> that determines whether the object should be fetched from cache.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// The message gotten from either the cache or the download, or <see langword="null"/> if none is found.
/// The message gotten from either the cache or the download, or <c>null</c> if none is found.
/// </returns>
Task<IMessage> GetMessageAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);



+ 2
- 2
src/Discord.Net.Core/Entities/Channels/ITextChannel.cs View File

@@ -22,7 +22,7 @@ namespace Discord
/// Gets the current topic for this text channel.
/// </summary>
/// <returns>
/// The topic set in the channel, or <see langword="null"/> if none is set.
/// The topic set in the channel, or <c>null</c> if none is set.
/// </returns>
string Topic { get; }

@@ -72,7 +72,7 @@ namespace Discord
/// <param name="id">The ID of the webhook.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// A webhook associated with the <paramref name="id"/>, or <see langword="null"/> if not found.
/// A webhook associated with the <paramref name="id"/>, or <c>null</c> if not found.
/// </returns>
Task<IWebhook> GetWebhookAsync(ulong id, RequestOptions options = null);
/// <summary>


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

@@ -14,7 +14,7 @@ namespace Discord
int Bitrate { get; }
/// <summary>
/// Gets the max amount of users allowed to be connected to this channel at one time, or
/// <see langword="null"/> if none is set.
/// <c>null</c> if none is set.
/// </summary>
int? UserLimit { get; }



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

@@ -10,7 +10,7 @@ namespace Discord
/// </summary>
public Optional<int> Bitrate { get; set; }
/// <summary>
/// Gets or sets the maximum number of users that can be present in a channel, or <see langword="null"/> if none.
/// Gets or sets the maximum number of users that can be present in a channel, or <c>null</c> if none.
/// </summary>
public Optional<int?> UserLimit { get; set; }
}


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

@@ -10,11 +10,11 @@ namespace Discord
/// </summary>
public Optional<bool> Enabled { get; set; }
/// <summary>
/// Sets the channel that the invite should place its users in, if not <see langword="null"/>.
/// Sets the channel that the invite should place its users in, if not <c>null</c>.
/// </summary>
public Optional<IChannel> Channel { get; set; }
/// <summary>
/// Sets the channel the invite should place its users in, if not <see langword="null"/>.
/// Sets the channel the invite should place its users in, if not <c>null</c>.
/// </summary>
public Optional<ulong?> ChannelId { get; set; }
}


+ 19
- 19
src/Discord.Net.Core/Entities/Guilds/IGuild.cs View File

@@ -40,19 +40,19 @@ namespace Discord
/// </summary>
VerificationLevel VerificationLevel { get; }
/// <summary>
/// Returns the ID of this guild's icon, or <see langword="null"/> if none is set.
/// Returns the ID of this guild's icon, or <c>null</c> if none is set.
/// </summary>
string IconId { get; }
/// <summary>
/// Returns the URL of this guild's icon, or <see langword="null"/> if none is set.
/// Returns the URL of this guild's icon, or <c>null</c> if none is set.
/// </summary>
string IconUrl { get; }
/// <summary>
/// Returns the ID of this guild's splash image, or <see langword="null"/> if none is set.
/// Returns the ID of this guild's splash image, or <c>null</c> if none is set.
/// </summary>
string SplashId { get; }
/// <summary>
/// Returns the URL of this guild's splash image, or <see langword="null"/> if none is set.
/// Returns the URL of this guild's splash image, or <c>null</c> if none is set.
/// </summary>
string SplashUrl { get; }
/// <summary>
@@ -65,7 +65,7 @@ namespace Discord
bool Available { get; }

/// <summary>
/// Gets the ID of the AFK voice channel for this guild, or <see langword="null"/> if none is set.
/// Gets the ID of the AFK voice channel for this guild, or <c>null</c> if none is set.
/// </summary>
ulong? AFKChannelId { get; }
/// <summary>
@@ -73,11 +73,11 @@ namespace Discord
/// </summary>
ulong DefaultChannelId { get; }
/// <summary>
/// Gets the ID of the embed channel set in the widget settings of this guild, or <see langword="null"/> if none is set.
/// Gets the ID of the embed channel set in the widget settings of this guild, or <c>null</c> if none is set.
/// </summary>
ulong? EmbedChannelId { get; }
/// <summary>
/// Gets the ID of the channel where randomized welcome messages are sent, or <see langword="null"/> if none is set.
/// Gets the ID of the channel where randomized welcome messages are sent, or <c>null</c> if none is set.
/// </summary>
ulong? SystemChannelId { get; }
/// <summary>
@@ -245,7 +245,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the generic channel with the specified ID, or
/// <see langword="null"/> if none is found.
/// <c>null</c> if none is found.
/// </returns>
Task<IGuildChannel> GetChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -269,7 +269,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the text channel with the specified ID, or
/// <see langword="null"/> if none is found.
/// <c>null</c> if none is found.
/// </returns>
Task<ITextChannel> GetTextChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -304,7 +304,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the voice channel with the specified ID, or
/// <see langword="null"/> if none is found.
/// <c>null</c> if none is found.
/// </returns>
Task<IVoiceChannel> GetVoiceChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -316,7 +316,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the AFK voice channel set within this guild, or
/// <see langword="null"/> if none is set.
/// <c>null</c> if none is set.
/// </returns>
Task<IVoiceChannel> GetAFKChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -340,7 +340,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the first viewable text channel in this guild, or
/// <see langword="null"/> if none is found.
/// <c>null</c> if none is found.
/// </returns>
Task<ITextChannel> GetDefaultChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -352,7 +352,7 @@ namespace Discord
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the embed channel set within the server's widget settings, or
/// <see langword="null"/> if none is set.
/// <c>null</c> if none is set.
/// </returns>
Task<IGuildChannel> GetEmbedChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -392,7 +392,7 @@ namespace Discord
Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null);

/// <summary>
/// Gets the role in this guild with the provided ID, or <see langword="null"/> if not found.
/// Gets the role in this guild with the provided ID, or <c>null</c> if not found.
/// </summary>
/// <param name="id">The role ID.</param>
IRole GetRole(ulong id);
@@ -424,13 +424,13 @@ namespace Discord
/// </remarks>
Task<IReadOnlyCollection<IGuildUser>> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
/// Gets the user in this guild with the provided ID, or <see langword="null"/> if not found.
/// Gets the user in this guild with the provided ID, or <c>null</c> if not found.
/// </summary>
/// <param name="id">The user ID.</param>
/// <param name="mode">The <see cref="CacheMode"/> that determines whether the object should be fetched from cache.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the guild user with the specified ID, otherwise <see langword="null"/>.
/// An awaitable <see cref="Task"/> containing the guild user with the specified ID, otherwise <c>null</c>.
/// </returns>
Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
/// <summary>
@@ -472,12 +472,12 @@ namespace Discord
Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null);

/// <summary>
/// Gets the webhook in this guild with the provided ID, or <see langword="null"/> if not found.
/// Gets the webhook in this guild with the provided ID, or <c>null</c> if not found.
/// </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 <see langword="null"/>.
/// An awaitable <see cref="Task"/> containing the webhook with the specified ID, otherwise <c>null</c>.
/// </returns>
Task<IWebhook> GetWebhookAsync(ulong id, RequestOptions options = null);
/// <summary>
@@ -495,7 +495,7 @@ namespace Discord
/// <param name="id">The guild emote ID.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// An awaitable <see cref="Task"/> containing the emote found with the specified ID, or <see langword="null"/> if not found.
/// An awaitable <see cref="Task"/> containing the emote found with the specified ID, or <c>null</c> if not found.
/// </returns>
Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null);
/// <summary>


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

@@ -7,7 +7,7 @@ namespace Discord
/// </summary>
string Name { get; }
/// <summary>
/// Gets the icon URL associated with this guild, or <see langword="null"/> if one is not set.
/// Gets the icon URL associated with this guild, or <c>null</c> if one is not set.
/// </summary>
string IconUrl { get; }
/// <summary>


+ 2
- 2
src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs View File

@@ -19,11 +19,11 @@ namespace Discord
/// </summary>
bool IsTemporary { get; }
/// <summary>
/// Gets the time (in seconds) until the invite expires, or <see langword="null"/> if it never expires.
/// Gets the time (in seconds) until the invite expires, or <c>null</c> if it never expires.
/// </summary>
int? MaxAge { get; }
/// <summary>
/// Gets the max amount of times this invite may be used, or <see langword="null"/> if there is no limit.
/// Gets the max amount of times this invite may be used, or <c>null</c> if there is no limit.
/// </summary>
int? MaxUses { get; }
/// <summary>


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

@@ -106,7 +106,7 @@ namespace Discord

/// <summary> Gets or sets the list of <see cref="EmbedFieldBuilder"/> of an <see cref="Embed"/>. </summary>
/// <exception cref="ArgumentNullException" accessor="set">An embed builder's fields collection is set to
/// <see langword="null"/>.</exception>
/// <c>null</c>.</exception>
/// <exception cref="ArgumentException" accessor="set">Description length exceeds <see cref="MaxFieldCount"/>.
/// </exception>
/// <returns> The list of existing <see cref="EmbedFieldBuilder"/>.</returns>


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

@@ -13,11 +13,11 @@ namespace Discord
/// </summary>
public string Url { get; }
/// <summary>
/// Gets the height of the video, or <see langword="null"/> if none.
/// Gets the height of the video, or <c>null</c> if none.
/// </summary>
public int? Height { get; }
/// <summary>
/// Gets the weight of the video, or <see langword="null"/> if none.
/// Gets the weight of the video, or <c>null</c> if none.
/// </summary>
public int? Width { get; }



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

@@ -45,14 +45,14 @@ namespace Discord
/// Gets the height of this attachment.
/// </summary>
/// <returns>
/// The height of this attachment if it is a picture; otherwise <see langword="null"/>.
/// The height of this attachment if it is a picture; otherwise <c>null</c>.
/// </returns>
int? Height { get; }
/// <summary>
/// Gets the width of this attachment.
/// </summary>
/// <returns>
/// The width of this attachment if it is a picture; otherwise <see langword="null"/>.
/// The width of this attachment if it is a picture; otherwise <c>null</c>.
/// </returns>
int? Width { get; }
}


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

@@ -39,7 +39,7 @@ namespace Discord
/// Gets the time of this message's last edit.
/// </summary>
/// <returns>
/// Time of when the message was last edited; <see langword="null"/> when the message is never edited.
/// Time of when the message was last edited; <c>null</c> when the message is never edited.
/// </returns>
DateTimeOffset? EditedTimestamp { get; }


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

@@ -26,7 +26,7 @@ namespace Discord
/// </summary>
bool IsSuppressed { get; }
/// <summary>
/// Gets the voice channel this user is currently in, or <see langword="null"/> if none.
/// Gets the voice channel this user is currently in, or <c>null</c> if none.
/// </summary>
IVoiceChannel VoiceChannel { get; }
/// <summary>


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

@@ -23,7 +23,7 @@ namespace Discord.Net
/// <returns>
/// A
/// <see href="https://discordapp.com/developers/docs/topics/opcodes-and-status-codes#json">JSON error code</see>
/// from Discord, or <see langword="null"/> if none.
/// from Discord, or <c>null</c> if none.
/// </returns>
public int? DiscordCode { get; }
/// <summary>


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

@@ -14,7 +14,7 @@ namespace Discord

/// <summary>
/// Gets or set the max time, in milliseconds, to wait for this request to complete. If
/// <see langword="null"/>, a request will not time out. If a rate limit has been triggered for this
/// <c>null</c>, a request will not time out. If a rate limit has been triggered for this
/// request's bucket and will not be unpaused in time, this request will fail immediately.
/// </summary>
public int? Timeout { get; set; }


+ 1
- 1
src/Discord.Net.Core/Utils/Cacheable.cs View File

@@ -25,7 +25,7 @@ namespace Discord
/// </summary>
/// <remarks>
/// This value is not guaranteed to be set; in cases where the entity cannot be pulled from cache, it is
/// <see langword="null"/>.
/// <c>null</c>.
/// </remarks>
public TEntity Value { get; }
private Func<Task<TEntity>> DownloadFunc { get; }


+ 4
- 4
src/Discord.Net.Core/Utils/ConcurrentHashSet.cs View File

@@ -157,7 +157,7 @@ namespace Discord
: this(collection, EqualityComparer<T>.Default) { }
public ConcurrentHashSet(IEqualityComparer<T> comparer)
: this(DefaultConcurrencyLevel, DefaultCapacity, true, comparer) { }
/// <exception cref="ArgumentNullException"><paramref name="collection"/> is <see langword="null"/></exception>
/// <exception cref="ArgumentNullException"><paramref name="collection"/> is <c>null</c></exception>
public ConcurrentHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
: this(comparer)
{
@@ -210,7 +210,7 @@ namespace Discord
if (_budget == 0)
_budget = _tables._buckets.Length / _tables._locks.Length;
}
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <see langword="null"/></exception>
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool ContainsKey(T value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
@@ -234,7 +234,7 @@ namespace Discord
return false;
}

/// <exception cref="ArgumentNullException"><paramref name="value"/> is <see langword="null"/></exception>
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool TryAdd(T value)
{
if (value == null) throw new ArgumentNullException(nameof(value));
@@ -284,7 +284,7 @@ namespace Discord
}
}

/// <exception cref="ArgumentNullException"><paramref name="value"/> is <see langword="null"/></exception>
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool TryRemove(T value)
{
if (value == null) throw new ArgumentNullException(nameof(value));


+ 2
- 2
src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs View File

@@ -59,12 +59,12 @@ namespace Discord.Rest
new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);

/// <summary>
/// Gets a message from this message channel with the given id, or <see langword="null"/> if not found.
/// Gets a message from this message channel with the given id, or <c>null</c> if not found.
/// </summary>
/// <param name="id">The ID of the message.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// The message gotten from either the cache or the download, or <see langword="null"/> if none is found.
/// The message gotten from either the cache or the download, or <c>null</c> if none is found.
/// </returns>
Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null);
/// <summary>


+ 7
- 7
src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs View File

@@ -14,7 +14,7 @@ namespace Discord.Rest
internal static class GuildHelper
{
//General
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
public static async Task<Model> ModifyAsync(IGuild guild, BaseDiscordClient client,
Action<GuildProperties> func, RequestOptions options)
{
@@ -62,7 +62,7 @@ namespace Discord.Rest

return await client.ApiClient.ModifyGuildAsync(guild.Id, apiArgs, options).ConfigureAwait(false);
}
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
public static async Task<EmbedModel> ModifyEmbedAsync(IGuild guild, BaseDiscordClient client,
Action<GuildEmbedProperties> func, RequestOptions options)
{
@@ -140,7 +140,7 @@ namespace Discord.Rest
var models = await client.ApiClient.GetGuildChannelsAsync(guild.Id, options).ConfigureAwait(false);
return models.Select(x => RestGuildChannel.Create(client, guild, x)).ToImmutableArray();
}
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception>
public static async Task<RestTextChannel> CreateTextChannelAsync(IGuild guild, BaseDiscordClient client,
string name, RequestOptions options)
{
@@ -150,7 +150,7 @@ namespace Discord.Rest
var model = await client.ApiClient.CreateGuildChannelAsync(guild.Id, args, options).ConfigureAwait(false);
return RestTextChannel.Create(client, guild, model);
}
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception>
public static async Task<RestVoiceChannel> CreateVoiceChannelAsync(IGuild guild, BaseDiscordClient client,
string name, RequestOptions options)
{
@@ -160,7 +160,7 @@ namespace Discord.Rest
var model = await client.ApiClient.CreateGuildChannelAsync(guild.Id, args, options).ConfigureAwait(false);
return RestVoiceChannel.Create(client, guild, model);
}
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception>
public static async Task<RestCategoryChannel> CreateCategoryChannelAsync(IGuild guild, BaseDiscordClient client,
string name, RequestOptions options)
{
@@ -195,7 +195,7 @@ namespace Discord.Rest
}

//Roles
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c>.</exception>
public static async Task<RestRole> CreateRoleAsync(IGuild guild, BaseDiscordClient client,
string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options)
{
@@ -302,7 +302,7 @@ namespace Discord.Rest
var emote = await client.ApiClient.CreateGuildEmoteAsync(guild.Id, apiargs, options).ConfigureAwait(false);
return emote.ToEntity();
}
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
public static async Task<GuildEmote> ModifyEmoteAsync(IGuild guild, BaseDiscordClient client, ulong id, Action<EmoteProperties> func,
RequestOptions options)
{


+ 2
- 2
src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs View File

@@ -132,7 +132,7 @@ namespace Discord.Rest
=> GuildHelper.DeleteAsync(this, Discord, 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 async Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null)
{
var model = await GuildHelper.ModifyAsync(this, Discord, func, options).ConfigureAwait(false);
@@ -140,7 +140,7 @@ namespace Discord.Rest
}

/// <inheritdoc />
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <c>null</c>.</exception>
public async Task ModifyEmbedAsync(Action<GuildEmbedProperties> func, RequestOptions options = null)
{
var model = await GuildHelper.ModifyEmbedAsync(this, Discord, func, options).ConfigureAwait(false);


+ 6
- 6
src/Discord.Net.WebSocket/BaseSocketClient.cs View File

@@ -66,7 +66,7 @@ namespace Discord.WebSocket
/// <remarks>
/// This method gets the user present in the WebSocket cache with the given condition.
/// <note>
/// Sometimes a user may return <see langword="null"/> due to Discord not sending offline users in large
/// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large
/// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
/// <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// </note>
@@ -76,7 +76,7 @@ namespace Discord.WebSocket
/// </note>
/// </remarks>
/// <returns>
/// A WebSocket-based generic user; <see langword="null"/> when the user cannot be found.
/// A WebSocket-based generic user; <c>null</c> when the user cannot be found.
/// </returns>
public abstract SocketUser GetUser(ulong id);

@@ -88,7 +88,7 @@ namespace Discord.WebSocket
/// <remarks>
/// This method gets the user present in the WebSocket cache with the given condition.
/// <note>
/// Sometimes a user may return <see langword="null"/> due to Discord not sending offline users in large
/// Sometimes a user may return <c>null</c> due to Discord not sending offline users in large
/// guilds (i.e. guild with 100+ members) actively. To download users on startup, consider enabling
/// <see cref="DiscordSocketConfig.AlwaysDownloadUsers"/>.
/// </note>
@@ -98,7 +98,7 @@ namespace Discord.WebSocket
/// </note>
/// </remarks>
/// <returns>
/// A WebSocket-based generic user; <see langword="null"/> when the user cannot be found.
/// A WebSocket-based generic user; <c>null</c> when the user cannot be found.
/// </returns>
public abstract SocketUser GetUser(string username, string discriminator);
/// <summary>
@@ -115,7 +115,7 @@ namespace Discord.WebSocket
/// </summary>
/// <param name="id">The guild snowflake ID.</param>
/// <returns>
/// A WebSocket-based guild; <see langword="null"/> when the guild cannot be found.
/// A WebSocket-based guild; <c>null</c> when the guild cannot be found.
/// </returns>
public abstract SocketGuild GetGuild(ulong id);
/// <summary>
@@ -123,7 +123,7 @@ namespace Discord.WebSocket
/// </summary>
/// <param name="id">The unique identifier of the voice region.</param>
/// <returns>
/// A REST-based voice region; <see langword="null"/> if none can be found.
/// A REST-based voice region; <c>null</c> if none can be found.
/// </returns>
public abstract RestVoiceRegion GetVoiceRegion(string id);
/// <inheritdoc />


+ 1
- 1
src/Discord.Net.WebSocket/DiscordSocketConfig.cs View File

@@ -15,7 +15,7 @@ namespace Discord.WebSocket
public const string GatewayEncoding = "json";

/// <summary>
/// Gets or sets the WebSocket host to connect to. If <see langword="null"/>, the client will use the
/// Gets or sets the WebSocket host to connect to. If <c>null</c>, the client will use the
/// /gateway endpoint.
/// </summary>
public string GatewayHost { get; set; } = null;


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs View File

@@ -72,7 +72,7 @@ namespace Discord.WebSocket
/// </summary>
/// <param name="id">The ID of the message.</param>
/// <returns>
/// Cached message object; <see langword="null"/> if it doesn't exist in the cache.
/// Cached message object; <c>null</c> if it doesn't exist in the cache.
/// </returns>
SocketMessage GetCachedMessage(ulong id);
/// <summary>


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs View File

@@ -34,7 +34,7 @@ namespace Discord.WebSocket
/// Gets the parent category of this channel.
/// </summary>
/// <returns>
/// A parent category ID associated with this channel, or <see langword="null"/> if none is set.
/// A parent category ID associated with this channel, or <c>null</c> if none is set.
/// </returns>
public ICategoryChannel Category
=> CategoryId.HasValue ? Guild.GetChannel(CategoryId.Value) as ICategoryChannel : null;


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs View File

@@ -152,7 +152,7 @@ namespace Discord.WebSocket
/// <param name="id">The ID of the webhook.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// A webhook associated with the <paramref name="id"/>, or <see langword="null"/> if not found.
/// A webhook associated with the <paramref name="id"/>, or <c>null</c> if not found.
/// </returns>
public Task<RestWebhook> GetWebhookAsync(ulong id, RequestOptions options = null)
=> ChannelHelper.GetWebhookAsync(this, Discord, id, options);


+ 5
- 5
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -116,7 +116,7 @@ namespace Discord.WebSocket
}
}
/// <summary>
/// Gets the embed channel set in the widget settings of this guild, or <see langword="null"/> if none is set.
/// Gets the embed channel set in the widget settings of this guild, or <c>null</c> if none is set.
/// </summary>
public SocketGuildChannel EmbedChannel
{
@@ -127,7 +127,7 @@ namespace Discord.WebSocket
}
}
/// <summary>
/// Gets the channel where randomized welcome messages are sent, or <see langword="null"/> if none is set.
/// Gets the channel where randomized welcome messages are sent, or <c>null</c> if none is set.
/// </summary>
public SocketTextChannel SystemChannel
{
@@ -372,12 +372,12 @@ namespace Discord.WebSocket
=> GuildHelper.DeleteAsync(this, Discord, 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 ModifyAsync(Action<GuildProperties> func, RequestOptions options = null)
=> GuildHelper.ModifyAsync(this, Discord, func, 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 ModifyEmbedAsync(Action<GuildEmbedProperties> func, RequestOptions options = null)
=> GuildHelper.ModifyEmbedAsync(this, Discord, func, options);
/// <inheritdoc />
@@ -671,7 +671,7 @@ namespace Discord.WebSocket
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 />


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Users/SocketVoiceState.cs View File

@@ -23,7 +23,7 @@ namespace Discord.WebSocket
private readonly Flags _voiceStates;

/// <summary>
/// Gets the voice channel that the user is currently in; or <see langword="null"/> if none.
/// Gets the voice channel that the user is currently in; or <c>null</c> if none.
/// </summary>
public SocketVoiceChannel VoiceChannel { get; }
/// <inheritdoc />


Loading…
Cancel
Save