Fixed compiler warnings.
This commit is contained in:
@@ -17,17 +17,17 @@ namespace HermesSocketServer.Requests
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
|
||||
public Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
|
||||
{
|
||||
string user = data["user"].ToString()!;
|
||||
string voice = data["voice"].ToString()!;
|
||||
|
||||
var success = _users.Modify(user, (user) => user.DefaultVoice = voice);
|
||||
if (!success)
|
||||
return RequestResult.Failed("Unable to find user data.");
|
||||
return Task.FromResult(RequestResult.Failed("Unable to find user data."));
|
||||
|
||||
_logger.Information($"Updated default TTS voice for channel [channel: {channel.Id}][voice: {voice}]");
|
||||
return RequestResult.Successful(null);
|
||||
return Task.FromResult(RequestResult.Successful(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user