Answer the question
In order to leave comments, you need to log in
What's the problem?
Unhandled rejection (<{"statusCode":503,"body":"<!DOCTYPE ht...>, no stack trace)
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);
})
})
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question