Getting Started

This page shows how to quickly get started with NovaCord-Py.

Installing

Python 3.9 or higher is required.

pip install novacordpy

You can also install the latest version from GitHub. Note that this version may be unstable.

pip install git+https://github.com/NovaCord-at/NovaCord-py

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 novacordpy.Bot

Hint

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

Example

A quick example of how NovaCord-Py works. You can find more examples here.

Pycord
import discord

import novacordpy

bot = novacordpy.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 novacordpy


class Bot(novacordpy.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())