A lightweight automation and Discord bot framework that lets you build bots using a simple scripting system.
Project description
⚡ tflows.py
tflows.py is a lightweight automation and Discord bot framework built around a scripting engine that lets you define bot behavior using simple text-based commands instead of large boilerplate code.
It is designed for fast bot development, easy customization, and extensible command logic.
🔗 Links
- PyPI: https://pypi.org/project/tflows/
- Documentation: https://toniec.github.io/tflows
- Discord: https://discord.gg/CMSXnfcCJW
- Repository: https://github.com/toniec/tflows
✨ Features
- 🧩 Script-based command system (write bot logic as plain text)
- ⚡ Async Discord integration using discord.py
- 🔁 Event-driven execution model
- 🧠 Built-in function registry (extensible commands)
- 🔌 Modular architecture for custom features
- 📦 Lightweight design with minimal setup
- 🛠️ Debug-friendly logging system
🚀 Example
from tflows import FlowBot
bot = FlowBot(prefix="!")
bot.command(
name="ping",
code="""
send pong $ping
log command executed
"""
)
bot.run("YOUR_TOKEN")
🧩 Built-in Functions
send
Sends a message to the current Discord channel.
Example:
send Hello world
log
Prints a message to the console for debugging.
Example:
log command executed successfully
⚙️ How It Works
tflows.py executes scripts using a lightweight interpreter:
- Parses command blocks line by line
- Matches each line to a registered function
- Resolves variables and context
- Executes asynchronously inside Discord events
🧠 Why Use tflows.py?
- Faster development than raw Discord.py
- No boilerplate-heavy structure
- Easy to extend with custom functions
- Ideal for automation scripting systems
- Keeps logic minimal and readable
📦 Installation
pip install tflows
📜 License
MIT License
⚡ Author
Made with ❤️ by Tonie
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tflows-0.0.7.tar.gz.
File metadata
- Download URL: tflows-0.0.7.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8d5453484f3764675c0b26c8849f7f5930402dc870bfbcdbd73134da24713c9
|
|
| MD5 |
0a779b803b02d0fd654fbe3765d6f0b1
|
|
| BLAKE2b-256 |
315db4b25253a9dac07b04fa0fda58e7b5940d6c60d5bc176f9a6da759973235
|
File details
Details for the file tflows-0.0.7-py3-none-any.whl.
File metadata
- Download URL: tflows-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cf2964a92af70b6dd261982323c41f944ee996f083adde8feab4a8ae2958431
|
|
| MD5 |
68b16d1264dfd4cc49860d64392d06b0
|
|
| BLAKE2b-256 |
64bad8a9c9bdfa92f2cd78cfe4dad40eae996a8c5c684b588f9e302fac293cbc
|