An easy-to-use extension for Discord.py and Pycord
Project description
An easy-to-use extension for Discord.py and Pycord with some utility functions.
Features
✏️ Reduce boilerplate code
✨ Error handling
- Automatic error handling for slash commands
- Error webhook reports
- Custom logging
📚 i18n
- Slash command translation (groups, options, choices)
- Translate messages, embeds, views, modals and more
⚙️ Extensions
- Help command - Automatically generate a help command for your bot
- Status changer - Change the bot's status in an interval
- Blacklist - Block users from using your bot
Installing
Python 3.9 or higher is required.
pip install ezcord
You can also install the latest version from GitHub. Note that this version may be unstable and requires git to be installed.
pip install git+https://github.com/tibue99/ezcord
If you need the latest version in your requirements.txt
file, you can add this line:
ezcord @ git+https://github.com/tibue99/ezcord
Useful Links
Examples
- For more examples, see the example repository or the sample code.
- Note: It's recommended to load the token from a
.env
file instead of hardcoding it. EzCord can automatically load the token if aTOKEN
variable is present in the.env
file.
Pycord
import ezcord
import discord
bot = ezcord.Bot(
intents=discord.Intents.default()
)
if __name__ == "__main__":
bot.load_cogs("cogs") # Load all cogs in the "cogs" folder
bot.run("TOKEN")
Discord.py
import asyncio
import discord
import ezcord
class Bot(ezcord.Bot):
def __init__(self):
super().__init__(intents=discord.Intents.default())
async def setup_hook(self):
await super().setup_hook()
await self.tree.sync()
async def main():
async with Bot() as bot:
bot.add_help_command()
bot.load_cogs("cogs") # Load all cogs in the "cogs" folder
await bot.start("TOKEN")
if __name__ == "__main__":
asyncio.run(main())
Contributing
You are welcome to contribute to this repository! Please refer to the full contribution guide.
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 Distribution
ezcord-0.7.1.tar.gz
(58.1 kB
view details)
Built Distribution
ezcord-0.7.1-py3-none-any.whl
(65.7 kB
view details)
File details
Details for the file ezcord-0.7.1.tar.gz
.
File metadata
- Download URL: ezcord-0.7.1.tar.gz
- Upload date:
- Size: 58.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b37aa638a6fc9be32137ce389e5deaa3a6cda288865201462487b1ca2bfca3c |
|
MD5 | 11fb688b2108e946941b4c4f9d6c87f2 |
|
BLAKE2b-256 | e63c5c9d2f341ad06cba4fc4b8adc0df272d1a9504ae26b88cdc99f045452861 |
File details
Details for the file ezcord-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: ezcord-0.7.1-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7981044a094115d102c0548603bf7eda8a29cf21b14b007819b0b4b64621d0e |
|
MD5 | 021f47895fbe77025374cea02e9281d7 |
|
BLAKE2b-256 | a8350f20d0eb352f4c18e32f2ff005ac61be889f32288458d3051fbc638407b5 |