Skip to content

Writing Modules

Everything you need to write your own modules.

For regular folks: If you're not planning to write modules, read Key Concepts — it explains FSM, Watcher, Cron and more in simple terms.


Getting Started

If you're a beginner, start with Basics. It covers the mandatory parts of any module: Meta, strings, @loader.tds.


Sections

Section What it's about
Basics Minimal module, Meta, strings, lifecycle
Commands @loader.command, argument parsing, config
Answer Utils utils.answer, HTTP requests, media
Watcher, Cron, Events Auto-reactions, scheduled tasks, event handlers
FSM Step-by-step dialogs, Pydantic validation
Emoji Callbacks Reactions as buttons
Security Access levels, sandbox, audit hook
ZIP Modules Packaging modules as zip packages
Distribution How to share your module with others
Utils Reference All utils.* functions

Optional reading