Browse Source

Fix EnterTypingState impl for doc inheritance

pull/1161/head
Still Hsu 7 years ago
parent
commit
e31e973bf5
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
7 changed files with 9 additions and 20 deletions
  1. +1
    -3
      src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
  2. +1
    -2
      src/Discord.Net.Rest/Entities/Channels/RestGroupChannel.cs
  3. +1
    -3
      src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
  4. +4
    -2
      src/Discord.Net.Rest/Entities/Channels/RpcVirtualMessageChannel.cs
  5. +1
    -4
      src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
  6. +0
    -3
      src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
  7. +1
    -3
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs

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

@@ -120,6 +120,7 @@ namespace Discord.Rest
/// <inheritdoc />
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
/// <inheritdoc />
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);

@@ -183,9 +184,6 @@ namespace Discord.Rest
/// <inheritdoc />
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
/// <inheritdoc />
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IChannel
/// <inheritdoc />


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

@@ -130,6 +130,7 @@ namespace Discord.Rest
/// <inheritdoc />
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
/// <inheritdoc />
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);

@@ -181,8 +182,6 @@ namespace Discord.Rest
=> await SendFileAsync(stream, filename, text, isTTS, embed, options).ConfigureAwait(false);
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IAudioChannel
/// <inheritdoc />


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

@@ -126,6 +126,7 @@ namespace Discord.Rest
/// <inheritdoc />
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
/// <inheritdoc />
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);
@@ -200,9 +201,6 @@ namespace Discord.Rest
/// <inheritdoc />
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
/// <inheritdoc />
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IGuildChannel
/// <inheritdoc />


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

@@ -41,13 +41,17 @@ namespace Discord.Rest

=> ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, options);

/// <inheritdoc />
public Task DeleteMessageAsync(ulong messageId, RequestOptions options = null)
=> ChannelHelper.DeleteMessageAsync(this, messageId, Discord, options);
/// <inheritdoc />
public Task DeleteMessageAsync(IMessage message, RequestOptions options = null)
=> ChannelHelper.DeleteMessageAsync(this, message.Id, Discord, options);

/// <inheritdoc />
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
/// <inheritdoc />
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);

@@ -92,8 +96,6 @@ namespace Discord.Rest
=> await SendFileAsync(stream, filename, text, isTTS, embed, options).ConfigureAwait(false);
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IChannel
string IChannel.Name =>


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

@@ -113,7 +113,7 @@ namespace Discord.WebSocket
if (id == Recipient.Id)
return Recipient;
else if (id == Discord.CurrentUser.Id)
return Discord.CurrentUser as SocketSelfUser;
return Discord.CurrentUser;
else
return null;
}
@@ -171,9 +171,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
/// <inheritdoc />
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IChannel
/// <inheritdoc />


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

@@ -249,9 +249,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
/// <inheritdoc />
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

//IAudioChannel
/// <inheritdoc />


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

@@ -118,6 +118,7 @@ namespace Discord.WebSocket
/// <inheritdoc />
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
/// <inheritdoc />
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);

@@ -226,9 +227,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
async Task<IUserMessage> IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options)
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false);
/// <inheritdoc />
IDisposable IMessageChannel.EnterTypingState(RequestOptions options)
=> EnterTypingState(options);

// INestedChannel
Task<ICategoryChannel> INestedChannel.GetCategoryAsync(CacheMode mode, RequestOptions options)


Loading…
Cancel
Save