I have a problem with my code and try to find the error
I have already tried to use let
instead of var
but it still did not work. There is also no output in the console.
I believe the error to be within the if (tylerdel == true)
of my code:
if (command === prefixfile.prefix + `active`) {
var tylerdel = true
message.channel.send (`test`)
if (tylerdel == true) {
if (message.author.id === ("")) {
message.delete (1)
}
}
}
It is supposed to delete a message if it comes from a certain person but I also need it to be toggleable.