3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 01:25:02 +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 = [ const threadCount = [
...channel.threads.cache ...channel.threads.cache
.filter( .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(), .keys(),
].length; // very short line, yes yes ].length; // very short line, yes yes