mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(thread): v13 add newlyCreated to threadCreate event (#7481)
This commit is contained in:
@@ -13,8 +13,9 @@ class ThreadCreateAction extends Action {
|
|||||||
* Emitted whenever a thread is created or when the client user is added to a thread.
|
* Emitted whenever a thread is created or when the client user is added to a thread.
|
||||||
* @event Client#threadCreate
|
* @event Client#threadCreate
|
||||||
* @param {ThreadChannel} thread The thread that was created
|
* @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 };
|
return { thread };
|
||||||
}
|
}
|
||||||
|
|||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -3969,7 +3969,7 @@ export interface ClientEvents extends BaseClientEvents {
|
|||||||
roleCreate: [role: Role];
|
roleCreate: [role: Role];
|
||||||
roleDelete: [role: Role];
|
roleDelete: [role: Role];
|
||||||
roleUpdate: [oldRole: Role, newRole: Role];
|
roleUpdate: [oldRole: Role, newRole: Role];
|
||||||
threadCreate: [thread: ThreadChannel];
|
threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
|
||||||
threadDelete: [thread: ThreadChannel];
|
threadDelete: [thread: ThreadChannel];
|
||||||
threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
|
threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
|
||||||
threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
|
threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
|
||||||
|
|||||||
Reference in New Issue
Block a user