'unhandledpromiserejectionwarning error status code 400 || Discord Bot Error
Now im pretty stupid so i dont exactly get coding and what not but i do have some expirence with basic javaS,
so I recently implanted this code and suddenly after every command used I get this error msg unhandledpromiserejectionwarning error status code 400
if (msg.content.startsWith(`${prefix}`)) {
let Q5 = msg.content.substr(1);
async function TOD() {
var res = await axios.get(`https://api.truthordarebot.xyz/api/${Q5}`);
var Q1 = res.data.question
console.log("The TOD Command Was Used")
const girlEmbed = new Discord.MessageEmbed()
.setTitle(`***${Q1}***`)
.setColor(randomHexColor())
.setFooter(footer)
msg.channel.send(girlEmbed)
}
TOD()
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
