Python: libs Reference
Counters, random values, date/time, webhook URLs, and regex.
libs is a collection of small utilities for common bot tasks.
Resources — counters
Numeric counters, either bot-wide, per-user, or for a specific user.
| Method | Scope |
|---|---|
globalRes(key) | Bot-wide counter. |
userRes(key) | Current user’s counter. |
anotherRes(key, user=None) | A specific user’s counter. |
Each returns an object with .value(), .add(n), .cut(n), and .set(v).
Random values
Date & time
Webhook URLs
Build a URL that routes back into your bot — useful for payment callbacks or external services that need to reach a specific command.
Regex
The standard Python re module, available as libs.re.
Last updated August 11, 2026
Was this page helpful?