Skip to content

A ready to use Discord Bot Template using slash commands and buttons!

License

Notifications You must be signed in to change notification settings

federinik/Discord-Bot-Template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Issues License Stargazers


Logo

Discord Bot Template

A simple ready to use Discord Bot Template using slash commands and buttons!

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Acknowledgements

About The Project

A simple Discord Bot Template build with the Color-Chan.Discord library. This template includes basic commands including a help command with multiple pages using buttons. Plus a simple MongoDB connection.

  • Basic commands
  • Persistent command request logging
  • Command usage metrics
  • MongoDB connection

Default commands

Default commands image

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

Using the template

See the Create reposotiry from a template guide for a more detailed explanation.

  1. Navigate to the main page of the repository.
  2. Above the file list, click Use this template. Use template button
  3. Enter the name for your new repository and choose a visibility option.
  4. Click the Create repositoiry from template button.

Cloning

  1. Clone the repo
    git clone https://github.com/BrammyS/Discord-Bot-Template.git
  2. Go to the git folder
    cd Discord-Bot-Template
  3. Run the local dev build
    dotnet build

Usage

Environment variables

To run the Bot you will need to set 2 environment variables first.

  • BOT_TOKEN : Add your bot token as the value. The bot token van be found here.
  • MONGO_CON_STRING : Add your MongoDB connection string as the value. You can get a free MongoDB host on MongoDB Atlas.

Constants

After this you need to set the PublicKey and the BotId for your bot. These can be set in the Constants.cs class in Bot.Discord.

URL

Set the interaction end point for your bot. You will need to add this URL to you application. The interaction endpoint is located at https://YOUR_DOMAIN.COM:5001/api/v1/discord/interaction. Please do keep in mind that you will need to be able to access this endpoint from outside of your network. interactionUrlSetup

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

About

A ready to use Discord Bot Template using slash commands and buttons!

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.3%
  • Dockerfile 0.7%