1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-discord.git synced 2024-11-22 14:12:47 +00:00
cchat-discord/discord.go
2021-01-01 20:07:11 -08:00

42 lines
927 B
Go

package discord
import (
"github.com/diamondburned/cchat"
"github.com/diamondburned/cchat-discord/internal/discord/authenticate"
"github.com/diamondburned/cchat-discord/internal/discord/config"
"github.com/diamondburned/cchat-discord/internal/discord/session"
"github.com/diamondburned/cchat/services"
"github.com/diamondburned/cchat/text"
"github.com/diamondburned/cchat/utils/empty"
)
var service cchat.Service = Service{}
func init() {
services.RegisterService(service)
}
type Service struct {
empty.Service
}
func (Service) Name() text.Rich {
return text.Rich{Content: "Discord"}
}
func (Service) Authenticate() []cchat.Authenticator {
return authenticate.FirstStageAuthenticators()
}
func (Service) AsIconer() cchat.Iconer {
return Logo
}
func (Service) AsSessionRestorer() cchat.SessionRestorer {
return session.Restorer
}
func (Service) AsConfigurator() cchat.Configurator {
return config.World
}