Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

luisbarrasandoval/discord_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot for Discord

Add new command

Each command is a .py file that will be loaded dynamically when the bot starts. the command function must have the same file name.
Example: hello.py

# simple command example
async def hello(ctx):
    username = ctx.message.author.name
    await ctx.send(f'Hello {username}!')

The setting.py file defines the list of COMMAND directories, the bot will look for commands in those folders

DESCRIPTION = 'Mi primer bot de discord'
COMMANDS = ['bot/command/basics/']

Execute

  1. clone project
  • git clone https://github.com/luisbarrasandoval/discord_bot
  • cd discord_bot
  1. install pipenv
  • pip3 install pipenv
  • pipenv shell
  1. install dependencies
  • pipenv install
  1. change token in src/config.py
TOKEN = 'YOUR TOKEN'
  1. Run
  • cd src && python3 main.py

About

Estrutura basica para bot de discord

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages