https://github.com/dismob/dismob
A base for a discord bot with modularity and extensibility in mind.
https://github.com/dismob/dismob
bot design discord discord-bot discord-py discordbot discordpy dismob modular modular-design modularity python python-3 python3
Last synced: 13 days ago
JSON representation
A base for a discord bot with modularity and extensibility in mind.
- Host: GitHub
- URL: https://github.com/dismob/dismob
- Owner: dismob
- License: mpl-2.0
- Created: 2025-04-02T18:52:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-13T23:49:39.000Z (10 months ago)
- Last Synced: 2025-06-14T00:28:04.350Z (10 months ago)
- Topics: bot, design, discord, discord-bot, discord-py, discordbot, discordpy, dismob, modular, modular-design, modularity, python, python-3, python3
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord Modular Bot (Dismob)
This is a base discord modular bot using discord.py
Every features must be done in bot extensions placed in `plugins//main.py`.
An example extension `ping` is available which adds only one command `ping` to the bot.
## Installation
Make sure you've installed python.
open a command-line terminal in your project cloned/downloaded project folder.
Create a virtual environment for python.
```cmd
python -m venv venv
```
Activate it or enable it in your IDE.
Install dependencies.
```cmd
python -m pip install -r requirements.txt
```
Add a `.env` file at the root directory (alongside `main.py`) and add those lines:
```txt
BOT_TOKEN="your bot token here"
OWNER="your discord ID here"
CONFIG_DIR="config"
BOT_PREFIX="bot."
LOG_NAME="devbot"
LOG_CONSOLE_LEVEL="WARNING"
LOG_FILE_LEVEL="INFO"
LOCALE="fr_FR"
TZ="Europe/Paris"
```
> [!NOTE]
> The `CONFIG_DIR` is optional and will default to `config` if not set.
> The `BOT_PREFIX` is optional and will default to `!` if not set.
> The `LOG_NAME` is optional and will default to `dismob` if not set.
> The `LOG_CONSOLE_LEVEL` is optional and will default to `INFO` if not set.
> The `LOG_FILE_LEVEL` is optional and will default to `INFO` if not set.
> The `LOCALE` is optional
> The `TZ` is optional
Then to start the bot run:
```cmd
python main.py
```
## Commands
There are some commands built into the bot itself, they help manage the modules and other crucial features.
All of them are only available to the bot owner, as they have impact on all guilds the bot is added.
Command | Aliases | Description
--- | --- | ---
`shutdown` | | Stop the bot.
`sync` | | Sync the slash commands of the bot. This command is also available as standard bot command, useful when syncing for the first time.
`nick []` | `name` | Change the nickname of the bot in the current server, if no name is passed, then it will reset it to the default one.
`status [online\|idle\|dnd\|invisible]` | | Change the bot's status.
`modules [ ...]` | `mod` `plugins` | Manage the modules available to the bot. (see below for list of subcommands)
Below is the list of subcommands related to the module managements.
Subcommand | Aliases | Description
--- | --- | ---
`status [ ...]` | `s` | Display the loaded status of provided module names (or all available modules if no module name provided).
`load ...` | `l` `enable` `activate` | Load provided module names (at least one). For example `/module load ping` will load the `plugins/ping/main.py` extension.
`unload ...` | `u` `disable` `deactivate` | Unload provided module names (at least one). For example `unload ping` will unload the `plugins/ping/main.py` extension.
`reload ...` | `rl` `r` | Reload provided module names (at least one). For example `reload ping` will reload the `plugins/ping/main.py` extension.