Browse Source

Fix lots of typos in comments

+ Geez, I didn't know there were so many.
pull/1161/head
Still Hsu 7 years ago
parent
commit
ec97895c41
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
25 changed files with 50 additions and 38 deletions
  1. +9
    -1
      Discord.Net.sln.DotSettings
  2. +3
    -3
      samples/01_basic_ping_bot/Program.cs
  3. +1
    -1
      samples/02_commands_framework/Program.cs
  4. +1
    -1
      src/Discord.Net.Commands/Attributes/Preconditions/RequireContextAttribute.cs
  5. +1
    -1
      src/Discord.Net.Commands/CommandError.cs
  6. +1
    -1
      src/Discord.Net.Commands/Info/ModuleInfo.cs
  7. +3
    -3
      src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs
  8. +3
    -3
      src/Discord.Net.Core/Entities/Channels/IVoiceChannel.cs
  9. +1
    -1
      src/Discord.Net.Core/Entities/Channels/ReorderChannelProperties.cs
  10. +1
    -1
      src/Discord.Net.Rest/DiscordRestClient.cs
  11. +2
    -2
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs
  12. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs
  13. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs
  14. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs
  15. +1
    -1
      src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs
  16. +3
    -3
      src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs
  17. +2
    -2
      src/Discord.Net.Rest/Entities/Users/RestUser.cs
  18. +1
    -1
      src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs
  19. +3
    -1
      src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs
  20. +3
    -1
      src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs
  21. +1
    -1
      src/Discord.Net.WebSocket/BaseSocketClient.Events.cs
  22. +1
    -1
      src/Discord.Net.WebSocket/BaseSocketClient.cs
  23. +3
    -3
      src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
  24. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
  25. +2
    -2
      test/Discord.Net.Tests/Tests.GuildPermissions.cs

+ 9
- 1
Discord.Net.sln.DotSettings View File

@@ -1,6 +1,14 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Downloader/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Downloader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Emoji/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Emoji/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=libsodium/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=NSFW/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=NSFW/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=seeked/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sharded/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Spotify/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unban/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Uncache/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=webhook/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=webhook/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=webhooks/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=webhooks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=webhook_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ZWSP/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

+ 3
- 3
samples/01_basic_ping_bot/Program.cs View File

@@ -5,14 +5,14 @@ using Discord.WebSocket;


