viewer_msg

package
v1.6.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgAlert viewType = iota
	MsgTable
)

Variables

This section is empty.

Functions

func CheckTooLongMsgErr

func CheckTooLongMsgErr(err error, api *apis.API, channeID types.DiscordChannelID, header types.ViewEnumeratedID, action MsgAction, MessageID types.DiscordMessageID)

func LogusMsg

func LogusMsg(value *Msg) typelog.LogType

Types

type Msg

type Msg struct {
	*MsgShared
	// contains filtered or unexported fields
}

func NewMsg

func NewMsg(msgShared *MsgShared, number int, channelID types.DiscordChannelID) *Msg

func (*Msg) AppendRecordToMsg

func (m *Msg) AppendRecordToMsg(record *types.ViewRecord)

func (*Msg) GetMessageID

func (m *Msg) GetMessageID() types.DiscordMessageID

func (*Msg) GetViewEnumeratedID

func (m *Msg) GetViewEnumeratedID() types.ViewEnumeratedID

func (*Msg) HasRecords

func (m *Msg) HasRecords() bool

func (*Msg) Len

func (m *Msg) Len() int

func (*Msg) Render

func (v *Msg) Render() string

func (*Msg) Send

func (v *Msg) Send(api *apis.API)

func (*Msg) SetMessageID

func (m *Msg) SetMessageID(messagID types.DiscordMessageID)

type MsgAction

type MsgAction int
const (
	ActSend MsgAction = iota
	ActEdit
)

type MsgShared

type MsgShared struct {
	// contains filtered or unexported fields
}

func NewAlertMsg

func NewAlertMsg(
	viewID types.ViewID,
) *MsgShared

func NewTableMsg

func NewTableMsg(
	viewID types.ViewID,
	viewHeader types.ViewHeader,
	viewBeginning types.ViewBeginning,
	viewEnd types.ViewEnd,
) *MsgShared

func (*MsgShared) GetTimestamp

func (m *MsgShared) GetTimestamp() types.ViewTimeStamp

func (*MsgShared) GetViewID

func (m *MsgShared) GetViewID() types.ViewID

func (*MsgShared) LenShared

func (m *MsgShared) LenShared() int

func (*MsgShared) SetHeader

func (v *MsgShared) SetHeader(header types.ViewHeader)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL