mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-12 21:05:02 +00:00
Thread fixes
This commit is contained in:
parent
d109a58cb7
commit
0e7cf9715f
5 changed files with 18 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue