Reduce Telegram tool message noise

This commit is contained in:
Codex
2026-05-21 11:20:44 +00:00
parent 139471df31
commit e9425c6d9b
4 changed files with 422 additions and 11 deletions

View File

@@ -60,6 +60,25 @@ func (c *Client) SendMessage(ctx context.Context, chatID int64, text string, opt
return message, nil
}
func (c *Client) SendChatAction(ctx context.Context, chatID int64, action string) error {
params := map[string]any{
"chat_id": chatID,
"action": action,
}
var ok bool
return c.postJSON(ctx, "sendChatAction", params, &ok)
}
func (c *Client) SendMessageDraft(ctx context.Context, chatID int64, draftID int64, text string) error {
params := map[string]any{
"chat_id": chatID,
"draft_id": draftID,
"text": text,
}
var ok bool
return c.postJSON(ctx, "sendMessageDraft", params, &ok)
}
func (c *Client) EditMessageText(ctx context.Context, chatID int64, messageID int, text string, opts EditMessageTextOptions) (Message, error) {
params := map[string]any{
"chat_id": chatID,