message

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

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

func (*Entity) ClaimThread added in v1.8.0

func (e *Entity) ClaimThread(ctx context.Context, channelID, messageID, threadID int64) (bool, int64, error)

func (*Entity) CreateMessage

func (e *Entity) CreateMessage(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, position int64) error

func (*Entity) CreateMessageWithMeta added in v1.8.0

func (e *Entity) CreateMessageWithMeta(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, flags int, msgType model.MessageType, referenceChannel, reference, thread, position int64) error

func (*Entity) CreateSystemMessage added in v1.5.0

func (e *Entity) CreateSystemMessage(ctx context.Context, id, channelID, userID int64, content string, msgType model.MessageType, position int64) error

func (*Entity) CreateThreadCreatedMessageRef added in v1.8.0

func (e *Entity) CreateThreadCreatedMessageRef(ctx context.Context, threadID, channelID, messageID int64) error

func (*Entity) DeleteChannelMessages

func (e *Entity) DeleteChannelMessages(ctx context.Context, channelID, lastID int64) error

func (*Entity) DeleteMessage

func (e *Entity) DeleteMessage(ctx context.Context, id, channelID int64) error

func (*Entity) DeleteThreadCreatedMessageRef added in v1.8.0

func (e *Entity) DeleteThreadCreatedMessageRef(ctx context.Context, threadID int64) error

func (*Entity) GetChannelMessagesByIDs

func (e *Entity) GetChannelMessagesByIDs(ctx context.Context, channelID int64, ids []int64) ([]model.Message, error)

func (*Entity) GetMessage

func (e *Entity) GetMessage(ctx context.Context, id, channelID int64) (model.Message, error)

func (*Entity) GetMessagesAfter

func (e *Entity) GetMessagesAfter(ctx context.Context, channelID, msgID, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)

func (*Entity) GetMessagesAround added in v1.4.0

func (e *Entity) GetMessagesAround(ctx context.Context, channelID, msgID, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)

func (*Entity) GetMessagesBefore

func (e *Entity) GetMessagesBefore(ctx context.Context, channelID, msgID int64, limit int) ([]model.Message, []int64, error)

func (*Entity) GetMessagesList

func (e *Entity) GetMessagesList(ctx context.Context, msgIDs []int64) ([]model.Message, error)

func (*Entity) GetThreadCreatedMessageRef added in v1.8.0

func (e *Entity) GetThreadCreatedMessageRef(ctx context.Context, threadID int64) (int64, int64, error)

func (*Entity) ReleaseThreadClaim added in v1.8.0

func (e *Entity) ReleaseThreadClaim(ctx context.Context, channelID, messageID int64) error

func (*Entity) SetThread added in v1.8.0

func (e *Entity) SetThread(ctx context.Context, id, channelID, threadID int64) error

func (*Entity) UpdateGeneratedEmbeds added in v1.7.0

func (e *Entity) UpdateGeneratedEmbeds(ctx context.Context, id, channelID int64, autoEmbedsJSON string) error

func (*Entity) UpdateMessage

func (e *Entity) UpdateMessage(ctx context.Context, id, channelID int64, content, embedsJSON, autoEmbedsJSON string, flags int) error

func (*Entity) UpdateMessageContent added in v1.8.0

func (e *Entity) UpdateMessageContent(ctx context.Context, id, channelID int64, content string) error

type Message

type Message interface {
	CreateMessage(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, position int64) error
	CreateMessageWithMeta(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, flags int, msgType model.MessageType, referenceChannel, reference, thread, position int64) error
	CreateSystemMessage(ctx context.Context, id, channelId, userId int64, content string, msgType model.MessageType, position int64) error
	CreateThreadCreatedMessageRef(ctx context.Context, threadID, channelID, messageID int64) error
	ClaimThread(ctx context.Context, channelID, messageID, threadID int64) (bool, int64, error)
	DeleteThreadCreatedMessageRef(ctx context.Context, threadID int64) error
	ReleaseThreadClaim(ctx context.Context, channelID, messageID int64) error
	SetThread(ctx context.Context, id, channelID, threadID int64) error
	UpdateMessageContent(ctx context.Context, id, channelID int64, content string) error
	UpdateMessage(ctx context.Context, id, channelID int64, content, embedsJSON, autoEmbedsJSON string, flags int) error
	UpdateGeneratedEmbeds(ctx context.Context, id, channelID int64, autoEmbedsJSON string) error
	DeleteMessage(ctx context.Context, id, channelId int64) error
	DeleteChannelMessages(ctx context.Context, channelID, lastId int64) error
	GetMessage(ctx context.Context, id, channelId int64) (model.Message, error)
	GetMessagesBefore(ctx context.Context, channelId, msgId int64, limit int) ([]model.Message, []int64, error)
	GetMessagesAfter(ctx context.Context, channelId, msgId, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
	GetMessagesAround(ctx context.Context, channelId, msgId, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
	GetMessagesList(ctx context.Context, msgIds []int64) ([]model.Message, error)
	GetChannelMessagesByIDs(ctx context.Context, channelId int64, ids []int64) ([]model.Message, error)
	GetThreadCreatedMessageRef(ctx context.Context, threadID int64) (int64, int64, error)
}

func New

func New(c *db.CQLCon) Message

Jump to

Keyboard shortcuts

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