Browse Source

Update from Discord.Net dev - fix merge conflicts

pull/1958/head
quin lynch 3 years ago
parent
commit
00ec35989e
2 changed files with 0 additions and 30 deletions
  1. +0
    -28
      src/Discord.Net.WebSocket/ClientState.cs
  2. +0
    -2
      src/Discord.Net.WebSocket/Entities/Channels/SocketVoiceChannel.cs

+ 0
- 28
src/Discord.Net.WebSocket/ClientState.cs View File

@@ -170,33 +170,5 @@ namespace Discord.WebSocket
foreach (var id in ids)
_commands.TryRemove(id, out var _);
}

internal SocketApplicationCommand GetCommand(ulong id)
{
if (_commands.TryGetValue(id, out SocketApplicationCommand command))
return command;
return null;
}
internal void AddCommand(SocketApplicationCommand command)
{
_commands[command.Id] = command;
}
internal SocketApplicationCommand GetOrAddCommand(ulong id, Func<ulong, SocketApplicationCommand> commandFactory)
{
return _commands.GetOrAdd(id, commandFactory);
}
internal SocketApplicationCommand RemoveCommand(ulong id)
{
if (_commands.TryRemove(id, out SocketApplicationCommand command))
return command;
return null;
}
internal void PurgeCommands(Func<SocketApplicationCommand, bool> precondition)
{
var ids = _commands.Where(x => precondition(x.Value)).Select(x => x.Key);

foreach (var id in ids)
_commands.TryRemove(id, out var _);
}
}
}

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

@@ -36,8 +36,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
public string Mention => MentionUtils.MentionChannel(Id);

/// <inheritdoc />
public string Mention => MentionUtils.MentionChannel(Id);
/// <inheritdoc />
public Task SyncPermissionsAsync(RequestOptions options = null)
=> ChannelHelper.SyncPermissionsAsync(this, Discord, options);


Loading…
Cancel
Save