telegram_bot

package
v0.0.0-...-6e60df0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activate

func Activate(chatID int64) string

reactivate telegram account

func Deactivate

func Deactivate(chatID int64) string

deactivate telegram

func DeleteItem

func DeleteItem(chatID int64, productUrl string) string

delete item from user follow list

func GetIDState

func GetIDState(chatID int64) (int, error)

get telegram chat state 0 = home, 1 = additem, 2 = deleteitem

func GetItemList

func GetItemList(chatID int64) string

TODO finish this function get user item list

func Register

func Register(data tgbotapi.Update) string

bot register command save telegram chat id to db

func SaveItem

func SaveItem(chatID int64, productUrl string) string

save item to telegram chat id

func SendMessage

func SendMessage(chatID int64, chatText string)

send bot message to telegram chat id

func SetStateAddItem

func SetStateAddItem(chatID int64) string

set telegram chat id state to 1 (add item)

func SetStateDeleteItem

func SetStateDeleteItem(chatID int64) string

set telegram chat id state to 2 (delete item)

func SetStateHome

func SetStateHome(chatID int64) string

set telegram chat id state to 0

func StartListening

func StartListening()

main telegram bot function

Types

This section is empty.

Directories

Path Synopsis
repo

Jump to

Keyboard shortcuts

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