telegram

package
v0.0.0-...-ffaf892 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBot

func NewBot(logger *zap.Logger, botSecretKey string) (*bot, error)

Types

type Message

type Message struct {
	UserID UserID
	Text   string
}

type UserID

type UserID int64

UserID is an identifier of a telegram user.

func ExtractUserIDFromInitData

func ExtractUserIDFromInitData(data string, telegramSecret string) (UserID, error)

ExtractUserIDFromInitData extracts user ID from twa init data. See more details at https://docs.twa.dev/docs/libraries/init-data-golang.

Jump to

Keyboard shortcuts

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