Added TTS Filter cache.
This commit is contained in:
@@ -24,11 +24,12 @@ namespace HermesSocketServer.Requests
|
||||
|
||||
public async Task<RequestResult> Grant(string sender, IDictionary<string, object>? data)
|
||||
{
|
||||
if (long.TryParse(data["chatter"].ToString(), out long chatterId))
|
||||
data["chatter"] = chatterId;
|
||||
else
|
||||
if (data == null)
|
||||
return RequestResult.Failed("Data received from client is null.");
|
||||
if (!long.TryParse(data["chatter"].ToString(), out long chatterId))
|
||||
return RequestResult.Failed("Invalid Twitch user id");
|
||||
|
||||
|
||||
data["user"] = sender;
|
||||
data["voice"] = data["voice"].ToString();
|
||||
|
||||
var check = await _database.ExecuteScalar("SELECT state FROM \"TtsVoiceState\" WHERE \"userId\" = @user AND \"ttsVoiceId\" = @voice", data) ?? false;
|
||||
|
||||
Reference in New Issue
Block a user