What is the error (Telegram API)?

Hello, there is a need to kick players on the team !kick, search on the Internet gave the result:
bot.onText(/!kick/, function (message, args) {
 bot.kickChatMember(message.chat.id, message.reply_to_message.from.id {until_date: the Date.now() + ms("5m")}).then(function (result) {
console.log("ok");
});

However, an error is displayed: error: [polling_error] {}. What's the problem?
April 4th 20 at 00:40
1 answer
April 4th 20 at 00:42
Solution
For example, your code seems all right! Try print the values to the console
message.chat.id, message.reply_to_message.from.id {until_date: the Date.now() + ms("5m")}

Whether the data you transmit ?
@Delphine.Franec, about until_date, it can not be use and the other settings are all correct - Conrad_Johnston commented on April 4th 20 at 00:45

Find more questions by tags JavaScriptAPINode.jsTelegram