Browse Source

A few more renames

tags/docs-0.9
RogueException 9 years ago
parent
commit
747266ecb5
7 changed files with 13 additions and 13 deletions
  1. +1
    -1
      src/Discord.Net/DiscordClient.Channels.cs
  2. +1
    -1
      src/Discord.Net/DiscordClient.Invites.cs
  3. +1
    -1
      src/Discord.Net/DiscordClient.Messages.cs
  4. +6
    -6
      src/Discord.Net/DiscordClient.Permissions.cs
  5. +1
    -1
      src/Discord.Net/DiscordClient.cs
  6. +2
    -2
      src/Discord.Net/DiscordWSClient.cs
  7. +1
    -1
      test/Discord.Net.Tests/Tests.cs

+ 1
- 1
src/Discord.Net/DiscordClient.Channels.cs View File

@@ -162,7 +162,7 @@ namespace Discord
}
/// <summary> Destroys the provided channel. </summary>
public async Task DestroyChannel(Channel channel)
public async Task DeleteChannel(Channel channel)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
CheckReady();


+ 1
- 1
src/Discord.Net/DiscordClient.Invites.cs View File

@@ -61,7 +61,7 @@ namespace Discord
}

/// <summary> Deletes the provided invite. </summary>
public async Task DestroyInvite(Invite invite)
public async Task DeleteInvite(Invite invite)
{
if (invite == null) throw new ArgumentNullException(nameof(invite));
CheckReady();


+ 1
- 1
src/Discord.Net/DiscordClient.Messages.cs View File

@@ -239,7 +239,7 @@ namespace Discord

private Task MessageQueueLoop()
{
var cancelToken = CancelToken;
var cancelToken = _cancelToken;
int interval = Config.MessageQueueInterval;

return Task.Run(async () =>


+ 6
- 6
src/Discord.Net/DiscordClient.Permissions.cs View File

@@ -7,7 +7,7 @@ namespace Discord
{
public partial class DiscordClient
{
public Task SetChannelUserPermissions(Channel channel, User user, ChannelPermissions allow = null, ChannelPermissions deny = null)
public Task SetChannelPermissions(Channel channel, User user, ChannelPermissions allow = null, ChannelPermissions deny = null)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (user == null) throw new ArgumentNullException(nameof(user));
@@ -15,7 +15,7 @@ namespace Discord

return SetChannelPermissions(channel, user?.Id, PermissionTarget.User, allow, deny);
}
public Task SetChannelUserPermissions(Channel channel, User user, DualChannelPermissions permissions = null)
public Task SetChannelPermissions(Channel channel, User user, DualChannelPermissions permissions = null)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (user == null) throw new ArgumentNullException(nameof(user));
@@ -23,7 +23,7 @@ namespace Discord

return SetChannelPermissions(channel, user?.Id, PermissionTarget.User, permissions?.Allow, permissions?.Deny);
}
public Task SetChannelRolePermissions(Channel channel, Role role, ChannelPermissions allow = null, ChannelPermissions deny = null)
public Task SetChannelPermissions(Channel channel, Role role, ChannelPermissions allow = null, ChannelPermissions deny = null)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (role == null) throw new ArgumentNullException(nameof(role));
@@ -31,7 +31,7 @@ namespace Discord

return SetChannelPermissions(channel, role?.Id, PermissionTarget.Role, allow, deny);
}
public Task SetChannelRolePermissions(Channel channel, Role role, DualChannelPermissions permissions = null)
public Task SetChannelPermissions(Channel channel, Role role, DualChannelPermissions permissions = null)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (role == null) throw new ArgumentNullException(nameof(role));
@@ -42,7 +42,7 @@ namespace Discord
private Task SetChannelPermissions(Channel channel, string targetId, PermissionTarget targetType, ChannelPermissions allow = null, ChannelPermissions deny = null)
=> _api.SetChannelPermissions(channel.Id, targetId, targetType.Value, allow?.RawValue ?? 0, deny?.RawValue ?? 0);

public Task RemoveChannelUserPermissions(Channel channel, User user)
public Task RemoveChannelPermissions(Channel channel, User user)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (user == null) throw new ArgumentNullException(nameof(user));
@@ -50,7 +50,7 @@ namespace Discord

return RemoveChannelPermissions(channel, user?.Id, PermissionTarget.User);
}
public Task RemoveChannelRolePermissions(Channel channel, Role role)
public Task RemoveChannelPermissions(Channel channel, Role role)
{
if (channel == null) throw new ArgumentNullException(nameof(channel));
if (role == null) throw new ArgumentNullException(nameof(role));


+ 1
- 1
src/Discord.Net/DiscordClient.cs View File

@@ -51,7 +51,7 @@ namespace Discord

this.Connected += async (s, e) =>
{
_api.CancelToken = CancelToken;
_api.CancelToken = _cancelToken;
await SendStatus().ConfigureAwait(false);
};



+ 2
- 2
src/Discord.Net/DiscordWSClient.cs View File

@@ -42,7 +42,7 @@ namespace Discord

public CancellationToken CancelToken => _cancelToken;
private CancellationTokenSource _cancelTokenSource;
private CancellationToken _cancelToken;
protected CancellationToken _cancelToken;

/// <summary> Initializes a new instance of the DiscordClient class. </summary>
public DiscordWSClient(DiscordWSClientConfig config = null)
@@ -309,7 +309,7 @@ namespace Discord
{
string token = e.Payload.Value<string>("token");
_voiceSocket.Host = "wss://" + e.Payload.Value<string>("endpoint").Split(':')[0];
await _voiceSocket.Login(_userId, _dataSocket.SessionId, token, CancelToken).ConfigureAwait(false);
await _voiceSocket.Login(_userId, _dataSocket.SessionId, token, _cancelToken).ConfigureAwait(false);
}
}
break;


+ 1
- 1
test/Discord.Net.Tests/Tests.cs View File

@@ -66,7 +66,7 @@ namespace Discord.Tests

AssertEvent<ChannelEventArgs>(
"ChannelDestroyed event never received",
async () => await _hostClient.DestroyChannel(channel),
async () => await _hostClient.DeleteChannel(channel),
x => _targetBot.ChannelDestroyed += x,
x => _targetBot.ChannelDestroyed -= x,
(s, e) => e.Channel.Name == name);


Loading…
Cancel
Save