Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is a wrapper around the telebot.Bot providing additional functionality
func NewBot ¶
NewBot creates a new Bot from the given telebot.Settings.
If opts is nil, a default telebot.Settings is used.
The returned Bot wraps the underlying telebot.Bot instance and provides additional functionality.
func (*Bot) DeleteCommands ¶
func (b *Bot) DeleteCommands(scope *telebot.CommandScope, lang string) error
DeleteCommands deletes the commands for the bot.
If lang is empty, it will delete the commands without language. If lang is not empty, it will delete the commands for the given language.
It returns an error if the deletion fails.
func (*Bot) GetBot ¶
GetBot returns the underlying telebot.Bot instance.
It is useful for getting direct access to the telebot.Bot methods and properties.
func (*Bot) SetCommands ¶
func (b *Bot) SetCommands(commands []telebot.Command, scope *telebot.CommandScope, lang string) error
SetCommands sets the commands for the bot.
If lang is empty, it will set the commands without language. If lang is not empty, it will set the commands for the given language.
It first deletes the existing commands for the given scope and language and then sets the new commands.
It returns an error if the deletion or setting fails.