Compare commits
3 Commits
36886b0cad
...
ba43f691bc
Author | SHA1 | Date |
---|---|---|
diamondburned | ba43f691bc | |
diamondburned | 9dc28023da | |
diamondburned | 71f2e15704 |
2
go.mod
2
go.mod
|
@ -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
6
go.sum
|
@ -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=
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue