bumped to cchat v0.5.4

This commit is contained in:
diamondburned 2021-03-18 10:12:31 -07:00
parent 36886b0cad
commit 71f2e15704
8 changed files with 15 additions and 1 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.4
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

2
go.sum
View File

@ -31,6 +31,8 @@ github.com/diamondburned/cchat v0.5.0 h1:+3+Rc0GnumLUJ9+GyJPRt6SVuH9vVp7B6hrHf8H
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.4 h1:0N/H+zs4T6YBOP5dtUnJ+paZfq06772b5CXRw7bWx7U=
github.com/diamondburned/cchat v0.5.4/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() int { return 2 }
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() int { return 2 }
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() int { return 1 }
// 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() int { return 1 }
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() int { return 2 }
// 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() int { return 1 }
func (priv Private) AsLister() cchat.Lister { return priv }
type activeChannel struct {