Hello! Welcome to the ADAnswersBot codebase. You may have noticed that the code is terrible. This is fine, because the bot works. However, here are some guidelines for contributing and how to contribute.
The issues tab is my best friend for keeping track of what to do for each bot version. If you have anything you want to see but don't want to code it yourself, make an issue for it!
Navigate to the /commands folder. In this folder, you can find all commands.
Using your IDE search a whole directory function, look for number: followed by a number. If all numbers have 10, you will need to navigate to bot.js
Find where all of the other embedObjects are defined. Copy and paste a new one, and name it the next page. Create a new fieldVar at the top with the other ones, add it to fieldsArray. Go to the client.commands.forEach line and add a new else if block.
client.commands.forEach(element => {
if (element.number === 1) fieldsVar.push({ name: element.name, value: element.description });
else if (element.number === 2) fieldsVar2.push({ name: element.name, value: element.description });
else if (element.number === 3) fieldsVar3.push({ name: element.name, value: element.description });
else if (element.number === 4) fieldsVar4.push({ name: element.name, value: element.description });
else if (element.number === 5) fieldsVar5.push({ name: element.name, value: element.description });
else if (element.number === yourNumberHere) fieldsVarNumber.push({ name: element.name, value: element.description });
else if (element.number === 69) fieldsVar69.push({ name: element.name, value: element.description });
else console.log(element);
});Once you've done that, navigate to client.on, and find the if (commanc === "help) line. Add a new case to the switch statement with your number. Use the other ones as examples!
Navigate back to /commands, and create a new file! I recommend checking out something like meta.js to see how args work in action. Args are passed as an array in, so be wary of that.
Run the code! You will need to have node.js installed and using a local copy of this code to test things out, as well as the dependencies.
Create a PR. I will take a look and see if it's something that should be added. Thanks for contributing!
When contributing, be sure to be serious with your suggestion. This is a real, live, bot being used in a server with thousands of people!
Install an ESLint extension to be able to conform to style guidelines.