2026-02-20 15:25:44 +00:00
|
|
|
package discord
|
|
|
|
|
|
|
|
|
|
import (
|
2026-04-01 04:21:21 +00:00
|
|
|
"github.com/sipeed/picoclaw/pkg/audio/tts"
|
2026-02-20 15:25:44 +00:00
|
|
|
"github.com/sipeed/picoclaw/pkg/bus"
|
|
|
|
|
"github.com/sipeed/picoclaw/pkg/channels"
|
|
|
|
|
"github.com/sipeed/picoclaw/pkg/config"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
channels.RegisterFactory("discord", func(cfg *config.Config, b *bus.MessageBus) (channels.Channel, error) {
|
2026-04-01 04:21:21 +00:00
|
|
|
ch, err := NewDiscordChannel(cfg.Channels.Discord, b)
|
|
|
|
|
if err == nil {
|
|
|
|
|
ch.tts = tts.DetectTTS(cfg)
|
|
|
|
|
}
|
|
|
|
|
return ch, err
|
2026-02-20 15:25:44 +00:00
|
|
|
})
|
|
|
|
|
}
|