telegrambot

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelegramBot

type TelegramBot struct {
	Messenger *m.Messenger
	Bot       *tgBotApi.BotAPI
	// contains filtered or unexported fields
}

func Connect

func Connect(log *logger.Logger, token, logLevel string, groupTitle *string, groupChatId *int64,
	messenger *m.Messenger) (*TelegramBot, error)

Connect initializes telegram bot via API

func (*TelegramBot) Init

func (b *TelegramBot) Init()

Init initializes telegram messages

func (*TelegramBot) Run

func (b *TelegramBot) Run()

Run starts subscribing messages

func (*TelegramBot) SendTextMsg

func (b *TelegramBot) SendTextMsg(ts time.Time, phone, msgId, name, msg string)

SendTextMsg sends messages to the telegram bot

Jump to

Keyboard shortcuts

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