Discord bot template.py

Overview

discord_bot_template.py

A minimal and open-source discord.py boilerplate for kick-starting bot projects.

I spend a lot of time developing bots for different communities on discord, and I find myself constantly rewriting the same basic boilerplate for each project. After searching for an existing template with no luck, I decided to write my own that'll suit any type of application.

So this repository includes an all inclusive bare-bones boilerplate for discord.py bot development that you can use as a basic skeleton for your next project.

Prerequisites

  • Python 3.6 +
  • The pip package management tool.

Disclaimer

Slash commands can take some time to register on guilds (usually an hour or two.) If you'd like to test a slash command beforehand, use the guild_ids in the command decorator to register them instantly.

@commands.slash_command(
 name="command",
 description="Command description",
 guild_ids=[GUILD_ID1, GUILD_ID2] # The ID(s) of the guild(s) you wish to test.
)

Installation

  1. Clone the repository. git clone https://github.com/tarranprior/discord_bot_template.py.
  2. Navigate to the project folder. cd "discord_bot_template.py".
  3. Install the dependencies. pip install -r requirements.txt.
  4. Create an application at Discord Developer Portal. Build a bot, and copy the token.
  5. Invite the bot to your server/guild.
  6. Update the values in configuration
  7. Run the bot. python discord_bot.py.
  8. Start developing!

Configuration

  1. Update the values in SAMPLE.env and rename to .env.

    DISCORD_TOKEN = YOUR_BOT_TOKEN
    DISCORD_ADMIN = YOUR_USER_ID
  2. Optional: Update the values in config.json.

    " "status": "discord_bot_template.py" }">
    {
    	"prefix": ">"
    	"status": "discord_bot_template.py"
    }

Usage

This bot includes a handful of features that are useful for all development projects. For example, developer.py commands.

  • config - Update the bot's configuration (prefix, status etc.)
  • purge - Deletes n messages.

License

This project is licensed under the MIT License - see the LICENSE file for details.

You might also like...
A discord.py bot template with easy deployment through Github Actions
A discord.py bot template with easy deployment through Github Actions

discord.py bot template A discord.py bot template with easy deployment through Github Actions. You can use this template to just run a Python instance

An Open-Source Discord bot created to provide basic functionality which should be in every discord guild. We use this same bot with additional configurations for our guilds.

A Discord bot completely written to be taken from the source and built according to your own custom needs. This bot supports some core features and is

Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single bot.

Discord ToolBox Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single b

Linky bot, A open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

LinkyBot Linky bot, An open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google
Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google

Advanced Discord.py Image Bot CREDITS Made by RLX and Mathiscool README by Milrato Installation Guide in .env Adjust the TOKEN python main.py to start

Example-bot-discord - Example bot discord xD

example-python-bot-discord Clone this repository Grab a token on Discord's devel

YouTube-Discord-Bot - Discord Bot to Search YouTube
YouTube-Discord-Bot - Discord Bot to Search YouTube

YouTube Bot Info YouTube Bot is a discord bot where you can search for anything

SongLink Discord Bot - Discord bot to share music links easily

SongLink_Discord_Bot Discord bot to share music links easily. Take a link from y

Anime-Discord-Bot - Lightweight anime searching Discord bot supported by the AnilistPython library (anilist.co APIv2 wrapper))
Owner
Tarran Prior
Tarran Prior
Pincer-bot-template - A template for a Discord bot created using the Pincer library

Pincer Discord Bot Template (Python) WARNING: Pincer is still in its alpha/plann

binds 2 Mar 17, 2022
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022
A template that everyone can use for the start of their discord bot

Python Discord Bot Template This repository is a template that everyone can use for the start of their discord bot. When I first started creating my d

null 2 Nov 1, 2021
My personal template for a discord bot, including an asynchronous database and colored logging :)

My personal template for a discord bot, including an asynchronous database and colored logging :)

Timothy Pidashev 9 Dec 24, 2022
A discord bot with information and template tracking for pxls.space.

pyCharity A discord bot with information and template tracking for pxls.space. Inspired by Mikarific's Charity bot. Try out the beta version on your s

null 1 Dec 3, 2021
A clean, easy to scale discord bot template

A clean, easy to scale discord bot template. Develope using nextcord library and can be use with any other discord.py forked library.

めがねこ 3 Mar 3, 2022
Discord bot template.py

discord_bot_template.py A minimal and open-source discord.py boilerplate for kick-starting bot projects. I spend a lot of time developing bots for dif

Tarran Prior 1 Feb 24, 2022
A discord.py bot template with Cogs implemented.

discord-cogs-template A discord.py bot template with Cogs implemented. Instructions Before you start ⚠ Basic knowledge of python is required. Steps If

censor 2 Sep 2, 2022