when I try to use get from axios, it just does not get anything.
bot.on("message", async function(message) {
try {
if (message.author == bot.user) return;
if (message.channel.type == "dm" || message.channel.type == "group") {
await new Promise(resolve => setTimeout(resolve, 3000));
if (!message.channel.typing) {
message.channel.startTyping();
setTimeout(function() {
const URI = "http://api.brainshop.ai/get?bid=&key=&uid=[uid]&msg=[msg]";
const encodedURI = encodeURI(URI);
axios.get(encodedURI)
.then(async response => {
var data = response
message.reply(data)
});
message.channel.stopTyping();
}, 5000);
}
}
} catch (e) {
console.log(e)
}
});
I have the correct URL, I just took out part of it.