1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-discord.git synced 2024-11-27 00:22:55 +00:00
cchat-discord/discord.go

37 lines
784 B
Go
Raw Normal View History

2020-09-08 04:44:09 +00:00
package discord
import (
"github.com/diamondburned/cchat"
2020-10-07 01:53:15 +00:00
"github.com/diamondburned/cchat-discord/internal/discord/authenticate"
2020-09-08 04:44:09 +00:00
"github.com/diamondburned/cchat-discord/internal/discord/session"
"github.com/diamondburned/cchat/services"
"github.com/diamondburned/cchat/text"
2020-10-07 01:53:15 +00:00
"github.com/diamondburned/cchat/utils/empty"
2020-09-08 04:44:09 +00:00
)
2020-10-07 01:53:15 +00:00
var service cchat.Service = Service{}
2020-09-08 04:44:09 +00:00
func init() {
2020-10-07 01:53:15 +00:00
services.RegisterService(service)
2020-09-08 04:44:09 +00:00
}
2020-10-07 01:53:15 +00:00
type Service struct {
empty.Service
}
2020-09-08 04:44:09 +00:00
func (Service) Name() text.Rich {
return text.Rich{Content: "Discord"}
}
2020-10-27 05:04:55 +00:00
func (Service) Authenticate() []cchat.Authenticator {
return authenticate.FirstStageAuthenticators()
2020-09-08 04:44:09 +00:00
}
2020-10-07 01:53:15 +00:00
func (Service) AsIconer() cchat.Iconer {
return Logo
2020-09-08 04:44:09 +00:00
}
2020-10-07 01:53:15 +00:00
func (Service) AsSessionRestorer() cchat.SessionRestorer {
return session.Restorer
2020-09-08 04:44:09 +00:00
}