telegram

package
v0.0.0-...-7afd62f Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(ctx context.Context, token string) error

Authorize will authorize in telegram using provided bot token.

You can obtain new token using telegram bot father. More info here: https://core.telegram.org/bots/tutorial#obtain-your-bot-token

func Send

func Send(ctx context.Context, channel string, msg Message) error

Send sends message to provided channel. It is required to add bot to that channel.

Types

type Message

type Message struct {
	ImageURL string
	Title    string
	Subtitle string
	Link     string
	Text     string
}

Message is message to telegram.

Jump to

Keyboard shortcuts

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