Git Product home page Git Product logo

discord-bot-template's Introduction



Discord BOT Template

This is a template used to start developing a Discord BOT in Node.JS.

Setup

  • Download the repo
  • Edit the config.json adding your BOT's token and desired prefix.
  • Start the BOT using the commmand node main.js in the same directory as main.js

Folder Structure

├── cfg
│   └── config.json
├── commands
│   ├── help.js
│   └── Other commands here. (Filename = command usage)
├── events
│   ├── message.js
│   └── ready.js
├── node_modules
│   └── All modules are included in source code.
├── main.js
├── package-lock.json
└── package.json

Creating Commands

Creating a new command is simple, create a new file in the commands folder calling it whatever you want the command to be called, for example ping.js
Add the following code to the new command file. In every command file you will always need to use this format. (message.channel.send('pong!') is not reqired, just an example).

const discord = require ("discord.js");

exports.run = (client, message, args) =>{
    message.channel.send ('pong!')
}

Further documentation can be found here or you can read my Blog Post which will explain how to create a Basic Discord BOT here

Contribute

If you would like to contribute to the project please open a PR (Pull Request) clearly showing your changes.

Issues

If you have any issues feel free to open an issue or join the Discord Server

Extra

Created by LachlanDev#8014

discord-bot-template's People

Contributors

lachlandev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.