Well, never thought I would be the one asking a discord bot question!
I am currently working on a bot when I got this error:
/home/pi/discord_bot/Bot/server.js:42
if(db.has(message.guild.id)){
^
ReferenceError: message is not defined
I searched it up and everyone seems to have a different answer.
Here is a snippet of my code:
var rep = "!report";
if(msg.content.includes(rep) !== false){
console.log("Report detected, phase one."); var id = msg.content.substr(7);
console.log("Passed async");
if(db.has(message.guild.id)){
if(!message.guild.member(message.author).hasPermission('MANAGE_MESSAGES')){
msg.reply("We are sorry, but you do not have the permisions to do this.")
}