mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 09:35:02 +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 = [
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue