Sorry if I am being completely stupid, I am new and have no experience in JS
For some reason, when I do message.channel.send('Whatever') is gives the error 'message is not defined'. Do I need to define it myself? I couldnt find anything on the documentation, I either haven't been looking hard enough I am being completely stupid. Help would be greatly appreciated
Message is not defined as when you do message.channel.send();
, you are taking a variable called message
which is most likely a message sent and finding out its channel to send a message in that specific channel. What it is saying is "Oh, you never told me what the variable 'message' meant. Mind to explain?" To fix it, define it in the function <name of the Discord.Client variable>.on('message', async message => {});
TLDR: Define the variable with <name of the Discord.Client variable>.on('message', async message => {});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments