feat: add config option to run silently (no logs, no commands, but doing everything else needed for logging)

This commit is contained in:
sam 2024-10-25 16:18:27 +02:00
parent f7f88ff98f
commit 33b78a7ac5
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
5 changed files with 100 additions and 1 deletions

View file

@ -97,6 +97,15 @@ public class WebhookExecutorService(
if (channelId == 0)
return;
if (config.Discord.TestMode)
{
_logger.Information(
"Should have logged to {ChannelId}, but test mode is enabled, ignoring",
channelId
);
return;
}
var attachments = files
.Select<FileData, OneOf.OneOf<FileData, IPartialAttachment>>(f => f)
.ToList();