Skip to content

Extending the Module

Cody Swendrowski edited this page Dec 31, 2019 · 1 revision

Hooks

discord-userspeaking

Fires whenever the user starts / stops speaking in the GameSDK. Delivers both a string DiscordId and a bool IsSpeaking.

Example:

Hooks.on('discord-userspeaking', (discordId, isSpeaking) => {
    console.log(discordId + "is currently speaking?: " + isSpeaking);
}

Flags

All flags may not exist, make sure you check first!

User

discord-rich-presence.avatar - A string of the base64 encoded image of the User's Discord avatar discord-rich-presence.muted - A bool of if the user is currently muted (can't speak) in Voice discord-rich-presence.deafened - A bool of if the user is currently deafened (can't hear) in Voice discord-rich-presence.connected - A bool of if the user is currently connected to Voice discord-rich-presence.discordId - A string of the User's Discord Id

Clone this wiki locally