telegram

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(Telegram)

Option ...

type ParseMode

type ParseMode string

ParseMode custom type.

const (
	ModeMarkdownV2 ParseMode = "MarkdownV2"
	ModeMarkdown   ParseMode = "Markdown"
	ModeHTML       ParseMode = "HTML"
)

define parseMode rules.

type Telegram

type Telegram interface {
	Edit(id int, msg string, mode ParseMode) (*tgbotapi.Message, error)
	Send(msg string, mode ParseMode) (*tgbotapi.Message, error)
}

Telegram defines an interface for work with Telegram API.

func New

func New(token string, chatID int64, opts ...Option) (Telegram, error)

New initialize Telegram object.

Jump to

Keyboard shortcuts

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