Migration from aiogram¶
Peyk intentionally follows aiogram 3 naming and handler patterns where the semantics are shared, while adding a platform-neutral layer.
Import mapping¶
aiogram |
peyk |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
keyboard builders |
|
What is intentionally identical¶
The main Bot/Dispatcher/Router shape, decorator handlers, filters, state groups, keyboard builders, callback-data packing, and neutral formatting are designed around aiogram 3 usage patterns.
What differs¶
A bot is created with
platform="telegram" | "bale" | "rubika". Application handlers do not carry platform names.Incoming and outgoing values use neutral Peyk objects where a cross-platform contract exists.
.rawremains an explicit escape hatch to the native platform object.bot.clientexposes the selected native client when an application needs a platform-specific API.Unsupported capabilities follow the documented degrade/raise policy instead of being silently assumed to exist everywhere.
The
messageobserver is for normalized message events; Telegram edited/channel-post events have dedicated observers.
Compatibility shims¶
Legacy import paths retained by the project remain available where documented. Deprecated shims emit DeprecationWarning and are scheduled for removal only in a future breaking release; no removal is part of this release.