You are reading the documentation for the
next
version of discord.js. Documentation for v13/v14+ has been moved to
old.discordjs.dev
/
docs
/
packages
/
voice
/
main
/
SpeakingMap%3AClass
Search...
K
voice
discord.js
brokers
builders
collection
core
formatters
next
proxy
rest
util
voice
ws
main
Classes
AudioPlayer
AudioPlayerError
AudioReceiveStream
AudioResource
PlayerSubscription
SpeakingMap
SSRCMap
VoiceConnection
VoiceReceiver
Functions
createAudioPlayer
createAudioResource
createDefaultAudioReceiveStreamOptions
demuxProbe
entersState
generateDependencyReport
getGroups
getVoiceConnection
getVoiceConnections
joinVoiceChannel
validateDiscordOpusHead
Enums
AudioPlayerStatus
EndBehaviorType
NoSubscriberBehavior
StreamType
VoiceConnectionDisconnectReason
VoiceConnectionStatus
Interfaces
AudioPlayer
AudioPlayerBufferingState
AudioPlayerIdleState
AudioPlayerPausedState
AudioPlayerPlayingState
AudioReceiveStreamOptions
CreateAudioPlayerOptions
CreateAudioResourceOptions
CreateVoiceConnectionOptions
DiscordGatewayAdapterImplementerMethods
DiscordGatewayAdapterLibraryMethods
JoinConfig
JoinVoiceChannelOptions
ProbeInfo
SpeakingMap
SSRCMap
VoiceConnection
VoiceConnectionConnectingState
VoiceConnectionDestroyedState
VoiceConnectionDisconnectedBaseState
VoiceConnectionDisconnectedOtherState
VoiceConnectionDisconnectedWebSocketState
VoiceConnectionReadyState
VoiceConnectionSignallingState
VoiceUserData
Types
AudioPlayerState
DiscordGatewayAdapterCreator
EndBehavior
VoiceConnectionDisconnectedState
VoiceConnectionState
Variables
version
SpeakingMap
export declare class
SpeakingMap
extends
EventEmitter
export declare class
SpeakingMap
extends
EventEmitter
Summary
Tracks the speaking states of users in a voice channel.
Extends
EventEmitter
Constructor
constructor()
Constructs a new instance of the
SpeakingMap
class
Name
Type
Optional
Description
Properties
Static
Readonly
DELAY
:
The delay after a packet is received from a user until they're marked as not speaking anymore.
Readonly
users
:
Map<string, number>
The currently speaking users, mapped to the milliseconds since UNIX epoch at which they started speaking.
Methods
onPacket(userId)
:
void
Name
Type
Optional
Description
userId
string
No
None
Overload 1
of 2
Overload 1
Overload 2
on(event, listener)
:
this
Emitted when a user starts speaking.
Name
Type
Optional
Description
event
'start'
No
None
listener
(userId: string) => void
No
None