Documentation
¶
Index ¶
- Constants
- func ToContext(ctx context.Context, client *Client) context.Context
- type Action
- type Client
- func (c *Client) Command(cmd Command)
- func (c *Client) DelState(ctx context.Context, chatID int64) error
- func (c *Client) Event(on telegram.UpdateType, event Event)
- func (c *Client) GetSession(ctx context.Context, chatID int64, data any) error
- func (c *Client) GetState(ctx context.Context, chatID int64, state *State) error
- func (c *Client) Middleware(middleware ...Middleware)
- func (c *Client) Run(ctx context.Context) error
- func (c *Client) SetSession(ctx context.Context, chatID int64, data any) error
- func (c *Client) SetState(ctx context.Context, chatID int64, state *State) error
- type Command
- type Configs
- type Event
- type InlineKeyboard
- type Keyword
- type Middleware
- type ReplyKeyboard
- type Route
- type State
Constants ¶
View Source
const (
Name = "telebot"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Configs
// contains filtered or unexported fields
}
func FromContext ¶
func (*Client) GetSession ¶
func (*Client) Middleware ¶
func (c *Client) Middleware(middleware ...Middleware)
func (*Client) SetSession ¶
type InlineKeyboard ¶
type InlineKeyboard struct {
// contains filtered or unexported fields
}
func NewInlineKeyboard ¶
func NewInlineKeyboard() *InlineKeyboard
func (*InlineKeyboard) AddCol ¶
func (k *InlineKeyboard) AddCol(button telegram.InlineKeyboardButton) *InlineKeyboard
func (*InlineKeyboard) AddRow ¶
func (k *InlineKeyboard) AddRow(button telegram.InlineKeyboardButton) *InlineKeyboard
func (*InlineKeyboard) Render ¶
func (k *InlineKeyboard) Render() telegram.KeyboardMarkup
type Middleware ¶
func ActionMiddleware ¶
func ActionMiddleware(action telegram.Action) Middleware
type ReplyKeyboard ¶
type ReplyKeyboard struct {
// contains filtered or unexported fields
}
func NewReplyKeyboard ¶
func NewReplyKeyboard() *ReplyKeyboard
func (*ReplyKeyboard) AddCol ¶
func (k *ReplyKeyboard) AddCol(button telegram.KeyboardButton) *ReplyKeyboard
func (*ReplyKeyboard) AddRow ¶
func (k *ReplyKeyboard) AddRow(button telegram.KeyboardButton) *ReplyKeyboard
func (*ReplyKeyboard) Render ¶
func (k *ReplyKeyboard) Render() telegram.KeyboardMarkup
type Route ¶
type Route struct {
Action Action
AllowUpdates []telegram.UpdateType
}
Click to show internal directories.
Click to hide internal directories.