Skip to content

xuc323/discord-bot

Repository files navigation

Discord Welcome Bot

Add Discord Welcome Bot to your Discord server

Github Page

Requirements

  • git
  • node.js >= 16.x
  • npm

Usage

After clone the repo to your local machine, perform the following command to install the required dependencies:

$ npm install

After installing the required dependencies, run the following command to start the bot:

$ npm start

Or you can run the following command to start the bot with nodemon, so the bot will be automatically restarted once changes are detected:

$ npm test

Environment Variables

Discord Application Token

Obtain the Discord application token from the Discord developer portal.

Once the token is obtained, create a .env file to store the configurations. Remember to not leak those. Prefix is a special function call so the bot will not response to every single messages. You can choose any prefix as you wish.

This program uses postgresql as the database. URL format should be postgres://{user}:{password}@{host}:{port}/{database}.

# .env
DISCORD_TOKEN=YOUR_TOKEN
DATABASE_URL=POSTGRES_DATABASE_URL
PREFIX=!

Templates

Command Templates

module.exports = {
  name: "",
  description: "",
  usage: "",
  category: "",
  aliases: [],
  agrs: true,
  execute() {
    // code to execute
  },
};

Packages

Releases

No releases published

Packages

No packages published