feat(thread): v13 add newlyCreated to threadCreate event (#7481)

This commit is contained in:
Jiralite
2022-02-20 12:42:23 +00:00
committed by GitHub
parent 0b54089c43
commit 2b3db734df
2 changed files with 3 additions and 2 deletions

View File

@@ -13,8 +13,9 @@ class ThreadCreateAction extends Action {
* Emitted whenever a thread is created or when the client user is added to a thread.
* @event Client#threadCreate
* @param {ThreadChannel} thread The thread that was created
* @param {boolean} newlyCreated Whether the thread was newly created
*/
client.emit(Events.THREAD_CREATE, thread);
client.emit(Events.THREAD_CREATE, thread, data.newly_created ?? false);
}
return { thread };
}