Uncaught TypeError: bot.setMyCommands is not a function

Uncaught TypeError: bot.setMyCommands is not a function

almost all rest bot methods are work

bot.setMyCommands([
    { command: '/start', description: 'start a dialogue with Jarvis' },
    { command: '/repeater', description: 'make Jarvis repeat every your message' }
])

当我尝试 运行 并调试包含这部分代码的代码时,我收到错误消息“Uncaught TypeError: bot.setMyCommands is not a function", 但在框架 telegraf

的官方文档中恰好有这段代码

我不得不输入 'bot.telegram.setMyCommands()' 而不是 'bot.setMyCommands()'