0

My Code, I use in my localhost it works well ,but if heroku it will always saying 403 forbidden,bad network

const translate = require('translate-google')

translate(args.join(" "), {to : 'zh-tw'}).then(res => {
 message.channel.send(res)
}).catch(err => {
  message.channel.send('發生錯誤')
 console.log(err)
}



enter code here2020-12-22T20:09:56.491004+00:00 app[Worker.1]: 0|index
| Error: Response code 403 (Forbidden) 2020-12-22T20:09:56.492474+00:00 app[Worker.1]: 0|index  |     at translate (/app/node_modules/translate-google/index.js:137:13) 2020-12-22T20:09:56.492643+00:00 app[Worker.1]: 0|index  |     at processTicksAndRejections (internal/process/task_queues.js:97:5) { 2020-12-22T20:09:56.492834+00:00 app[Worker.1]: 0|index  |   code: 'BAD_NETWORK' 2020-12-22T20:09:56.492996+00:00 app[Worker.1]: 0|index  | }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.