Add Discord client, command router and voice channel handling

This commit is contained in:
2026-09-21 18:48:11 +02:00
parent c4757933e1
commit 347faf6b94
4 changed files with 155 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
package discord
import (
"log/slog"
"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/cache"
"github.com/disgoorg/disgo/gateway"
)
func NewClient(token string, logger *slog.Logger) (*bot.Client, error) {
return disgo.New(token,
bot.WithLogger(logger),
bot.WithGatewayConfigOpts(
gateway.WithIntents(
gateway.IntentGuilds,
gateway.IntentGuildVoiceStates,
),
),
bot.WithCacheConfigOpts(
cache.WithCaches(cache.FlagVoiceStates),
),
)
}