ParsMeet Library Help
Install the library:
pip install ParsMeet
Create a bot:
import ParsMeet
bot = ParsMeet.Bot(token="Your bot token")
Send a message:
bot.send_message(chat_id, "message text")
Send a message with a glass button:
bot.send_message(chat_id, "text", reply_markup={
"inline_keyboard": [
[{"text": "Button 1", "callback_data": "btn1"}],
[{"text": "Button 2", "callback_data": "btn2"}]
]
})
Send a photo:
bot.send_photo(chat_id, "photo address or link", caption="Photo description or post text")
Send a file :
bot.send_document(chat_id, "file_address", caption="file_description")
Edit message :
bot.edit_message(chat_id, message_id, "new text")
Delete message :
bot.delete_message(chat_id, message_id)
Get messages:
@bot.on_message_group()
def handler(data):
chat_id = data["chat_id"]
text = data["text"]
username = data["username"]
Get button clicks :
@bot.on_callback_query()
def handler(data):
chat_id = data["chat_id"]
callback_data = data["data"]
Run bot :
bot.run()
Shut down bot (from console) :
bot.off()
Full example (simple bot) :
import ParsMeet
bot = ParsMeet.Bot(token="Your bot token")
@bot.on_message_group()
def handler(data):
chat_id = data["chat_id"]
text = data["text"]
if text == "/start":
bot.send_message(chat_id, "Hello, welcome")
elif text == "/help":
bot.send_message(chat_id, "Commands: /start and /help")
bot.run()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parsmeet-1.2.1.tar.gz
(7.1 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 parsmeet-1.2.1.tar.gz.
File metadata
- Download URL: parsmeet-1.2.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0da19fced709893ea508c6398561891853740a0d9cf93e0b0561caac87990faa
|
|
| MD5 |
439cf39bb603c9ec8f7a020f5edcf356
|
|
| BLAKE2b-256 |
c09c559566d93935597f465cdc7c335d73e906dc8f8de8331bad61e7417e7afb
|
File details
Details for the file parsmeet-1.2.1-py3-none-any.whl.
File metadata
- Download URL: parsmeet-1.2.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5da7f87a17973ffc0846d60acdb27adb13b83a640199602fa0f3ed849c20ba0d
|
|
| MD5 |
80161b8348cf09197ac849f5e97c5493
|
|
| BLAKE2b-256 |
75449b1547be468fbaabe0b40af50163e31271aaaf75d2b38e5497bd6e1f8a7f
|