README
a module to help you create a discord bot wit discord.js. if you have questions go on this discord Link
Installation
npm install discordbot-helper
Example: a normal bot
var helper = require('discordbot-helper');
helper.Owner("ID");
// Remove ID and put your id (To get type \@Your username. DON'T copy the < , > and @ just take the numbers ex: 35465634)
helper.on("logged", function () {
// You need this for the bot to work,
helper.addCommand("!owner", helper.getOwner());
// This outputs the owner's username. sometimes its not working.
helper.addCommand("ayy", "lmao");
// This is to create a command, when someone typed ayy it replies lmao.
helper.addMentionCommand("how are you?", "I am good.");
// This is basicaly addCommand but it mentions the message sender before the output
// ex. "how are you?" "@username, i am good."
helper.addCommandStartWith("Hello", "Hello!");
// It's like addCommand but less strict, if it starts with the command it'll do the output.
// Here is a example.
// ex. "Hello guys!" "Hello!"
// Here is a reason you would actually need to use this, for a say command.
helper.addCommandStartWith("!say", "{content}");
// if someone types "!say Hi" the bot will say "Hi". Almost forgot {content} outputs what
// the message sender said after the 1st word
helper.addCommand("commands", helper.commands());
// This is to get a full list of commands, to take all the commands make this line after all commands like in this example.
// Commands: ayy, how are you?, Hello, !say
});
// You need this to end off the helper.on
// helper.login("email", "pass")
// For user bots add // to the begining of the loginToken and remove the // in helper.login
helper.loginToken("token");
// Insert your token here, if you are using a user account please acknowledge the terms and service
// WE DO NOT RECCOMEND USER ACCOUNTS!
// A video on how to get a bot account. https://www.youtube.com/watch?v=bUXYx7zgmx0