From 652ec1f2934b50f43819bc92ee70d9d95586a548 Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Sun, 13 Feb 2022 18:53:33 +0000 Subject: [PATCH] Docs: fix ClientConnect to recommend `SpeakingStateUpdate` --- examples/serenity/voice_receive/src/main.rs | 2 +- src/events/context/mod.rs | 6 +++--- src/events/core.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/serenity/voice_receive/src/main.rs b/examples/serenity/voice_receive/src/main.rs index fe5e689fe..f38989312 100644 --- a/examples/serenity/voice_receive/src/main.rs +++ b/examples/serenity/voice_receive/src/main.rs @@ -120,7 +120,7 @@ impl VoiceEventHandler for Receiver { // You can implement your own logic here to handle a user who has left the // voice channel e.g., finalise processing of statistics etc. // You will typically need to map the User ID to their SSRC; observed when - // speaking or connecting. + // first speaking. println!("Client disconnected: user {:?}", user_id); }, diff --git a/src/events/context/mod.rs b/src/events/context/mod.rs index 425d83176..6e37a8ce5 100644 --- a/src/events/context/mod.rs +++ b/src/events/context/mod.rs @@ -40,7 +40,7 @@ pub enum EventContext<'a> { RtcpPacket(RtcpData<'a>), #[deprecated( since = "0.2.2", - note = "ClientConnect events are no longer sent by Discord. Please use SpeakingUpdate or Discord gateway events." + note = "ClientConnect events are no longer sent by Discord. Please use SpeakingStateUpdate or Discord gateway events." )] /// Formerly fired whenever a client connects to a call for the first time, allowing SSRC/UserID /// matching. This event no longer fires. @@ -48,9 +48,9 @@ pub enum EventContext<'a> { /// To detect when a user connects, you must correlate gateway (e.g., VoiceStateUpdate) events /// from the main part of your bot. /// - /// To obtain a user's SSRC, you must use [`SpeakingUpdate`] events. + /// To obtain a user's SSRC, you must use [`SpeakingStateUpdate`] events. /// - /// [`SpeakingUpdate`]: Self::SpeakingUpdate + /// [`SpeakingStateUpdate`]: Self::SpeakingStateUpdate ClientConnect(ClientConnect), /// Fired whenever a client disconnects. ClientDisconnect(ClientDisconnect), diff --git a/src/events/core.rs b/src/events/core.rs index acec7a7d5..1ca67f20e 100644 --- a/src/events/core.rs +++ b/src/events/core.rs @@ -27,7 +27,7 @@ pub enum CoreEvent { RtcpPacket, #[deprecated( since = "0.2.2", - note = "ClientConnect events are no longer sent by Discord. Please use SpeakingUpdate or Discord gateway events." + note = "ClientConnect events are no longer sent by Discord. Please use SpeakingStateUpdate or Discord gateway events." )] /// Formerly fired whenever a client connects to a call for the first time, allowing SSRC/UserID /// matching. This event no longer fires. @@ -35,9 +35,9 @@ pub enum CoreEvent { /// To detect when a user connects, you must correlate gateway (e.g., VoiceStateUpdate) events /// from the main part of your bot. /// - /// To obtain a user's SSRC, you must use [`SpeakingUpdate`] events. + /// To obtain a user's SSRC, you must use [`SpeakingStateUpdate`] events. /// - /// [`SpeakingUpdate`]: Self::SpeakingUpdate + /// [`SpeakingStateUpdate`]: Self::SpeakingStateUpdate ClientConnect, /// Fires whenever a user disconnects from the same stream as the bot. ClientDisconnect,