Telegram Bot API
🌐 한국어

getMyCommands

카테고리: 봇 정보 · Bot API 10.3 · 공식 문서

현재 봇 명령어 목록을 반환합니다.

반환값: 성공 시 반환값: Array of BotCommand.

매개변수

매개변수타입필수설명
scopeBotCommandScope선택BotCommandScope JSON 객체
language_codeString선택언어 코드 (IETF 태그)

매개변수 설명은 핵심만 간추린 요약입니다. 전체 설명은 공식 문서에서 확인할 수 있습니다.

요청 예제

curl

curl -s "https://api.telegram.org/bot$TOKEN/getMyCommands"

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/getMyCommands", timeout=30)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/getMyCommands`);
console.log(await res.json());

단계별 가이드: 텔레그램 봇 만들기: @BotFather로 생성하고 첫 메시지 보내기