Documentation ¶
Index ¶
- type Bot
- func (b *Bot) Enabled() bool
- func (b *Bot) Error(ctx context.Context, roomID id.RoomID, message string, args ...any)
- func (b *Bot) Send(ctx context.Context, roomID id.RoomID, message string, ...) id.EventID
- func (b *Bot) SendFile(ctx context.Context, roomID id.RoomID, file *mautrix.ReqUploadMedia, ...)
- func (b *Bot) Start() error
- func (b *Bot) Stop()
- type Linkpearl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot represents matrix bot
func (*Bot) Send ¶
func (b *Bot) Send(ctx context.Context, roomID id.RoomID, message string, attributes map[string]any) id.EventID
Send message to the room
type Linkpearl ¶
type Linkpearl interface { Send(ctx context.Context, roomID id.RoomID, content any) (id.EventID, error) SendFile(ctx context.Context, roomID id.RoomID, req *mautrix.ReqUploadMedia, msgtype event.MessageType, relations ...*event.RelatesTo) error SendNotice(ctx context.Context, roomID id.RoomID, message string, relates ...*event.RelatesTo) FindEventBy(ctx context.Context, roomID id.RoomID, fieldValue map[string]string, fromToken ...string) *event.Event Start(ctx context.Context, optionalStatusMsg ...string) error GetClient() *mautrix.Client Stop(ctx context.Context) }
Linkpearl interface
Click to show internal directories.
Click to hide internal directories.