Getting Started

This page shows how to quickly get started with EzCord.

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.

pip install git+https://github.com/tibue99/ezcord

First Steps

You should already have a basic understanding of Discord.py or Pycord.

  1. Create a new bot in the Discord Developer Portal

  2. Create a bot object using ezcord.Bot

Hint

If you are using Pycord with Prefix commands, use ezcord.PrefixBot instead.

Example

A quick example of how EzCord works. You can find more examples here.

Pycord
import discord

import ezcord

bot = ezcord.Bot(
    intents=discord.Intents.default(),
    error_webhook_url="WEBHOOK_URL",  # Replace with your webhook URL
    language="de",
)

if __name__ == "__main__":
    bot.load_cogs("cogs")  # Load all cogs in the "cogs" folder
    bot.run("TOKEN")  # Replace with your bot 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")  # Replace with your bot token


if __name__ == "__main__":
    asyncio.run(main())