Docs: fix ClientConnect to recommend SpeakingStateUpdate
This commit is contained in:
@@ -120,7 +120,7 @@ impl VoiceEventHandler for Receiver {
|
|||||||
// You can implement your own logic here to handle a user who has left the
|
// You can implement your own logic here to handle a user who has left the
|
||||||
// voice channel e.g., finalise processing of statistics etc.
|
// voice channel e.g., finalise processing of statistics etc.
|
||||||
// You will typically need to map the User ID to their SSRC; observed when
|
// 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);
|
println!("Client disconnected: user {:?}", user_id);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pub enum EventContext<'a> {
|
|||||||
RtcpPacket(RtcpData<'a>),
|
RtcpPacket(RtcpData<'a>),
|
||||||
#[deprecated(
|
#[deprecated(
|
||||||
since = "0.2.2",
|
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
|
/// Formerly fired whenever a client connects to a call for the first time, allowing SSRC/UserID
|
||||||
/// matching. This event no longer fires.
|
/// 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
|
/// To detect when a user connects, you must correlate gateway (e.g., VoiceStateUpdate) events
|
||||||
/// from the main part of your bot.
|
/// 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),
|
ClientConnect(ClientConnect),
|
||||||
/// Fired whenever a client disconnects.
|
/// Fired whenever a client disconnects.
|
||||||
ClientDisconnect(ClientDisconnect),
|
ClientDisconnect(ClientDisconnect),
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ pub enum CoreEvent {
|
|||||||
RtcpPacket,
|
RtcpPacket,
|
||||||
#[deprecated(
|
#[deprecated(
|
||||||
since = "0.2.2",
|
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
|
/// Formerly fired whenever a client connects to a call for the first time, allowing SSRC/UserID
|
||||||
/// matching. This event no longer fires.
|
/// 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
|
/// To detect when a user connects, you must correlate gateway (e.g., VoiceStateUpdate) events
|
||||||
/// from the main part of your bot.
|
/// 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,
|
||||||
/// Fires whenever a user disconnects from the same stream as the bot.
|
/// Fires whenever a user disconnects from the same stream as the bot.
|
||||||
ClientDisconnect,
|
ClientDisconnect,
|
||||||
|
|||||||
Reference in New Issue
Block a user