标签: node.js telegram-bot
如果用户调用命令 /weather [something],它将运行下面的代码块。
bot.onText(/\/[wW]eather(.+)/, (msg, match) => { bot.sendMessage(msg.chat.id, " xd !!! ?") });
但如果用户只调用命令 /weather,它将运行该代码块。
我知道我将控制台日志放在该代码块中的原因,它仅在用户将消息传递给命令时输出。
有什么办法可以妥善处理这种情况吗?