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

check thread is deleted

This commit is contained in:
metal 2021-08-31 14:07:06 +00:00 committed by GitHub
parent a36ef9c22e
commit 3e7a45d0e7

View file

@ -31,7 +31,11 @@ export const StartThreadAction = automodAction({
const threadCount = [
...channel.threads.cache
.filter(
tr => tr.ownerId === pluginData.client.application!.id && !tr.archived && tr.parentId === channel.id,
tr =>
tr.ownerId === pluginData.client.application!.id &&
!tr.deleted &&
!tr.archived &&
tr.parentId === channel.id,
)
.keys(),
].length; // very short line, yes yes