Introduction
ZwyLib is a compact plugin-library that originally started as part of various plugins from the developer’s channel , and is now available to anyone who might find it useful.
Getting Started
Any plugin that wants to use ZwyLib’s tools must first import it (after installing it via this post ):
# __id__, __name__, ...
try:
import zwylib # import the library
except (ImportError, ModuleNotFoundError):
# zwylib not found — its tools cannot be used. raise an error
raise Exception("Cannot run without ZwyLib. Please install it.")
class MyPlugin(BasePlugin):
... # your plugin logicWhat’s Inside
- Command System — register chat commands, subcommands, and error handlers.
- Requests — coroutine-based wrappers around Telegram’s API.
- Logging and Notifications — prefixed loggers and bulletins.
- Settings — persistent, per-plugin settings bound directly to settings-screen components.
- Async — a shared background event loop for running coroutines from plugin code.
- Hooks — Xposed method hooking and reflection helpers.
- UI — popup menus, alert dialogs, input/selector dialogs, progress bottom sheets, and chat/dialog pickers.
- Plugin Management — look up, install, reload, and inspect other plugins.
- Localization — build multi-language string tables with pluralization support.
- Auto-update — let ZwyLib keep your plugin up to date automatically.
- Cache Files — simple binary/JSON file-backed storage.
- Utilities — assorted small helpers.
Last updated on