Skip to content

JoshMerlino/joshobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Josh O' Bot

The all in one Discord bot!

Invite Josh O' Bot to your Discord Server!

Running the bot

ℹ To run the bot run index.js

⚠ Be sure to create a .env file and replace ... with the appropriate variables.

# Allow requests to own server
NODE_TLS_REJECT_UNAUTHORIZED	= 0

# Nodejs mode
MODE				= DEVELOPMENT # or PRODUCTION

# Secret API Keys
CLIENT_SECRET			= ...

Adding Commands

  1. Make a new file in the src/commands (The name of the file does not matter as long is it is a .js file)
  2. Follow this format in the new command file
module.exports = class Command extends require("../Command.js") {

	constructor() {

		// Add aliases to command
		super([ "new-command" ], ...arguments);

		// Add command to help
		this.register("Command Description...", HelpSection.GENERAL /* see or create enum values in src/enum/HelpSection.js */, [{
			argument: "Argument",
			required: true,
		}]);

	}

	async onCommand({ args, sender, guildConfig, root, channel, guild, audit }) {

		// TODO: Create command logic...

		// Send command usage
		return await this.sendUsage(channel);

	}

}

About

The best Discord bot around

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •