telegram

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command added in v0.0.18

type Command struct {
	UserName, Text string
	ChatId         int64
}

type Telegram

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

func NewTelegram

func NewTelegram(cfg *TelegramConfig, updateChatId func(chatId int64)) (*Telegram, error)

func (*Telegram) SendMsg

func (c *Telegram) SendMsg(body string) error

func (*Telegram) Stop

func (c *Telegram) Stop()

type TelegramConfig

type TelegramConfig struct {
	Token  string `json:"token"`
	ChatId *int64 `json:"chat_id"`
}

func NewTelegramConfig

func NewTelegramConfig(token string, chatId *int64) *TelegramConfig

Jump to

Keyboard shortcuts

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