Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycord-bot-class

Requirements

Features

  • Load cogs from a directory
  • Load cogs from subdirectorys
  • Add static cogs
  • Async database functions
  • Built-in on_ready event
  • Built-in error handler

Bot parameters

  • token (String)
  • ready_event (Boolean)
  • error_handler (Boolean)
  • debug_logs (Boolean, optional, default False)

Example

import discord

# Import the Bot class
from BotClass import Bot

# Create a bot variable
bot = Bot(
    token="abc123",
    ready_event=True,
    error_handler=True,
    intents=discord.Intents.default()
)

if __name__ == '__main__':
    # Loads cogs from a directory, for example: events.onready
    bot.load_dir('events')

    # Loads cogs from subdirectorys, for example: cogs.slashcommands.ban
    bot.load_subdir('cogs')

    # Add static cogs
    bot.add_static_cogs(["commands.help", "commands.kick"])

    # bot.exec() starts the bot
    bot.exec()

About

A custom bot class for Pycord with many features

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages