- Advanced moderation system.
- Lots of utility & fun commands.
- Advanced music system with support for various sources (depends on your Lavalink server).
- Clean & informative help menu.
-
Clone this repository
git clone https://github.com/swayam25/Square-Bot square cd square
-
Create
config.toml
fromexample.config.toml
and fill in the required values.Configuration
-
owner-id
(int
)- Owner's discord id.
- Gives access to all commands.
-
owner-guild-ids
(list[int]
)- List of guild ids.
- Developer commands will only work in these guilds.
-
system-channel-id
(int
)- System channel id.
- Bot will send logs in this channel.
-
support-server-url
(str
)- Support server url.
- Bot will use this url for support server.
-
emoji
(Literal["default", "custom"]
)- Emoji type.
default
will use default emojis.custom
will use custom emojis defined in.cache/emoji.json
(requires setting up custom emojis).- If you choose
custom
, make sure to define the emojis in the.cache/emoji.json
file.- To create custom emojis, upload a
.zip
file containing the emojis (.png
format) using/emoji upload
command.- There is a zip file of custom emojis that are used in this bot. Upload the
emojis.zip
via/emoji upload
command. - Emoji file names must match the attributes of
Emoji
class inemoji.py
. Theemojis.zip
file already does this for you.
- There is a zip file of custom emojis that are used in this bot. Upload the
- Run the
/emoji sync
command to sync the emojis to.cache/emoji.json
. - Then set the
emoji
field tocustom
.
- To create custom emojis, upload a
-
bot-token
(str
)- Discord api token.
- Bot will use this token to connect to discord.
-
database-url
(str
)- Database url.
- Bot will use this url to connect to the database.
- Postgres database is supported.
- Example:
asyncpg://user:password@db.host:5432/square
.- If your connection string starts with
postgresql://
, replace it withasyncpg://
. - Services like Supabase provide a
postgresql://
connection string, remember to change it toasyncpg://
.
- If your connection string starts with
-
[colors]
theme
(str
)- Theme color.
error
(str
)- Error color.
-
[lavalink]
host
(str
)- Lavalink host.
port
(int
)- Lavalink port.
password
(str
)- Lavalink password.
region
(str
)- Lavalink region.
secure
(bool
)- Lavalink secure status
-
-
Start the bot.
uv run main.py
Important
Make sure to have uv installed on your system to run the bot. Know more about installing uv here.
-
Follow steps 1 & 2 from the installation guide. Ignore if already done.
-
Run docker container (via
docker compose
)docker compose up -d
-
Things to keep in mind
- Follow our commit message convention.
- Write meaningful commit messages.
- Keep the code clean and readable.
- Make sure the bot is working as expected.
-
Code Formatting
- Run
ruff format
before committing your changes or useRuff
extension in your code editor. - Make sure to commit error free code. Run
ruff check
to check for any errors.
- Run