Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.16 KB

File metadata and controls

56 lines (40 loc) · 1.16 KB
date 2025-06-21
category
core
tags
core
ModuBotCore
customization
description Usage and customization of ModuBotCore
author

ModuBotCore Usage

You can use the default core directly:

from ModuBotCore import ModuBotCore

ModuBotCore().run()

Or you can customize it by creating your own class that inherits from ModuBotCore.

You have access to the logger via self.logger.

To start and stop the bot, use the run() and stop() methods.

Important ClassVars

NAME: ClassVar[str] = "ModuBotCore"
VERSION: ClassVar[str] = "0.0.1"
LOGGER_CONFIG: ClassVar[Type[LoggerConfig]] = LoggerConfig
MODULE_BASE_CLASS: ClassVar[Type[BaseModule]] = BaseModule

Example: Custom Core

from ModuBotCore import ModuBotCore
from ModuBotCore.config import LoggerConfig

class MyLoggerConfig(LoggerConfig):
    LEVEL = "DEBUG"

class MyBot(ModuBotCore):
    NAME = "MyCustomBot"
    VERSION = "1.2.3"
    LOGGER_CONFIG = MyLoggerConfig

bot = MyBot()
bot.run()

This allows you to extend and modify the core functionality as needed.