closeGeneralForumTopic
Cierra el tema General del foro.
Devuelve: Si la llamada tiene éxito, devuelve True.
Parámetros
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
chat_id | Integer or String | Sí | ID del chat o @username |
Ejemplo de solicitud
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/closeGeneralForumTopic" \
-H "Content-Type: application/json" \
-d '{"chat_id":123456789}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/closeGeneralForumTopic",
json={
"chat_id": 123456789
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/closeGeneralForumTopic`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789
}),
});
console.log(await res.json());
Guía paso a paso: Cómo crear un bot en Telegram paso a paso: de BotFather a tu primer mensaje
Métodos relacionados
createForumTopicCrea un tema del foro.editForumTopicEdita un tema del foro.closeForumTopicCierra un tema del foro.reopenForumTopicReabre un tema del foro.deleteForumTopicElimina un tema del foro.editGeneralForumTopicEdita el tema General del foro.reopenGeneralForumTopicReabre el tema General del foro.hideGeneralForumTopicOculta el tema General del foro.unhideGeneralForumTopicVuelve a mostrar el tema General del foro.getForumTopicIconStickersDevuelve los stickers de íconos para temas del foro.unpinAllForumTopicMessagesDesfija todos los mensajes de un tema del foro.unpinAllGeneralForumTopicMessagesDesfija todos los mensajes del tema General.