mm

package
v0.0.0-...-dc6244c Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 New

func New(url, token string) (*Bot, error)

func (*Bot) AttachChannel

func (bot *Bot) AttachChannel(channel_name string) (*model.Channel, error)

Like ListenChannel, but doesn't listen; only prepares for transmission.

func (*Bot) Close

func (bot *Bot) Close()
func (bot *Bot) GetPostLink(post *model.Post) string

func (*Bot) GetPostThread

func (bot *Bot) GetPostThread(postId string) (*model.PostList, error)

func (*Bot) ListenChannel

func (bot *Bot) ListenChannel(channel_name string) (*model.Channel, <-chan PostNotification, error)

func (*Bot) ListenPersonals

func (bot *Bot) ListenPersonals() <-chan PostNotification

func (*Bot) SendMessageToChannel

func (bot *Bot) SendMessageToChannel(channel *model.Channel, message string, props model.StringInterface) (*model.Post, error)

func (*Bot) SendPost

func (bot *Bot) SendPost(post *model.Post) (*model.Post, error)

func (*Bot) SendSpoofedMessageToChannel

func (bot *Bot) SendSpoofedMessageToChannel(name string) error

func (*Bot) UpdateChannelHeader

func (bot *Bot) UpdateChannelHeader(channel *model.Channel, header string) error

type PostNotification

type PostNotification struct {
	Post        *model.Post
	Sender      string
	ChannelType string
}

Jump to

Keyboard shortcuts

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