| date | 2025-06-21 | |||||||
|---|---|---|---|---|---|---|---|---|
| category |
|
|||||||
| tags |
|
|||||||
| description | Usage and customization of ModuBotCore | |||||||
| author |
|
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.
NAME: ClassVar[str] = "ModuBotCore"
VERSION: ClassVar[str] = "0.0.1"
LOGGER_CONFIG: ClassVar[Type[LoggerConfig]] = LoggerConfig
MODULE_BASE_CLASS: ClassVar[Type[BaseModule]] = BaseModulefrom 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.