Skip to content

Commit

Permalink
added getBusinessConnection method https://core.telegram.org/bots/api…
Browse files Browse the repository at this point in the history
  • Loading branch information
acatec authored Oct 10, 2024
1 parent c5814e4 commit c54fc0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,13 @@ func (b *Bot) GetUserChatBoosts(ctx context.Context, params *GetUserChatBoostsPa
return result, err
}

// GetBusinessConnection https://core.telegram.org/bots/api#getBusinessConnection
func (b *Bot) GetBusinessConnection(ctx context.Context, params *GetBusinessConnectionParams) (*models.BusinessConnection, error) {
result := &models.BusinessConnection{}
err := b.rawRequest(ctx, "getBusinessConnection", params, &result)
return result, err
}

// SetMyCommands https://core.telegram.org/bots/api#setmycommands
func (b *Bot) SetMyCommands(ctx context.Context, params *SetMyCommandsParams) (bool, error) {
var result bool
Expand Down
5 changes: 5 additions & 0 deletions methods_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,11 @@ type GetUserChatBoostsParams struct {
UserID int `json:"user_id"`
}

// GetUserChatBoostsParams https://core.telegram.org/bots/api#getbusinessconnection
type GetBusinessConnectionParams struct {
BusinessConnectionID any `json:"business_connection_id"`
}

type SetMyCommandsParams struct {
Commands []models.BotCommand `json:"commands"`
Scope models.BotCommandScope `json:"scope,omitempty"`
Expand Down

0 comments on commit c54fc0d

Please sign in to comment.