mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
update djs
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
c4a2be5ff5
commit
43076b3db6
3 changed files with 122 additions and 182 deletions
|
@ -57,7 +57,13 @@ 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) continue;
|
||||
if (
|
||||
!channel ||
|
||||
!("threads" in channel) ||
|
||||
channel.type === ChannelType.GuildForum ||
|
||||
channel.type === ChannelType.GuildMedia
|
||||
)
|
||||
continue;
|
||||
|
||||
const renderThreadName = async (str: string) =>
|
||||
renderTemplate(
|
||||
|
@ -90,10 +96,7 @@ export const StartThreadAction = automodAction({
|
|||
.create({
|
||||
...threadOptions,
|
||||
type: actionConfig.private ? ChannelType.PrivateThread : ChannelType.PublicThread,
|
||||
startMessage:
|
||||
!actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads)
|
||||
? threadContext.message!.id
|
||||
: undefined,
|
||||
startMessage: !actionConfig.private ? threadContext.message!.id : undefined,
|
||||
})
|
||||
.catch(() => undefined);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue