private static Packet DoAction(VoicePayload payload) { return(new Packet( CommandHandler.PlayerHash, CommandConst.ActionVoiceMuteState, JsonConvert.SerializeObject(payload, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore }))); }
private Task OnVSU(SocketVoiceServer server) { if (!server.Guild.HasValue) { return(Task.CompletedTask); } if (!_players.TryGetValue(server.Guild.Id, out _)) { return(Task.CompletedTask); } var voiceUpdate = new VoicePayload(server, _voiceState); LavaSocket.SendPayload(voiceUpdate); return(Task.CompletedTask); }
public QueueItem(VoicePayload payload, TaskCompletionSource <bool> result) { Payload = payload; Result = result; }