namespace _01_basic_ping_bot namespace _01_basic_ping_bot
{ {
// This is a minimal, barebones example of using Discord.Net
// This is a minimal, bare-bones example of using Discord.Net
// //
// If writing a bot with commands, we recommend using the Discord.Net.Commands // If writing a bot with commands, we recommend using the Discord.Net.Commands
// framework, rather than handling commands yourself, like we do in this sample. // framework, rather than handling commands yourself, like we do in this sample.
// //
// You can find samples of using the command framework: // You can find samples of using the command framework:
// - Here, under the 02_commands_framework sample // - Here, under the 02_commands_framework sample
// - https://github.com/foxbot/DiscordBotBase - a barebones bot template
// - https://github.com/foxbot/DiscordBotBase - a bare-bones bot template
// - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library // - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library
class Program class Program
{ {
@@ -54,7 +54,7 @@ namespace _01_basic_ping_bot
return Task.CompletedTask; return Task.CompletedTask;
} }


// This is not the recommmended way to write a bot - consider
// This is not the recommended way to write a bot - consider
// reading over the Commands Framework sample. // reading over the Commands Framework sample.
private async Task MessageReceivedAsync(SocketMessage message) private async Task MessageReceivedAsync(SocketMessage message)
{ {


+ 1
- 1
samples/02_commands_framework/Program.cs View File

@@ -15,7 +15,7 @@ namespace _02_commands_framework
// //
// You can find samples of using the command framework: // You can find samples of using the command framework:
// - Here, under the 02_commands_framework sample // - Here, under the 02_commands_framework sample
// - https://github.com/foxbot/DiscordBotBase - a barebones bot template
// - https://github.com/foxbot/DiscordBotBase - a bare-bones bot template
// - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library // - https://github.com/foxbot/patek - a more feature-filled bot, utilizing more aspects of the library
class Program class Program
{ {


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

@@ -42,7 +42,7 @@ namespace Discord.Commands
/// [RequireContext(ContextType.DM | ContextType.Group)] /// [RequireContext(ContextType.DM | ContextType.Group)]
/// public Task PrivateOnlyAsync() /// public Task PrivateOnlyAsync()
/// { /// {
/// return ReplyAsync("shhh, this command is a secret");
/// return ReplyAsync("shh, this command is a secret");
/// } /// }
/// </code> /// </code>
/// </example> /// </example>


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

@@ -26,7 +26,7 @@ namespace Discord.Commands
/// </summary> /// </summary>
ObjectNotFound, ObjectNotFound,
/// <summary> /// <summary>
/// Thrown when more than one objects is matched by <see cref="TypeReader"/>.
/// Thrown when more than one object is matched by <see cref="TypeReader"/>.
/// </summary> /// </summary>
MultipleMatches, MultipleMatches,




+ 1
- 1
src/Discord.Net.Commands/Info/ModuleInfo.cs View File

@@ -49,7 +49,7 @@ namespace Discord.Commands
/// </summary> /// </summary>
public IReadOnlyList<Attribute> Attributes { get; } public IReadOnlyList<Attribute> Attributes { get; }
/// <summary> /// <summary>
/// Gets a read-only list of submodules associated with tihs module.
/// Gets a read-only list of submodules associated with this module.
/// </summary> /// </summary>
public IReadOnlyList<ModuleInfo> Submodules { get; } public IReadOnlyList<ModuleInfo> Submodules { get; }
/// <summary> /// <summary>


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

@@ -18,7 +18,7 @@ namespace Discord
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
Task<IUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); Task<IUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -39,7 +39,7 @@ namespace Discord
/// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
Task<IUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); Task<IUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -61,7 +61,7 @@ namespace Discord
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
Task<IUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); Task<IUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);


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

@@ -9,10 +9,10 @@ namespace Discord
public interface IVoiceChannel : INestedChannel, IAudioChannel public interface IVoiceChannel : INestedChannel, IAudioChannel
{ {
/// <summary> /// <summary>
/// Gets the bitrate that the clients in this voice channel are requested to use.
/// Gets the bit-rate that the clients in this voice channel are requested to use.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="int"/> representing the bitrate (bps) that this voice channel defines and requests the
/// An <see cref="int"/> representing the bit-rate (bps) that this voice channel defines and requests the
/// client(s) to use. /// client(s) to use.
/// </returns> /// </returns>
int Bitrate { get; } int Bitrate { get; }
@@ -20,7 +20,7 @@ namespace Discord
/// Gets the max number of users allowed to be connected to this channel at once. /// Gets the max number of users allowed to be connected to this channel at once.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="int"/> representing the maxmimum number of users that are allowed to be connected to this
/// An <see cref="int"/> representing the maximum number of users that are allowed to be connected to this
/// channel at once; <c>null</c> if a limit is not set. /// channel at once; <c>null</c> if a limit is not set.
/// </returns> /// </returns>
int? UserLimit { get; } int? UserLimit { get; }


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

@@ -9,7 +9,7 @@ namespace Discord
/// Gets the ID of the channel to apply this position to. /// Gets the ID of the channel to apply this position to.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// A <see cref="ulong"/> representing the snowflake identififer of this channel.
/// A <see cref="ulong"/> representing the snowflake identifier of this channel.
/// </returns> /// </returns>
public ulong Id { get; } public ulong Id { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/DiscordRestClient.cs View File

@@ -20,7 +20,7 @@ namespace Discord.Rest
/// <inheritdoc /> /// <inheritdoc />
public DiscordRestClient() : this(new DiscordRestConfig()) { } public DiscordRestClient() : this(new DiscordRestConfig()) { }
/// <summary> /// <summary>
/// Initializes a new <see cref="DiscordRestClient"/> with the provided configuratation.
/// Initializes a new <see cref="DiscordRestClient"/> with the provided configuration.
/// </summary> /// </summary>
/// <param name="config">The configuration to be used with the client.</param> /// <param name="config">The configuration to be used with the client.</param>
public DiscordRestClient(DiscordRestConfig config) : base(config, CreateApiClient(config)) { } public DiscordRestClient(DiscordRestConfig config) : base(config, CreateApiClient(config)) { }


+ 2
- 2
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelInfo.cs View File

@@ -28,10 +28,10 @@ namespace Discord.Rest
/// </returns> /// </returns>
public string Topic { get; } public string Topic { get; }
/// <summary> /// <summary>
/// Gets the bitrate of this channel if applicable.
/// Gets the bit-rate of this channel if applicable.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// An <see cref="System.Int32"/> representing the bitrate set for the voice channel; <c>null</c> if not
/// An <see cref="System.Int32"/> representing the bit-rate set for the voice channel; <c>null</c> if not
/// applicable. /// applicable.
/// </returns> /// </returns>
public int? Bitrate { get; } public int? Bitrate { get; }


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MessageDeleteAuditLogData.cs View File

@@ -30,7 +30,7 @@ namespace Discord.Rest
/// Gets the ID of the channel that the messages were deleted from. /// Gets the ID of the channel that the messages were deleted from.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// A <see cref="ulong"/> representing the snowflake identifer for the channel that the messages were
/// A <see cref="ulong"/> representing the snowflake identifier for the channel that the messages were
/// deleted from. /// deleted from.
/// </returns> /// </returns>
public ulong ChannelId { get; } public ulong ChannelId { get; }


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleCreateAuditLogData.cs View File

@@ -48,7 +48,7 @@ namespace Discord.Rest
/// Gets the ID of the role that was created. /// Gets the ID of the role that was created.
/// </summary> /// </summary>
/// <return> /// <return>
/// A <see cref="ulong"/> representing the snowflake identifer to the role that was created.
/// A <see cref="ulong"/> representing the snowflake identifier to the role that was created.
/// </return> /// </return>
public ulong RoleId { get; } public ulong RoleId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/RoleDeleteAuditLogData.cs View File

@@ -48,7 +48,7 @@ namespace Discord.Rest
/// Gets the ID of the role that was deleted. /// Gets the ID of the role that was deleted.
/// </summary> /// </summary>
/// <return> /// <return>
/// A <see cref="ulong"/> representing the snowflake identifer to the role that was deleted.
/// A <see cref="ulong"/> representing the snowflake identifier to the role that was deleted.
/// </return> /// </return>
public ulong RoleId { get; } public ulong RoleId { get; }
/// <summary> /// <summary>


+ 1
- 1
src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/WebhookUpdateAuditLogData.cs View File

@@ -45,7 +45,7 @@ namespace Discord.Rest
/// Gets the webhook that was updated. /// Gets the webhook that was updated.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// A webhook objet representing the webhook that was updated.
/// A webhook object representing the webhook that was updated.
/// </returns> /// </returns>
public IWebhook Webhook { get; } public IWebhook Webhook { get; }




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

@@ -17,7 +17,7 @@ namespace Discord.Rest
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -38,7 +38,7 @@ namespace Discord.Rest
/// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -60,7 +60,7 @@ namespace Discord.Rest
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);


+ 2
- 2
src/Discord.Net.Rest/Entities/Users/RestUser.cs View File

@@ -87,10 +87,10 @@ namespace Discord.Rest
=> CDN.GetDefaultUserAvatarUrl(DiscriminatorValue); => CDN.GetDefaultUserAvatarUrl(DiscriminatorValue);


/// <summary> /// <summary>
/// Gets the Username#Descriminator of the user.
/// Gets the Username#Discriminator of the user.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// A string that resolves to Username#Descriminator of the user.
/// A string that resolves to Username#Discriminator of the user.
/// </returns> /// </returns>
public override string ToString() => $"{Username}#{Discriminator}"; public override string ToString() => $"{Username}#{Discriminator}";
private string DebuggerDisplay => $"{Username}#{Discriminator} ({Id}{(IsBot ? ", Bot" : "")})"; private string DebuggerDisplay => $"{Username}#{Discriminator} ({Id}{(IsBot ? ", Bot" : "")})";


+ 1
- 1
src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs View File

@@ -25,7 +25,7 @@ namespace Discord.Audio.Streams


public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancelToken) public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancelToken)
{ {
//Assume threadsafe
//Assume thread-safe
while (count > 0) while (count > 0)
{ {
if (_partialFramePos == 0 && count >= OpusConverter.FrameBytes) if (_partialFramePos == 0 && count >= OpusConverter.FrameBytes)


+ 3
- 1
src/Discord.Net.WebSocket/Audio/Streams/SodiumDecryptStream.cs View File

@@ -4,7 +4,9 @@ using System.Threading.Tasks;


namespace Discord.Audio.Streams namespace Discord.Audio.Streams
{ {
///<summary> Decrypts an RTP frame using libsodium </summary>
/// <summary>
/// Decrypts an RTP frame using libsodium.
/// </summary>
public class SodiumDecryptStream : AudioOutStream public class SodiumDecryptStream : AudioOutStream
{ {
private readonly AudioClient _client; private readonly AudioClient _client;


+ 3
- 1
src/Discord.Net.WebSocket/Audio/Streams/SodiumEncryptStream.cs View File

@@ -4,7 +4,9 @@ using System.Threading.Tasks;


namespace Discord.Audio.Streams namespace Discord.Audio.Streams
{ {
///<summary> Encrypts an RTP frame using libsodium </summary>
/// <summary>
/// Encrypts an RTP frame using libsodium.
/// </summary>
public class SodiumEncryptStream : AudioOutStream public class SodiumEncryptStream : AudioOutStream
{ {
private readonly AudioClient _client; private readonly AudioClient _client;


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

@@ -71,7 +71,7 @@ namespace Discord.WebSocket
/// The message that is sent to the client is passed into the event handler parameter as /// The message that is sent to the client is passed into the event handler parameter as
/// <see cref="SocketMessage"/>. This message may be a system message (i.e. /// <see cref="SocketMessage"/>. This message may be a system message (i.e.
/// <see cref="SocketSystemMessage"/>) or a user message (i.e. <see cref="SocketUserMessage"/>. See the /// <see cref="SocketSystemMessage"/>) or a user message (i.e. <see cref="SocketUserMessage"/>. See the
/// derived clsases of <see cref="SocketMessage"/> for more details.
/// derived classes of <see cref="SocketMessage"/> for more details.
/// </para> /// </para>
/// </remarks> /// </remarks>
public event Func<SocketMessage, Task> MessageReceived { public event Func<SocketMessage, Task> MessageReceived {


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

@@ -194,7 +194,7 @@ namespace Discord.WebSocket
/// clients only. /// clients only.
/// </note> /// </note>
/// </remarks> /// </remarks>
/// <param name="activity">The activty to be set.</param>
/// <param name="activity">The activity to be set.</param>
/// <returns> /// <returns>
/// A task that represents the asynchronous set operation. /// A task that represents the asynchronous set operation.
/// </returns> /// </returns>


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

@@ -26,7 +26,7 @@ namespace Discord.WebSocket
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -47,7 +47,7 @@ namespace Discord.WebSocket
/// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
@@ -69,7 +69,7 @@ namespace Discord.WebSocket
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param> /// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchronous send operation for delievering the message. The task result
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message. /// contains the sent message.
/// </returns> /// </returns>
new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null); new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);


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

@@ -79,7 +79,7 @@ namespace Discord.WebSocket
/// <param name="id">The snowflake identifier of the message.</param> /// <param name="id">The snowflake identifier of the message.</param>
/// <param name="options">The options to be used when sending the request.</param> /// <param name="options">The options to be used when sending the request.</param>
/// <returns> /// <returns>
/// A task that represents an asynchrnous get operation for retrieving the message. The task result contains
/// A task that represents an asynchronous get operation for retrieving the message. The task result contains
/// the retrieved message; <c>null</c> if no message is found with the specified identifier. /// the retrieved message; <c>null</c> if no message is found with the specified identifier.
/// </returns> /// </returns>
public async Task<IMessage> GetMessageAsync(ulong id, RequestOptions options = null) public async Task<IMessage> GetMessageAsync(ulong id, RequestOptions options = null)


+ 2
- 2
test/Discord.Net.Tests/Tests.GuildPermissions.cs View File

@@ -31,11 +31,11 @@ namespace Discord
copy = GuildPermissions.None.Modify(); copy = GuildPermissions.None.Modify();
Assert.Equal(GuildPermissions.None.RawValue, copy.RawValue); Assert.Equal(GuildPermissions.None.RawValue, copy.RawValue);


// test modify with no paramters on all permissions
// test modify with no parameters on all permissions
copy = GuildPermissions.All.Modify(); copy = GuildPermissions.All.Modify();
Assert.Equal(GuildPermissions.All.RawValue, copy.RawValue); Assert.Equal(GuildPermissions.All.RawValue, copy.RawValue);


// test modify with no paramters on webhook permissions
// test modify with no parameters on webhook permissions
copy = GuildPermissions.Webhook.Modify(); copy = GuildPermissions.Webhook.Modify();
Assert.Equal(GuildPermissions.Webhook.RawValue, copy.RawValue); Assert.Equal(GuildPermissions.Webhook.RawValue, copy.RawValue);




Loading…
Cancel
Save