Documentation ¶
Index ¶
- type Category
- type ChannelServersToPost
- type GroupBy
- type Plugin
- func (p *Plugin) Action(event *events.Event) bool
- func (p *Plugin) Help() *common.PluginHelp
- func (p *Plugin) Names() []string
- func (p *Plugin) Passthrough() bool
- func (p *Plugin) Priority() int
- func (p *Plugin) Start(params common.StartParameters) error
- func (p *Plugin) Stop(params common.StopParameters) error
- type QueueMessage
- type Server
- func (s *Server) ApplyChange(p *Plugin, change ServerChange) error
- func (s *Server) Censor(p *Plugin, reason string) error
- func (s *Server) Edit(p *Plugin, changes ServerChange) error
- func (s *Server) Hide(p *Plugin) error
- func (s *Server) QueueApprove(p *Plugin) error
- func (s *Server) QueueReject(p *Plugin, reason string) error
- func (s *Server) Remove(p *Plugin, editor bool) error
- func (*Server) TableName() string
- func (s *Server) Uncensor(p *Plugin) error
- func (s *Server) Unhide(p *Plugin) error
- func (s *Server) Update(p *Plugin, update Server) error
- type ServerCategory
- type ServerChange
- type ServerToPost
- type ServersSorter
- type SortBy
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type ChannelServersToPost ¶
type ChannelServersToPost struct { ChannelID string Servers []*ServerToPost Category *Category SortBy []SortBy }
type GroupBy ¶
type GroupBy string
const (
GroupByAlphabet GroupBy = "alphabetical"
)
func (*GroupBy) ChannelName ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Help ¶
func (p *Plugin) Help() *common.PluginHelp
func (*Plugin) Passthrough ¶
type QueueMessage ¶
type QueueMessage struct { CurrentServerID uint MessageID string Embed *discordgo.MessageEmbed }
type Server ¶
type Server struct { gorm.Model Names pq.StringArray `gorm:"type:varchar[]"` Description string InviteCode string GuildID string EditorUserIDs pq.StringArray `gorm:"type:varchar[]"` Categories []ServerCategory TotalMembers int State State Reason string LastChecked time.Time BotID string Change ServerChange `gorm:"embedded;embedded_prefix:change_"` }
func (*Server) ApplyChange ¶
func (s *Server) ApplyChange(p *Plugin, change ServerChange) error
func (*Server) QueueApprove ¶
type ServerCategory ¶
func (*ServerCategory) TableName ¶
func (*ServerCategory) TableName() string
type ServerChange ¶
type ServerChange struct { Names pq.StringArray `gorm:"type:varchar[]"` Description string InviteCode string Categories pq.Int64Array `gorm:"type:integer[]"` // TODO: uint array State State }
type ServerToPost ¶
type ServersSorter ¶
type ServersSorter struct { SortBy []SortBy Servers []*ServerToPost }
func (ServersSorter) Len ¶
func (s ServersSorter) Len() int
func (ServersSorter) Less ¶
func (s ServersSorter) Less(i, j int) bool
func (ServersSorter) Swap ¶
func (s ServersSorter) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.