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

better startThread if checks (almeida is happy)

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-11-26 16:12:57 +00:00
parent 89d6e8aeec
commit e0637a206f

View file

@ -50,13 +50,7 @@ export const StartThreadAction = automodAction({
for (const threadContext of threads) {
const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id);
if (
!channel ||
!("threads" in channel) ||
channel.type === ChannelType.GuildForum ||
channel.type === ChannelType.GuildMedia
)
continue;
if (!channel || !("threads" in channel) || channel.isThreadOnly()) continue;
const renderThreadName = async (str: string) =>
renderTemplate(