viewer_msg

package
v1.18.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 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 AlertMsgOpt added in v1.17.0

type AlertMsgOpt func(m *MsgShared)

func WithBeginning added in v1.17.0

func WithBeginning(input string) AlertMsgOpt

func WithEnd added in v1.17.0

func WithEnd(input string) AlertMsgOpt

func WithHeader added in v1.17.0

func WithHeader(input string) AlertMsgOpt

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)

func (*Msg) SetRequiresRecreate added in v1.17.0

func (m *Msg) SetRequiresRecreate(RequiresRecreate bool)

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,
	opts ...AlertMsgOpt,
) *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