Skip to content

Template for starting your own discord bot in python using a hooking system

License

Notifications You must be signed in to change notification settings

Mikk155/discord-bot

Repository files navigation

discord-bot

Template discord bot that supports a "Plugin" implementation with a hooking system

pip install -r requirements.txt

Create a file config.json in the workspace.

Open it and follow the schema instruction provided by this snippet:

{
    "$schema": "schema.json"
}

You have ./config_example.json for examples

After you have configured the bot you can run it in background with a .bat file:

start "" /B pythonw bot.py

Or either in developer mode:

@echo off

python bot.py -dev

pause
  • developer mode will make the function DEVELOPER() to return true

Developing

Create your plugins in plugins/

Import main:

from src.main import *

If you need any extra library to downoad create your own requirements at plugins/{your plugin name}_requirements.txt the bot will install them before it loads your plugin

Pull requests are welcome and encouraged.

Why

I made this almost for experimenting with python and the discord API but then i though on doing a discord bot for my server that i could easly implement/modify/remove features at any time because i have kind of memory problems, i always forget the logics i write after some months so here it is, this dumb plugin system for easly administration. Almost all plugins defined in this repo are actually running over a bot i have, you can invite it here