Z
Z
Zhenya Koder'beginner2021-06-23 21:19:18
In contact with
Zhenya Koder'beginner, 2021-06-23 21:19:18

What's the problem?

Unhandled rejection (<{"statusCode":503,"body":"<!DOCTYPE ht...>, no stack trace)


Team:
cmd.hear(/(?:фан)/i, async (message) => { 
if(message.user.settings.adm < 888) return bot(`you dont have permission`); 
    request(`https://isinkin-bot-api.herokuapp.com/1/talk?q=${encodeURIComponent(message.text)}`).then(res => { 
      var bot = res.text;
      var msg = [`Бот говорит:`, `Бот записывает голосовое сообщение:`, `Бот хочет вам что-то сказать..`].random()
      googleTTS(bot, `ru`, 5).then(function (url) {
        vk.api.messages.setActivity({type: "audiomessage", chat_id: message.chatId})
        message.send(msg) 
        setTimeout(() => {message.sendAudioMessage(url)}).catch(function (err) {
          console.error(err.stack); }, 10000);
})
})
});


This is a command to talk to the bot, but it does not work, what's the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question