Documentation
¶
Index ¶
- Constants
- func RenderAlertTemplate(ChannelID types.DiscordChannelID, Msg string, api *apis.API, opts ...AlertOpt) types.ViewHeader
- func TagContains(name string, tags []types.Tag) bool
- type Alert
- type AlertOpt
- type OriginalRenderer
- type SharedViewTableSplitter
- func (t *SharedViewTableSplitter) DiscoverMessageID(content string, msgID types.DiscordMessageID, RequiresRecreate bool)
- func (s *SharedViewTableSplitter) GetAPI() *apis.API
- func (t *SharedViewTableSplitter) MatchMessageID(messageID types.DiscordMessageID) bool
- func (t *SharedViewTableSplitter) RenderView() error
- func (t *SharedViewTableSplitter) Send()
- type TemplateAlertInput
- type View
- type ViewHeader
- type ViewTable
Constants ¶
View Source
const DiscordMsgLimit = 2000 - 150
View Source
const (
MsgViewHeader = "#darkbot-announcement"
)
Variables ¶
This section is empty.
Functions ¶
func RenderAlertTemplate ¶
func RenderAlertTemplate(ChannelID types.DiscordChannelID, Msg string, api *apis.API, opts ...AlertOpt) types.ViewHeader
Types ¶
type Alert ¶ added in v1.17.0
type Alert struct {
PingMessage types.PingMessage
}
type AlertOpt ¶ added in v1.17.0
type AlertOpt func(a *Alert)
func WithAlertOverride ¶ added in v1.17.0
type OriginalRenderer ¶
type OriginalRenderer interface {
GenerateRecords() error
}
type SharedViewTableSplitter ¶
type SharedViewTableSplitter struct {
// contains filtered or unexported fields
}
func NewSharedViewSplitter ¶
func NewSharedViewSplitter( api *apis.API, channelID types.DiscordChannelID, original_view OriginalRenderer, sh_templates ...*ViewTable, ) *SharedViewTableSplitter
func (*SharedViewTableSplitter) DiscoverMessageID ¶
func (t *SharedViewTableSplitter) DiscoverMessageID(content string, msgID types.DiscordMessageID, RequiresRecreate bool)
Time comlexity: Must be called only after Generate()
func (*SharedViewTableSplitter) GetAPI ¶
func (s *SharedViewTableSplitter) GetAPI() *apis.API
func (*SharedViewTableSplitter) MatchMessageID ¶
func (t *SharedViewTableSplitter) MatchMessageID(messageID types.DiscordMessageID) bool
Time Complexity: Must be called only after DiscoverMessageID
func (*SharedViewTableSplitter) RenderView ¶
func (t *SharedViewTableSplitter) RenderView() error
func (*SharedViewTableSplitter) Send ¶
func (t *SharedViewTableSplitter) Send()
type TemplateAlertInput ¶
type TemplateAlertInput struct {
PingMessage types.PingMessage
Msg string
}
type View ¶
type View interface {
DiscoverMessageID(content string, msgID types.DiscordMessageID, RequiresRecreate bool)
RenderView() error
Send()
MatchMessageID(messageID types.DiscordMessageID) bool
}
type ViewHeader ¶
type ViewHeader string
type ViewTable ¶
type ViewTable struct {
// contains filtered or unexported fields
}
func NewViewTable ¶
func NewViewTable(msgShared *viewer_msg.MsgShared) *ViewTable
func (*ViewTable) AppendRecord ¶
func (v *ViewTable) AppendRecord(record types.ViewRecord)
func (*ViewTable) GetMsgs ¶
func (v *ViewTable) GetMsgs() []*viewer_msg.Msg
func (*ViewTable) HasRecords ¶
func (*ViewTable) RecordCount ¶
func (*ViewTable) SetHeader ¶
func (v *ViewTable) SetHeader(header types.ViewHeader)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.