chore: format with csharpier
This commit is contained in:
parent
2f516dcb73
commit
4f54077c68
59 changed files with 2000 additions and 942 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue