mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-30 18:53:30 +00:00
diamondburned
b8994ed0da
This commit gets rid of all the code that previously managed different voice sessions in different guilds. This is because there is rarely ever a need for this, and most bots that need this could do their own keeping. This change, although removes some features off of the package, adds a lot of clarity on what to do exactly when it comes to connecting to a voice channel. In order to make the migration process a bit easier, an example has been added which guides through using the voice.Session API.
15 lines
517 B
Go
15 lines
517 B
Go
// Package voice handles the Discord voice gateway and UDP connections. It does
|
|
// not handle book-keeping of those sessions.
|
|
//
|
|
// This package abstracts the subpackage voice/voicesession and voice/udp.
|
|
package voice
|
|
|
|
import "github.com/diamondburned/arikawa/v2/gateway"
|
|
|
|
// AddIntents adds the needed voice intents into gw. Bots should always call
|
|
// this before Open if voice is required.
|
|
func AddIntents(gw *gateway.Gateway) {
|
|
gw.AddIntents(gateway.IntentGuilds)
|
|
gw.AddIntents(gateway.IntentGuildVoiceStates)
|
|
}
|