Yet another another rewrite of Goldy Bot, a discord bot framework for my own bots.
Project description
[!WARNING]
GoldyBot is in very deep development right now so some utils and code will be incomplete and breaking changes will occur.
Table of Contents
Why Version 5?
I'm developing a new Discord bot framework to replace my previous one, which I found limiting and frustrating. The new framework will be more efficient and user-friendly and will utilize what I believe to be a better API wrapper than discord.py, which prompted the rewrite. Originally, I planned to update V4 for backward compatibility, but it would be too difficult, and my extensions would need to be rewritten anyways. Therefore, I'm excited to announce the upcoming release of Goldy Bot Framework V5, which will be a brand-new framework starting fresh. 🍋
🏆 Goal
My goal is to have a functional framework that's fast and lightweight and has the least code possible to maintain.
💛 Is goldy bot for you?
Do note that the whole point of this framework is to make it easier for myself to develop discord bots so you may dislike the way certain things are implemented; if so I highly recommend you not use the framework because more and more things will be implemented that way in the future so it's best to seek an API wrapper like nextcord for your discord bot development needs instead.
On a similar note goldy bot v5 is currently in an ALWAYS changing state, previous code WILL BREAK, non-stable versions especially so you'll find yourself always fixing your extensions after each release.
⚡ Nextcore
Nextcore is the perfect API wrapper for v5, it's fast, low-level, and can be easily modified. Additionally, Nextcore provides a ton of control, this gives me the freedom to build my framework exactly the way I want it, without any unnecessary overhead like if I stayed with nextcord/discord.py.
🛠 Install/Set Up - Normal
These instructions assume you have a MongoDB database, Git and Python installed.
[!WARNING]
As of Goldy Bot
v5.0dev12
Git is required or else included extensions will not function.
[!NOTE]
We recommend a clean Mongo database, GoldyBot will connect to your MongoDB database and create stuff the first time you run.
- Install package from PyPI.
# Windows/Linux
pip install GoldyBot
- Generate a quick template. Create a directory of your choice anywhere, then open a terminal in that directory and type the following below.
# Windows/Linux
goldybot setup
- Run goldy! ⚡
Make sure to enter your Discord BOT token and MongoDB database URL in the .env
file generated in your folder.
DISCORD_TOKEN="DISCORD BOT TOKEN HERE"
MONGODB_URL="MONGO DATABASE URL HERE"
JSON Configuration
Also, make sure to add your discord guild to allowed_guilds
in goldy.json
.
You may change "test_server"
BUT ONLY if it's not a server you're going to be developing and testing on. The code name test_server
is already reserved for you to use as a development environment to test your commands. Slash Commands will reload/update quicker in the test_server
as they will be registered as guild commands instead of global commands. Check out discord's explanation of global and guild commands for more clarification.
If your guild/server is not a testing server you may name it whatever you like but just remember this will be the code_name of the guild within goldy bot and you'll use this code_name to reference it later.
You may also want to add your discord member id to "bot_dev"
, like so: "bot_dev": "332592361307897856"
. If you don't you may be unable to run specific bot administration commands within Discord.
{
"version": 1,
"goldy" : {
"branding": {
"name": "💛 Goldy Bot"
},
"extensions": {
"include": [],
"ignored_extensions" : [],
"late_load_extensions": [],
"raise_on_load_error" : true,
"folder_location" : "./extensions"
},
"allowed_guilds" : {
"{guild_id_here}" : "test_server"
},
"bot_dev": null,
"ding_on_exit": false
}
}
Now you may run GoldyBot! 🌠✨
python run.py
and you're done ✨
Pulling Extensions
As of Goldy Bot v5.0dev12
, extensions are no longer pre-included due to this issue.
So now if you would like to include them you would need to specify it in the config with include
like so:
{
"goldy" : {
"extensions": {
"include": ["mal_cord"]
}
}
}
and you can find the extension code names at the goldybot.repo github repository.
🐬 Install/Set Up - Docker
These instructions assume you have Docker installed and that you are running on Linux, although these same steps can be followed on Windows too excluding the Linux commands.
- Clone the goldybot-docker repo.
git clone https://github.com/Goldy-Bot/goldybot-docker
- Set up environment variables.
cd goldybot-docker
cp .env.example .env
nano .env
Now enter your Discord BOT token over here.
DISCORD_TOKEN="DISCORD BOT TOKEN HERE"
GOLDY_DIRECTORY="./goldy"
- 🐬Docker compose! Now you may run docker compose to create your 📦container.
docker compose up
Although you WILL get an error from goldy bot asking you to configure your goldy.json
file. You may follow the instructions here on how to configure that. The goldy.json
file can be found in the goldy directory at root. This goldy directory is an exposed docker folder allowing you to configure and add extensions to goldy bot with ease.
Now run docker compose once again and goldy should be running after the MongoDB database has booted.
docker compose up
© Copyright (C) 2023 Goldy (Under the GPL-3.0 License)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file GoldyBot-5.0.dev13-py3-none-any.whl
.
File metadata
- Download URL: GoldyBot-5.0.dev13-py3-none-any.whl
- Upload date:
- Size: 204.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0470f2201c8cd9790bda3907d701633052ce8e3a3489c4f75977464ebc0aafc |
|
MD5 | 64047f5143ec9660e31b2e200e5a7b2c |
|
BLAKE2b-256 | 629ae015ba624358229f52b340e9c8df8479d7750e7319cc5ed0ef81d85f4d73 |