3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-12 21:05:02 +00:00

Thread fixes

This commit is contained in:
Dragory 2021-08-18 20:47:24 +03:00
parent d109a58cb7
commit 0e7cf9715f
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
5 changed files with 18 additions and 11 deletions

View file

@ -1,4 +1,4 @@
import { Snowflake, TextChannel } from "discord.js";
import { Snowflake, TextChannel, ThreadChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
import { disableUserNotificationStrings, UserNotificationMethod } from "../../../utils";
@ -19,7 +19,7 @@ export function resolveActionContactMethods(
}
const channel = pluginData.guild.channels.cache.get(actionConfig.notifyChannel as Snowflake);
if (!(channel instanceof TextChannel)) {
if (!(channel instanceof TextChannel || channel instanceof ThreadChannel)) {
throw new RecoverablePluginError(ERRORS.INVALID_USER_NOTIFICATION_CHANNEL);
}