Documentation ¶
Index ¶
- type Bot
- type ImageMessage
- func (im *ImageMessage) Caption() (string, bool)
- func (im *ImageMessage) DownloadImage(ctx context.Context) (image.Image, error)
- func (im *ImageMessage) FileName() string
- func (m *ImageMessage) ID() id.EventID
- func (m *ImageMessage) React(ctx context.Context, reaction string) error
- func (m *ImageMessage) Reply(ctx context.Context, reply string) error
- func (m *ImageMessage) Room() Room
- func (m *ImageMessage) SendReceipt(ctx context.Context) error
- func (m *ImageMessage) Sender() id.UserID
- func (m *ImageMessage) Time() time.Time
- type Invite
- type InviteHandler
- type Matrix
- func (m *Matrix) JoinedRooms(ctx context.Context) ([]Room, error)
- func (m *Matrix) OnInvite(handler InviteHandler)
- func (m *Matrix) OnMessage(handler MessageHandler)
- func (m *Matrix) ResolveAlias(ctx context.Context, alias id.RoomAlias) (Room, error)
- func (m *Matrix) Room(id id.RoomID) Room
- func (m *Matrix) SetPresence(ctx context.Context, status event.Presence)
- type Message
- type MessageHandler
- type Room
- func (r Room) EnableEncryption(ctx context.Context) error
- func (r Room) GetAccountData(ctx context.Context, name string, output any) error
- func (r Room) IsEncrypted(ctx context.Context) (bool, error)
- func (r Room) Send(ctx context.Context, msg string) error
- func (r Room) SendEmote(ctx context.Context, msg string) error
- func (r Room) SetAccountData(ctx context.Context, name string, data any) error
- func (r Room) StartTyping(ctx context.Context, timeout time.Duration) error
- func (r Room) StopTyping(ctx context.Context) error
- type SlogHandler
- type TextMessage
- func (tm *TextMessage) Body() string
- func (m *TextMessage) ID() id.EventID
- func (m *TextMessage) React(ctx context.Context, reaction string) error
- func (m *TextMessage) Reply(ctx context.Context, reply string) error
- func (m *TextMessage) Room() Room
- func (m *TextMessage) SendReceipt(ctx context.Context) error
- func (m *TextMessage) Sender() id.UserID
- func (m *TextMessage) Time() time.Time
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
}
func (*Bot) BecomeOnline ¶
func (*Bot) BecomeUnavailable ¶
type ImageMessage ¶
type ImageMessage struct {
// contains filtered or unexported fields
}
func (*ImageMessage) Caption ¶
func (im *ImageMessage) Caption() (string, bool)
func (*ImageMessage) DownloadImage ¶
func (*ImageMessage) FileName ¶
func (im *ImageMessage) FileName() string
func (*ImageMessage) SendReceipt ¶
type InviteHandler ¶
type Matrix ¶
func (*Matrix) OnInvite ¶
func (m *Matrix) OnInvite(handler InviteHandler)
func (*Matrix) OnMessage ¶
func (m *Matrix) OnMessage(handler MessageHandler)
func (*Matrix) ResolveAlias ¶
type MessageHandler ¶
type SlogHandler ¶
func NewSlogHandler ¶
func NewSlogHandler(opts *slog.HandlerOptions) *SlogHandler
func (*SlogHandler) Attach ¶
func (sh *SlogHandler) Attach(bot *Bot)
type TextMessage ¶
type TextMessage struct {
// contains filtered or unexported fields
}
func (*TextMessage) Body ¶
func (tm *TextMessage) Body() string
func (*TextMessage) SendReceipt ¶
Click to show internal directories.
Click to hide internal directories.