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:
parent
a36ef9c22e
commit
3e7a45d0e7
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue