A
A
Artem Melnykov2020-01-03 18:07:54
JavaScript
Artem Melnykov, 2020-01-03 18:07:54

What is the error (Telegram API)?

Hello, there was a need to kick players on the command !kick, a 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: Date.now() + ms("5m")}).then(function (result) {
    console.log("ok");
});

However, an error is output: error: [polling_error] {} . What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Lopushenko, 2020-01-04
@NickProgramm

Your code seems to be correct! Try to print the values ​​to the console
Are you providing the correct data?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question