Add your description here
Project description
JsonBot
Installation
pip install jsonbot
Usage
from jsonbot import JsonBot
JsonBot("token", {
"messages": {
"/start", {"response": "hello *{first_name}*", "parse_mode": "MarkdownV2"},
"/help": {"response": "Hello how can i help you"}
}
}).run()
you can generate code to osonbot library itself (supports only osonbot library, and can not generate fully)
from jsonbot import JsonBot
JsonBot("token", {
"/start", {"response": "hello *{first_name}*", "parse_mode": "MarkdownV2"},
"/help": {"response": "Hello how can i help you"}
}).generate_code(library="osonbot", file="main.py")
Handling Inline Messages
from jsonbot import JsonBot
JsonBot("token", {
"inline_messages": {
"callback_data1", {"response": "you clicked the first inline button"},
"callback_data2": {"response": "you clicked the sedond inline button"}
}
}).run()
Send message to specific user by his/her ID
from jsonbot import JsonBot
JsonBot("token", {
"messages": {
"/start", {"response": "hello *{first_name}*", "parse_mode": "MarkdownV2"},
"/send": {"id": 123456789, "response": "This is a message for a specific user"}
}
}).run()
Done for now
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
jsonbot-0.1.0.tar.gz
(2.6 kB
view details)
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 jsonbot-0.1.0.tar.gz.
File metadata
- Download URL: jsonbot-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
747e583b20a546e97875c7af94d06216eebaa09709e7cd5c0e3075832633287b
|
|
| MD5 |
00e7114f86c3e6bfb51e996b2f754109
|
|
| BLAKE2b-256 |
886eeed9d57a6d80790ebe58298f5d3ff74d274be87e8c1035cde78e252f157f
|
File details
Details for the file jsonbot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jsonbot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbb3011741a15903906e66140c28bb32232464011be2949cef25b119584046c
|
|
| MD5 |
5e25034f9f226ce94f86d40e556887e3
|
|
| BLAKE2b-256 |
2a274799f7f0a114f476034bcc26667d02390dbe7110092a07300e3952b20d78
|