remove useless feature check

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-11-26 14:09:34 +00:00
parent 1e66f235b2
commit ba4a2b45b8

View file

@ -1,10 +1,4 @@
import { import { ChannelType, GuildTextThreadCreateOptions, ThreadAutoArchiveDuration, ThreadChannel } from "discord.js";
ChannelType,
GuildFeature,
GuildTextThreadCreateOptions,
ThreadAutoArchiveDuration,
ThreadChannel,
} from "discord.js";
import * as t from "io-ts"; import * as t from "io-ts";
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
import { MINUTES, convertDelayStringToMS, noop, tDelayString, tNullable } from "../../../utils"; import { MINUTES, convertDelayStringToMS, noop, tDelayString, tNullable } from "../../../utils";
@ -77,10 +71,7 @@ export const StartThreadAction = automodAction({
const threadOptions: GuildTextThreadCreateOptions<unknown> = { const threadOptions: GuildTextThreadCreateOptions<unknown> = {
name: threadName, name: threadName,
autoArchiveDuration: autoArchive, autoArchiveDuration: autoArchive,
startMessage: startMessage: !actionConfig.private ? threadContext.message!.id : undefined,
!actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
? threadContext.message!.id
: undefined,
}; };
let thread: ThreadChannel | undefined; let thread: ThreadChannel | undefined;