Error: 400: Bad Request: there is no photo in the request

Error: 400: Bad Request: there is no photo in the request

我使用 telegraf 并且当通过 url 发送照片时出现这样的问题但是当我使用本地照片(../img.jpg)时它是好的。代码:

bot.hears(/\/pic/, ctx=> {
  let photo = 'https://img-9gag-fun.9cache.com/photo/azmpDRN_460s.jpg';
  bot.telegram.sendPhoto(chatId,
    {source: photo},
    {caption: "Hello"});
});

我需要将 'source' 更改为 'url':

bot.hears(/\/pic/, ctx=> {
  let photo = 'https://img-9gag-fun.9cache.com/photo/azmpDRN_460s.jpg';
  bot.telegram.sendPhoto(chatId,
    {url: photo},
    {caption: "Hello"});
});