chore: format with csharpier

This commit is contained in:
sam 2024-10-09 17:35:11 +02:00
parent 2f516dcb73
commit 4f54077c68
59 changed files with 2000 additions and 942 deletions

View file

@ -14,7 +14,8 @@ public class ChannelDeleteResponder(
ILogger logger,
DatabaseContext db,
ChannelCache channelCache,
WebhookExecutorService webhookExecutor) : IResponder<IChannelDelete>
WebhookExecutorService webhookExecutor
) : IResponder<IChannelDelete>
{
private readonly ILogger _logger = logger.ForContext<ChannelDeleteResponder>();
@ -41,7 +42,10 @@ public class ChannelDeleteResponder(
.WithCurrentTimestamp()
.WithDescription($"**Name:** {channel.Name.Value}");
if (channel.ParentID.IsDefined(out var parentId) && channelCache.TryGet(parentId.Value, out var category))
if (
channel.ParentID.IsDefined(out var parentId)
&& channelCache.TryGet(parentId.Value, out var category)
)
embed.Description += $"\n**Category:** {category.Name}";
else
embed.Description += "\n**Category:** (none)";
@ -49,7 +53,11 @@ public class ChannelDeleteResponder(
if (channel.Topic.IsDefined(out var topic))
embed.AddField("Description", topic);
webhookExecutor.QueueLog(guildConfig, LogChannelType.ChannelDelete, embed.Build().GetOrThrow());
webhookExecutor.QueueLog(
guildConfig,
LogChannelType.ChannelDelete,
embed.Build().GetOrThrow()
);
return Result.Success;
}
}
}