editGeneralForumTopic
General 포럼 토픽을 수정합니다.
반환값: 성공 시 반환값: True.
매개변수
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
chat_id | Integer or String | 예 | 채팅 ID 또는 @username |
name | String | 예 | 새 토픽 이름 (1-128자) |
요청 예제
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/editGeneralForumTopic" \
-H "Content-Type: application/json" \
-d '{"chat_id":123456789,"name":"Example"}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/editGeneralForumTopic",
json={
"chat_id": 123456789,
"name": "Example"
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/editGeneralForumTopic`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"chat_id": 123456789,
"name": "Example"
}),
});
console.log(await res.json());
단계별 가이드: 텔레그램 봇 만들기: @BotFather로 생성하고 첫 메시지 보내기
관련 메서드
createForumTopic포럼 토픽을 생성합니다.editForumTopic포럼 토픽을 수정합니다.closeForumTopic포럼 토픽을 닫습니다.reopenForumTopic포럼 토픽을 다시 엽니다.deleteForumTopic포럼 토픽을 삭제합니다.closeGeneralForumTopicGeneral 포럼 토픽을 닫습니다.reopenGeneralForumTopicGeneral 포럼 토픽을 다시 엽니다.hideGeneralForumTopicGeneral 포럼 토픽을 숨깁니다.unhideGeneralForumTopicGeneral 포럼 토픽 숨김을 해제합니다.getForumTopicIconStickers포럼 토픽 아이콘 스티커를 반환합니다.unpinAllForumTopicMessages포럼 토픽의 모든 메시지 고정을 해제합니다.unpinAllGeneralForumTopicMessagesGeneral 포럼 토픽의 모든 메시지 고정을 해제합니다.