getMyCommands
현재 봇 명령어 목록을 반환합니다.
반환값: 성공 시 반환값: Array of BotCommand.
매개변수
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
scope | BotCommandScope | 선택 | BotCommandScope JSON 객체 |
language_code | String | 선택 | 언어 코드 (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로 생성하고 첫 메시지 보내기
관련 메서드
getMe봇 정보를 반환합니다.setMyCommands봇 명령어 목록을 설정합니다.deleteMyCommands봇 명령어를 삭제합니다.getMyName봇 이름을 반환합니다.setMyName봇 이름을 설정합니다.getMyDescription봇 설명을 반환합니다.setMyDescription봇 설명을 설정합니다.getMyShortDescription봇의 짧은 설명을 반환합니다.setMyShortDescription봇의 짧은 설명을 설정합니다.setMyProfilePhoto봇 프로필 사진을 설정합니다.removeMyProfilePhoto봇 프로필 사진을 삭제합니다.getUserProfilePhotos사용자 프로필 사진을 반환합니다.