Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/gateway/client/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ fn update_cache_with_event(

FullEvent::ThreadCreate {
thread: event.thread,
newly_created: event.newly_created,
}
},
Event::ThreadUpdate(mut event) => {
Expand Down
4 changes: 2 additions & 2 deletions src/gateway/client/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ event_handler! {

/// Dispatched when a thread is created or the current user is added to a private thread.
///
/// Provides the thread.
ThreadCreate { thread: GuildChannel } => async fn thread_create(&self, ctx: Context);
/// Provides the thread and if the thread was newly created.
ThreadCreate { thread: GuildChannel, newly_created: Option<bool> } => async fn thread_create(&self, ctx: Context);

/// Dispatched when a thread is updated.
///
Expand Down
3 changes: 2 additions & 1 deletion src/model/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,10 +861,11 @@ pub struct StageInstanceDeleteEvent {
/// [Discord docs](https://discord.com/developers/docs/topics/gateway-events#thread-create).
#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(transparent)]
#[non_exhaustive]
pub struct ThreadCreateEvent {
#[serde(flatten)]
pub thread: GuildChannel,
pub newly_created: Option<bool>,
}

/// Requires [`GatewayIntents::GUILDS`].
Expand Down
Loading