fix: fall back to default log channel if the queried channel isn't in cache
This commit is contained in:
parent
27e1903c4b
commit
0d7e809ef6
1 changed files with 13 additions and 1 deletions
|
|
@ -323,7 +323,13 @@ public class WebhookExecutorService(
|
|||
);
|
||||
|
||||
if (!channelCache.TryGet(channelId, out var channel))
|
||||
{
|
||||
_logger.Verbose(
|
||||
"Channel with ID {ChannelId} is not cached, returning default log channel",
|
||||
channelId
|
||||
);
|
||||
return GetDefaultLogChannel(guild, logChannelType);
|
||||
}
|
||||
|
||||
Snowflake? categoryId;
|
||||
if (
|
||||
|
|
@ -401,7 +407,13 @@ public class WebhookExecutorService(
|
|||
}
|
||||
|
||||
if (!channelCache.TryGet(channelId.Value, out var channel))
|
||||
return null;
|
||||
{
|
||||
_logger.Verbose(
|
||||
"Channel with ID {ChannelId} is not cached, returning default log channel",
|
||||
channelId
|
||||
);
|
||||
return GetDefaultLogChannel(guild, logChannelType);
|
||||
}
|
||||
|
||||
Snowflake? categoryId;
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue