finish ChannelUpdate responder
This commit is contained in:
parent
eb40872254
commit
df8af75dd4
14 changed files with 155 additions and 63 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using System.Diagnostics;
|
||||
using App.Metrics;
|
||||
using Catalogger.Backend.Cache;
|
||||
using Catalogger.Backend.Cache.InMemoryCache;
|
||||
using Catalogger.Backend.Database;
|
||||
using Humanizer;
|
||||
|
|
|
|||
|
|
@ -153,9 +153,9 @@ public class WebhookExecutorService(
|
|||
if (logChannelType is LogChannelType.MessageUpdate or LogChannelType.MessageDelete
|
||||
or LogChannelType.MessageDeleteBulk)
|
||||
{
|
||||
if (GetDefaultLogChannel(guild, logChannelType) == null) return null;
|
||||
if (GetDefaultLogChannel(guild, logChannelType) == 0) return null;
|
||||
|
||||
ulong categoryRedirect = categoryId != null
|
||||
var categoryRedirect = categoryId != null
|
||||
? guild.Channels.Redirects.GetValueOrDefault(categoryId.Value.Value)
|
||||
: 0;
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ public class WebhookExecutorService(
|
|||
return GetDefaultLogChannel(guild, logChannelType);
|
||||
}
|
||||
|
||||
public static ulong? GetDefaultLogChannel(Guild guild, LogChannelType channelType) => channelType switch
|
||||
public static ulong GetDefaultLogChannel(Guild guild, LogChannelType channelType) => channelType switch
|
||||
{
|
||||
LogChannelType.GuildUpdate => guild.Channels.GuildUpdate,
|
||||
LogChannelType.GuildEmojisUpdate => guild.Channels.GuildEmojisUpdate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue