/nextjs-discord-bot-boilerplate

A Nextjs Discord Bot Template that easily allows you to add and manage discord slash commands.

Primary LanguageTypeScriptMIT LicenseMIT

NextJS Discord Bot

🤖 Invite this Bot to your server
📚 Documentation

Yes, free fully functional rest-api discord bot 🤖 can be made using nextjs 🤯 🚀

I have done all of the abstraction for you, so you can focus on building your bot 🛠️

  • ✅ Easy Command Building
  • ✅ Easy Command Registration
  • ✅ Easy Deployment

Getting Started

1. Installation

NEXT_PUBLIC_APPLICATION_ID=
PUBLIC_KEY=
BOT_TOKEN=


# Custom secret key to register your commands
REGISTER_COMMANDS_KEY=

2. Adding your own Slash Commands

  • Just go to ./commands/tutorialhere.ts after cloning and you will see the template for creating a command

3. Deploy

  • Since this is a nextjs project, you can deploy it to vercel for free

4. Add Interaction Endpoint

After deploying you will have your url

5. Register Commands

Open your deployment website, fill and submit the REGISTER_COMMANDS_KEY you set earlier in the environment variables to register your commands.

Alternative way of registering command in Discord Documentation

6. Invite your discord bot

  • Open your deployment website and click "Invite Discord Bot" then your done!
    • the link has the necessary required permissions to run the bot