conversation

package
v0.0.0-...-3c8687b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conversation

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

Conversation struct.

func New

func New(peer vkapi.ID, api *vkapi.Client) *Conversation

New creates new chat object.

func (*Conversation) EditMessage

func (c *Conversation) EditMessage(convMessageID int, msg Message) (bool, *vkapi.Error)

EditMessage edits a message.

func (*Conversation) GetMembers

func (c *Conversation) GetMembers() (*vkapi.Members, *vkapi.Error)

GetMembers returns a list of chat users.

func (*Conversation) SendMessage

func (c *Conversation) SendMessage(msg Message) *vkapi.Error

SendMessage sends a message.

type Message

type Message struct {
	Text     string
	Photos   []*Photo
	Keyboard *keyboard.Keyboard
	ReplyTo  int
	Forward  []int
	Mentions bool
}

Message struct.

type Photo

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

Photo type

func NewPhoto

func NewPhoto(fname string, data io.Reader) *Photo

NewPhoto creates photo object.

func NewPhotoFile

func NewPhotoFile(file fs.File) (*Photo, error)

NewPhotoFile creates photo object from file.

Jump to

Keyboard shortcuts

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