Making a discord bot. Everything works fine, except the one command of -!prefix
. -!
being the prefix, and the command taking the args and changing the prefix of the server.
Before I go into detail about this while thing, here's the bot's code, maybe I simply did something wrong in the consts: Hastebin Link
The error here is in line 52, according to the console: Console Log
I'm confused as to what to do with this being undefined. I've tried using the message.guild.id
property as the variable, and also the one shown on the code. I've tried moving it to multiple places, although the only place it even registers is INSIDE of the prefix command (which is currently broken because of this error.)
Anyone have any fixes? I'm not that much of an expert in the whole JavaScript thing, as I came over from Python and regular Java.