Docs: fix ClientConnect to recommend SpeakingStateUpdate

This commit is contained in:
Kyle Simpson
2022-02-13 18:53:33 +00:00
parent c464fcc38d
commit 652ec1f293
3 changed files with 7 additions and 7 deletions

View File

@@ -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),

View File

@@ -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,