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

@ -7,6 +7,7 @@ using Catalogger.Backend.Services;
using Humanizer;
using Remora.Discord.API;
using Remora.Discord.API.Abstractions.Gateway.Events;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.API.Abstractions.Rest;
using Remora.Discord.API.Objects;
using Remora.Discord.Extensions.Embeds;
@ -110,8 +111,9 @@ public class GuildMemberAddResponder(
}
if (embeds.Count > 1)
await webhookExecutor.SendLogWithAttachmentsAsync(guildConfig.Channels.GuildMemberAdd, embeds, []);
else await webhookExecutor.QueueLogAsync(guildConfig.Channels.GuildMemberAdd, embeds[0]);
await webhookExecutor.SendLogAsync(guildConfig.Channels.GuildMemberAdd,
embeds.Cast<IEmbed>().ToList(), []);
else webhookExecutor.QueueLog(guildConfig.Channels.GuildMemberAdd, embeds[0]);
return Result.Success;
}