bot

package
v0.0.0-...-b3f284d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(conf Config) error

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func New

func New(token string, chatID int) *Bot

func (*Bot) GetChatID

func (b *Bot) GetChatID() (int, error)

func (*Bot) SendFile

func (b *Bot) SendFile(reader io.Reader, fileName string) error

func (*Bot) SendMessage

func (b *Bot) SendMessage(msg string) error

type Config

type Config struct {
	Token  string `json:"token"`
	ChatID int    `json:"chat_id"`
}

func ReadConfig

func ReadConfig() (Config, error)

Jump to

Keyboard shortcuts

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