Browse Source

Fix general typos (#852)

tags/2.0.0-beta
enzosk8 Christopher F 7 years ago
parent
commit
da335b95c4
6 changed files with 12 additions and 12 deletions
  1. +1
    -1
      docs/guides/getting_started/intro.md
  2. +2
    -2
      docs/guides/getting_started/samples/intro/structure.cs
  3. +1
    -1
      src/Discord.Net.Core/Utils/Optional.cs
  4. +2
    -2
      src/Discord.Net.Rest/Entities/Channels/RestChannel.cs
  5. +4
    -4
      src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
  6. +2
    -2
      src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs

+ 1
- 1
docs/guides/getting_started/intro.md View File

@@ -74,7 +74,7 @@ async main.

[!code-csharp[Async Context](samples/intro/async-context.cs)]

As a result of this, your program will now start and immidiately
As a result of this, your program will now start and immediately
jump into an async context. This will allow us to create a connection
to Discord later on without needing to worry about setting up the
correct async implementation.


+ 2
- 2
docs/guides/getting_started/samples/intro/structure.cs View File

@@ -80,7 +80,7 @@ class Program

private async Task MainAsync()
{
// Centralize the logic for commands into a seperate method.
// Centralize the logic for commands into a separate method.
await InitCommands();

// Login and connect.
@@ -138,7 +138,7 @@ class Program
var context = new SocketCommandContext(_client, msg);
// Execute the command. (result does not indicate a return value,
// rather an object stating if the command executed succesfully).
// rather an object stating if the command executed successfully).
var result = await _commands.ExecuteAsync(context, pos, _services);

// Uncomment the following lines if you want the bot


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

@@ -10,7 +10,7 @@ namespace Discord
public static Optional<T> Unspecified => default(Optional<T>);
private readonly T _value;

/// <summary> Gets the value for this paramter. </summary>
/// <summary> Gets the value for this parameter. </summary>
public T Value
{
get


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

@@ -48,8 +48,8 @@ namespace Discord.Rest
string IChannel.Name => null;

Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IUser>(null); //Overriden
=> Task.FromResult<IUser>(null); //Overridden
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overriden
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overridden
}
}

+ 4
- 4
src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs View File

@@ -154,14 +154,14 @@ namespace Discord.Rest
=> await RemovePermissionOverwriteAsync(user, options).ConfigureAwait(false);
IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> AsyncEnumerable.Empty<IReadOnlyCollection<IGuildUser>>(); //Overriden //Overriden in Text/Voice
=> AsyncEnumerable.Empty<IReadOnlyCollection<IGuildUser>>(); //Overridden //Overridden in Text/Voice
Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IGuildUser>(null); //Overriden in Text/Voice
=> Task.FromResult<IGuildUser>(null); //Overridden in Text/Voice

//IChannel
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overriden in Text/Voice
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overridden in Text/Voice
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IUser>(null); //Overriden in Text/Voice
=> Task.FromResult<IUser>(null); //Overridden in Text/Voice
}
}

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

@@ -154,8 +154,8 @@ namespace Discord.WebSocket

//IChannel
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> ImmutableArray.Create<IReadOnlyCollection<IUser>>(Users).ToAsyncEnumerable(); //Overriden in Text/Voice
=> ImmutableArray.Create<IReadOnlyCollection<IUser>>(Users).ToAsyncEnumerable(); //Overridden in Text/Voice
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IUser>(GetUser(id)); //Overriden in Text/Voice
=> Task.FromResult<IUser>(GetUser(id)); //Overridden in Text/Voice
}
}

Loading…
Cancel
Save