Giter Site home page Giter Site logo

denvercoder1 / discord-bot-template Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 7.0 83 KB

Nextcord (discord.py fork) template for simple and maintainable Discord Bot creation

License: MIT License

Python 99.78% Procfile 0.22%
discord discordpy nextcord discord-bot

discord-bot-template's Introduction

Discord Bot Template

Discord Powered by Nextcord

This repo is a template for easy creation of maintainable Python Discord bots.

The library used is Nextcord, a maintained fork of Discord.py.

Nextcord documentation: https://nextcord.readthedocs.io/en/latest/

๐Ÿ“บ Python Discord Tutorial: https://www.youtube.com/playlist?list=PL9YUC9AZJGFG6larkQJYio_f0V-O1NRjy

How to use

Click "use this template" at the top of this repo and follow the instructions, or alternatively, initialize a git repo and copy the template files into the directory.

# Create a new folder (replace my-discord-bot with your bot's name)
mkdir my-discord-bot && cd my-discord-bot
# Initialize the folder as a git repository and copy the template files
git init
cp ../discord-bot-template/* .

Environment variables

To run your bot, you'll need a token and other secrets set in a .env file.

Create a file called .env and place it in the root of your project.

(You can do this by creating a copy of .env.sample and renaming it to .env)

The contents should look something like this (where the part after = is the token you received from the Discord Developer Portal)

DISCORD_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If you require additional API keys or variables specific to an enviroment, they should also be added here. You can access them by adding a line such as GUILD_ID = os.getenv("GUILD_ID", "") to config.py.

Heroku

runtime.txt and Procfile are used for Heroku configuration and can be deleted in case you do not plan on hosting there.

Heroku setup tutorial: https://www.youtube.com/watch?v=EreE-0hQibM

IDE Configuration

IDE config such as the .vscode folder do not normally belong on GitHub since they are often specific to a particular environment. To make sure GitHub will ignore the .vscode folder uncomment the line at the end of the .gitignore.

discord-bot-template's People

Contributors

denvercoder1 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.