telegram

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

README

TELEGRAM Plugin

Documentation

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "telegram"

	AttrToken     = "token"
	AttrPin       = "pin"
	AttrChatID    = "chat_id"
	AttrBody      = "body"
	AttrPhotoUri  = "photo_uri"
	AttrPhotoPath = "photo_path"
	AttrFilePath  = "file_path"
	AttrFileUri   = "file_uri"
	AttrKeys      = "keys"

	Version = "0.0.1"
)
View Source
const (
	AttrConnected = "connected"
	AttrOffline   = "offline"
)
View Source
const (
	// FuncEntityAction ...
	FuncEntityAction = "telegramAction"
)

Variables

Functions

func New

func New() supervisor.Pluggable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewMessageParams

func NewMessageParams() m.Attributes

NewMessageParams ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

func NewStates added in v0.12.0

func NewStates() (states map[string]supervisor.ActorState)

NewStates ...

Types

type Actor

type Actor struct {
	*supervisor.BaseActor

	AccessToken string
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	service supervisor.Service) (*Actor, error)

NewActor ...

func (*Actor) Destroy added in v0.12.0

func (e *Actor) Destroy()

func (*Actor) MessageParams added in v0.12.0

func (e *Actor) MessageParams() m.Attributes

MessageParams ...

func (*Actor) Save added in v0.12.0

func (e *Actor) Save(msg notifyCommon.Message) (addresses []string, message *m.Message)

Save ...

func (*Actor) Send

func (e *Actor) Send(address string, message *m.Message) (err error)

Send ...

func (*Actor) Spawn

func (e *Actor) Spawn()

func (*Actor) UpdateStatus

func (e *Actor) UpdateStatus() (err error)

UpdateStatus ...

type Command

type Command struct {
	UserName, Text string
	ChatId         int64
}

Command ...

Jump to

Keyboard shortcuts

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