Compare commits

...

2 Commits

Author SHA1 Message Date
diamondburned 18eb608146 bumped cchat 2021-03-19 22:17:19 -07:00
diamondburned f3e0d38c38 bumped cchat 2021-03-19 17:00:32 -07:00
5 changed files with 12 additions and 3 deletions

View File

@ -13,6 +13,9 @@ import (
"github.com/diamondburned/cchat/utils/empty"
)
// ID is the unique ID of this cchat service.
const ID = "com.github.diamondburned.cchat-discord"
var service cchat.Service = Service{}
func init() {
@ -31,6 +34,8 @@ type Service struct {
empty.Service
}
func (Service) ID() string { return ID }
func (Service) Name(_ context.Context, l cchat.LabelContainer) (func(), error) {
l.SetLabel(text.Rich{
Content: "Discord",

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.14
require (
github.com/diamondburned/arikawa/v2 v2.0.5
github.com/diamondburned/cchat v0.5.6
github.com/diamondburned/cchat v0.6.1
github.com/diamondburned/ningen/v2 v2.0.0-20210106052055-9da2a0102d49
github.com/dustin/go-humanize v1.0.0
github.com/go-test/deep v1.0.7

4
go.sum
View File

@ -29,6 +29,10 @@ github.com/diamondburned/arikawa/v2 v2.0.5 h1:X/jPfeEFj/Hzk26kudNJqtVkQb3vnh3tAj
github.com/diamondburned/arikawa/v2 v2.0.5/go.mod h1:e+lhS20ni2luFEU06Pc8paCxgZL99/RZb77dOC82CF0=
github.com/diamondburned/cchat v0.5.5 h1:YgI98ID9UQAgHbLFEyHQ2qcAJ5A2HcVZaq+A26njAQo=
github.com/diamondburned/cchat v0.5.5/go.mod h1:IlMtF+XIvAJh0GL/2yFdf0/34w+Hdy5A1GgvSwAXtQI=
github.com/diamondburned/cchat v0.6.0 h1:XVql8slOho9FUxuJm/I7/XWr5l1XgxLc5SvcvI+ybp4=
github.com/diamondburned/cchat v0.6.0/go.mod h1:IlMtF+XIvAJh0GL/2yFdf0/34w+Hdy5A1GgvSwAXtQI=
github.com/diamondburned/cchat v0.6.1 h1:BFpY2Nvnut1/X+0dhL8STK80RVmfEJLmf4ppTJX2ADg=
github.com/diamondburned/cchat v0.6.1/go.mod h1:IlMtF+XIvAJh0GL/2yFdf0/34w+Hdy5A1GgvSwAXtQI=
github.com/diamondburned/ningen/v2 v2.0.0-20210106052055-9da2a0102d49 h1:wfj+fvDJLUC+xkRmVA/ZE9nmeSqFy4fbyIi3hBHgn/U=
github.com/diamondburned/ningen/v2 v2.0.0-20210106052055-9da2a0102d49/go.mod h1:WRQCUX/dTH4OPEy3JANLA5D6fbumzp5zk03uSUAZppA=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=

View File

@ -23,6 +23,6 @@ func NewUserNicknamer(userID discord.UserID, ch shared.Channel) cchat.Nicknamer
return nicknamer{userID, ch}
}
func (nn nicknamer) Nickname(ctx context.Context, labeler cchat.LabelContainer) (func(), error) {
func (nn nicknamer) Name(ctx context.Context, labeler cchat.LabelContainer) (func(), error) {
return nn.State.Labels.AddMemberLabel(nn.GuildID, nn.userID, labeler), nil
}

View File

@ -45,7 +45,7 @@ func (s *Session) Name(ctx context.Context, l cchat.LabelContainer) (func(), err
return s.state.Labels.AddPresenceLabel(s.state.UserID, l), nil
}
func (s *Session) Columnate() int { return 0 }
func (s *Session) Columnate() bool { return false }
func (s *Session) Disconnect() error {
return s.state.CloseGracefully()