Skip to content
/ dpy-boilerplate Public template

Boilerplate configurations for Discord bots using discord.py

License

Notifications You must be signed in to change notification settings

GetPsyched/dpy-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dpy-boilerplate

Opinionated boilerplate configurations for bots written in Python using discord.py.

This project contains 2 boilerplate repositories that you can use to kickstart your Discord bot project(s).

NOTE: Although you can use this for your first project, I highly recommend understanding every bit of code that is written before relying on it, if not trying to code on your own first. These templates are meant for returning devs who want to spin up a bot quickly without setting up the necessities.

Choosing between basic and advanced

There are a bunch of distinctions between the 2 configs. The major ones are listed below!

Feature Basic Advanced
Cog-based architecture ✔️ ✔️
Prefix command examples ✔️ ✔️
Slash command examples ✔️ ✔️
Database SQLite PostgreSQL
Logging ✔️
Client session ✔️
Custom help command ✔️
Dev environment ✔️

TL;DR: Basic is good for a small scale bot with limited features. Advanced has a lot more options that you'd need when having a bigger feature-set.

Note: If you want to set up basic but want a feature from advanced without its entirity, you can grab it from there with little extra config.

Setup

The general setup for both the templates will look the same.

  1. You get the repository cloned on your system
  2. Set the initial configuration
  3. Search and complete all the FIXMEs in the code. Optionally the TODOs as well.
Installation for basic
  1. Clone the repository. Since we want to truncate the git history, let's get the latest zip. Replace <new-repo-name> with any name you like.

    curl -L https://git.sr.ht/~getpsyched/dpy-boilerplate-basic/archive/master.tar.gz | gunzip | tar xv
    mv dpy-boilerplate-basic-master <new-repo-name>
    cd <new-repo-name> && git init
  2. Set the environment variables in the .env.

  3. Done! Simply eliminate the FIXMEs and TODOs and you're setup with a nice little bot repo.

Installation for advanced

Skip local setup and deploy as is while forking this repo:
Deploy on Railway

  1. Clone the repository. Since we want to truncate the git history, let's get the latest zip. Replace <new-repo-name> with any name you like.

    curl -L https://git.sr.ht/~getpsyched/dpy-boilerplate-advanced/archive/master.tar.gz | gunzip | tar xv
    mv dpy-boilerplate-basic-master <new-repo-name>
    cd <new-repo-name> && git init
  2. Set the environment variables in the .env.

  3. TODO

About

Boilerplate configurations for Discord bots using discord.py

Resources

License

Stars

Watchers

Forks