logo
icon

Discord Bot Starter

A discord.js bot template written with TypeScript.

PlatformZeabur
Deployed9
PublisherMichaelYuhe
Deployed9 times
PublisherMichaelYuhe
Created2024-04-12
Services
service icon
Tags
Bot

Description

This template was created to give developers a starting point for new Discord bots, so that much of the initial setup can be avoided and developers can instead focus on meaningful bot features. Developers can simply copy this repo, follow the setup instructions below, and have a working bot with many boilerplate features already included!

Features:

  • Basic command structure.
  • Rate limits and command cooldowns.
  • Welcome message when joining a server.
  • Shows server count in bot status.
  • Posts server count to popular bot list websites.
  • Support for multiple languages.

Setup

Copy example config files.

  • Navigate to the config folder of this project.
  • Copy all files ending in .example.json and remove the .example from the copied file names.

Obtain a bot token.

  • You'll need to create a new bot in your Discord Developer Portal.

Modify the config file.

  • Open the config/config.json file.
  • You'll need to edit the following values: client.id - Your discord bot's user ID. client.token - Your discord bot's token.

Install packages.

  • Navigate into the downloaded source files and type npm install.

Register commands.

  • In order to use slash commands, they first have to be registered.
  • Type npm run commands:register to register the bot's commands.