Compare commits

...

3 Commits

Author SHA1 Message Date
diamondburned ba43f691bc bumped cchat 2021-03-18 14:27:24 -07:00
diamondburned 9dc28023da bumped cchat 2021-03-18 12:43:07 -07:00
diamondburned 71f2e15704 bumped to cchat v0.5.4 2021-03-18 10:12:31 -07:00
9 changed files with 17 additions and 5 deletions

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.1
github.com/diamondburned/cchat v0.5.6
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

6
go.sum
View File

@ -27,10 +27,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/diamondburned/arikawa/v2 v2.0.0-20210101083335-169b36126239/go.mod h1:e+lhS20ni2luFEU06Pc8paCxgZL99/RZb77dOC82CF0=
github.com/diamondburned/arikawa/v2 v2.0.5 h1:X/jPfeEFj/Hzk26kudNJqtVkQb3vnh3tAjEF1mY7GK8=
github.com/diamondburned/arikawa/v2 v2.0.5/go.mod h1:e+lhS20ni2luFEU06Pc8paCxgZL99/RZb77dOC82CF0=
github.com/diamondburned/cchat v0.5.0 h1:+3+Rc0GnumLUJ9+GyJPRt6SVuH9vVp7B6hrHf8HsDKI=
github.com/diamondburned/cchat v0.5.0/go.mod h1:IlMtF+XIvAJh0GL/2yFdf0/34w+Hdy5A1GgvSwAXtQI=
github.com/diamondburned/cchat v0.5.1 h1:Ju34nv0tbLaWfm+LtyUA4TPlX7206eXo6LM+3JzosQo=
github.com/diamondburned/cchat v0.5.1/go.mod h1:IlMtF+XIvAJh0GL/2yFdf0/34w+Hdy5A1GgvSwAXtQI=
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/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

@ -80,6 +80,8 @@ func (c *Category) Name(_ context.Context, l cchat.LabelContainer) (func(), erro
return c.state.Labels.AddChannelLabel(c.id, l), nil
}
func (c *Category) Columnate() bool { return false }
func (c *Category) AsLister() cchat.Lister { return c }
func (c *Category) Servers(container cchat.ServersContainer) (func(), error) {

View File

@ -57,6 +57,8 @@ func (ch Channel) Name(_ context.Context, l cchat.LabelContainer) (func(), error
return ch.State.Labels.AddChannelLabel(ch.Channel.ID, l), nil
}
func (ch Channel) Columnate() bool { return false }
func (ch Channel) AsCommander() cchat.Commander {
return ch.commander
}

View File

@ -60,6 +60,8 @@ func (gf *GuildFolder) Name(ctx context.Context, l cchat.LabelContainer) (func()
return func() {}, nil
}
func (gf *GuildFolder) Columnate() bool { return false }
// IsLister returns true.
func (gf *GuildFolder) AsLister() cchat.Lister { return gf }

View File

@ -48,6 +48,8 @@ func (g *Guild) Name(ctx context.Context, l cchat.LabelContainer) (func(), error
return g.state.Labels.AddGuildLabel(g.id, l), nil
}
func (g *Guild) Columnate() bool { return true }
func (g *Guild) AsLister() cchat.Lister { return g }
func (g *Guild) Servers(container cchat.ServersContainer) (func(), error) {

View File

@ -143,6 +143,8 @@ func (hub *Server) Name(_ context.Context, l cchat.LabelContainer) (func(), erro
return func() {}, nil
}
func (hub *Server) Columnate() bool { return false }
// ActiveChannelIDs returns the list of active channel IDs, that is, the channel
// IDs that should be displayed separately.
func (hub *Server) ActiveChannelIDs() []discord.ChannelID {

View File

@ -96,6 +96,8 @@ func (priv Private) Name(_ context.Context, l cchat.LabelContainer) (func(), err
return func() {}, nil
}
func (priv Private) Columnate() bool { return true }
func (priv Private) AsLister() cchat.Lister { return priv }
type activeChannel struct {

View File

@ -45,6 +45,8 @@ 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) Disconnect() error {
return s.state.CloseGracefully()
}