fix: remove unnecessary async methods, fix PluralkitApiService

This commit is contained in:
sam 2024-09-02 15:59:16 +02:00
parent 086eb95452
commit db01f879bd
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
10 changed files with 96 additions and 73 deletions

View file

@ -69,7 +69,7 @@ public class ChannelCreateResponder(
}
var guildConfig = await db.GetGuildAsync(ch.GuildID.Value, ct);
await webhookExecutor.QueueLogAsync(guildConfig, LogChannelType.ChannelCreate, builder.Build().GetOrThrow());
webhookExecutor.QueueLog(guildConfig, LogChannelType.ChannelCreate, builder.Build().GetOrThrow());
return Result.Success;
}
}

View file

@ -49,7 +49,7 @@ public class ChannelDeleteResponder(
if (channel.Topic.IsDefined(out var topic))
embed.AddField("Description", topic);
await webhookExecutor.QueueLogAsync(guildConfig, LogChannelType.ChannelDelete, embed.Build().GetOrThrow());
webhookExecutor.QueueLog(guildConfig, LogChannelType.ChannelDelete, embed.Build().GetOrThrow());
return Result.Success;
}
}

View file

@ -141,8 +141,7 @@ public class ChannelUpdateResponder(
// Sometimes we get channel update events for channels that didn't actually have anything loggable change.
// If that happens, there will be no embed fields, so just check for that
if (builder.Fields.Count == 0) return Result.Success;
await webhookExecutor.QueueLogAsync(guildConfig, LogChannelType.ChannelUpdate,
builder.Build().GetOrThrow());
webhookExecutor.QueueLog(guildConfig, LogChannelType.ChannelUpdate, builder.Build().GetOrThrow());
return Result.Success;
}