3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-24 10:05:03 +00:00

fix(slowmode): fix error if the slowmode channel isn't cached

This commit is contained in:
Dragory 2021-10-17 11:31:32 +03:00
parent 4647e22224
commit 35763edb7c

View file

@ -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) {