types

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command added in v0.4.1

func Command(m *tgbotapi.Message) string

Command returns the command from either Text or Caption

func CommandArguments added in v0.4.1

func CommandArguments(m *tgbotapi.Message) string

CommandArguments returns arguments from either Text or Caption

func CommandWithAt added in v0.4.1

func CommandWithAt(m *tgbotapi.Message) string

CommandWithAtreturns the command from either Text or Caption with @ mention

func IsCaptionCommand added in v0.4.1

func IsCaptionCommand(m *tgbotapi.Message) bool

IsCaptionCommand checks if caption starts with a bot_command entity

func IsCommand added in v0.4.1

func IsCommand(m *tgbotapi.Message) bool

IsCommand returns true if message starts with a "bot_command" entity in either Text or Caption

func ParseSlice added in v0.2.4

func ParseSlice(s string) ([]string, error)

Types

type Data

type Data struct {
	Bot     *tgbotapi.BotAPI
	Updates tgbotapi.UpdatesChannel
}

type Interval added in v0.2.4

type Interval struct {
	Min float64
	Max float64
}

type Reload added in v0.2.4

type Reload struct {
	FileName   string
	DataStruct any
	IfOkay     func(Utils)
	IfFail     func(Utils)
}

type Utils

type Utils struct {
	Config     *config.Config
	Logger     *logrus.Logger
	TimeFormat string
}

type WriteMessageData added in v0.2.0

type WriteMessageData struct {
	Bot            *tgbotapi.BotAPI
	ChatID         int64
	ReplyMessageID int
	Text           string
}

Jump to

Keyboard shortcuts

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