mirror of
https://github.com/diamondburned/cchat-discord.git
synced 2024-11-27 00:22:55 +00:00
37 lines
784 B
Go
37 lines
784 B
Go
package discord
|
|
|
|
import (
|
|
"github.com/diamondburned/cchat"
|
|
"github.com/diamondburned/cchat-discord/internal/discord/authenticate"
|
|
"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
|
|
}
|