My Problem:
I'm setting up a discord bot using discord.js in repl.it. In my config.js file i have set the bot status and want to include a predetermined variable in that status. So far everything I have tried does not work.
What I've Done to Try and Fix It:
I have tried many ways to include the variable and some have allowed the program to run. However those that have allowed it to run (including this.prefix) have showed the status as undefinedhelp
as supposed as the actual value of the prefix (//)help
.
My Code:
var config = {
token: "MY BOT TOKEN HERE",
prefix: "//",
statusMessage: "video games | (" + this.prefix + "help)",
dbltoken: undefined
}
module.exports = config;
Output and Errors:
The output should be a status on the bot that says video games | (//help)
What it is currently saying is video games | (undefinedhelp)
Thank you in advance for any help