message

package
v0.0.0-...-fa0c35c Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAtMembersFromRawContent

func GetAtMembersFromRawContent(rawContent string, skip int) (members []string)

Types

type Emoji

type Emoji = string

func GetEmojiFormKeyword

func GetEmojiFormKeyword(keyword string) (emoji Emoji, exist bool)

type EmojiConfig

type EmojiConfig struct {
	Keyword string `yaml:"keyword"`
	Emoji   Emoji  `yaml:"emoji_id"`
}

type ImageMessage

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

func NewImageMessage

func NewImageMessage() *ImageMessage

func (*ImageMessage) Build

func (m *ImageMessage) Build() *dto.MessageToCreate

func (*ImageMessage) Image

func (m *ImageMessage) Image(url string) *ImageMessage

func (*ImageMessage) Reference

func (m *ImageMessage) Reference(messageID string) *ImageMessage

func (*ImageMessage) Type

func (m *ImageMessage) Type() Type

type MarkdownMessage

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

func (*MarkdownMessage) Build

func (m *MarkdownMessage) Build() *dto.MessageToCreate

func (*MarkdownMessage) Reference

func (m *MarkdownMessage) Reference(messageID string) *MarkdownMessage

func (*MarkdownMessage) Text

func (m *MarkdownMessage) Text(text string) *MarkdownMessage

func (*MarkdownMessage) Type

func (m *MarkdownMessage) Type() Type

type Message

type Message interface {
	Build() *dto.MessageToCreate
	Type() Type
}

type TextMessage

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

func NewTextMessage

func NewTextMessage() *TextMessage

func (*TextMessage) At

func (m *TextMessage) At(userID string) *TextMessage

func (*TextMessage) AtAll

func (m *TextMessage) AtAll() *TextMessage

func (*TextMessage) Build

func (m *TextMessage) Build() *dto.MessageToCreate

func (*TextMessage) Emojis

func (m *TextMessage) Emojis(emojis ...string) *TextMessage

func (*TextMessage) Image

func (m *TextMessage) Image(url string) *TextMessage

func (*TextMessage) NewLine

func (m *TextMessage) NewLine() *TextMessage

func (*TextMessage) Reference

func (m *TextMessage) Reference(messageID string) *TextMessage

func (*TextMessage) Text

func (m *TextMessage) Text(text string) *TextMessage

func (*TextMessage) Type

func (m *TextMessage) Type() Type

type Type

type Type string
const (
	TextMessageType     Type = "text"
	ImageMessageType    Type = "image"
	MarkdownMessageType Type = "markdown"
)

Jump to

Keyboard shortcuts

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