telegram

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: GPL-3.0 Imports: 5 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
}

Command ...

type Telegram

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

Telegram ...

func NewTelegram

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

NewTelegram ...

func (*Telegram) SendMsg

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

SendMsg ...

func (*Telegram) Stop

func (c *Telegram) Stop()

Stop ...

type TelegramConfig

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

TelegramConfig ...

func NewTelegramConfig

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

NewTelegramConfig ...

Jump to

Keyboard shortcuts

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