0

我以为所有 Telegram 频道 ID 都必须以 -100 开头?对于我的机器人处于活动状态的其中一个频道就是这种情况,但对于另一个添加 -100 错误,说明该频道无效。

bot.on('message', async (ctx) => {
    const {
        text,
        photo,
        caption,
        from: { first_name, username },
        chat: { id, title },
    } = ctx.message;

这是存储通道 ID 的片段,如果我在控制台中记录它,第一个通道正确启动,-100 然后是 ID,但是第二个通道没有,而只是你可以看到的 ID在 Telegram 的 Web 客户端上的频道中。

4

0 回答 0