Refine Telegram thread commands
This commit is contained in:
@@ -52,7 +52,13 @@ func (c *Client) redact(text string) string {
|
||||
|
||||
func (c *Client) SetMyCommands(ctx context.Context, commands []BotCommand) error {
|
||||
var ok bool
|
||||
return c.postJSON(ctx, "setMyCommands", map[string]any{"commands": commands}, &ok)
|
||||
if err := c.postJSON(ctx, "setMyCommands", map[string]any{"commands": commands}, &ok); err != nil {
|
||||
return err
|
||||
}
|
||||
return c.postJSON(ctx, "setMyCommands", map[string]any{
|
||||
"commands": commands,
|
||||
"scope": map[string]any{"type": "all_private_chats"},
|
||||
}, &ok)
|
||||
}
|
||||
|
||||
func (c *Client) GetUpdates(ctx context.Context, offset int, timeoutSeconds int) ([]Update, error) {
|
||||
|
||||
Reference in New Issue
Block a user