fix(slowmode): fix error if the slowmode channel isn't cached
This commit is contained in:
parent
151a5df4af
commit
0f465ffa2b
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ export async function applyBotSlowmodeToUserId(
|
|||
userId: string,
|
||||
) {
|
||||
// Deny sendMessage permission from the user. If there are existing permission overwrites, take those into account.
|
||||
const existingOverride = channel.permissionOverwrites.resolve(userId as Snowflake);
|
||||
const existingOverride = channel.permissionOverwrites?.resolve(userId as Snowflake);
|
||||
try {
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.CHANNEL_UPDATE, channel.id, 5 * 1000);
|
||||
if (existingOverride) {
|
||||
|
|
Loading…
Add table
Reference in a new issue