Skip to main content

ParsMeet Library Guide (Version 1.3.0)

Install the library:

pip install ParsMeet

Create a bot:

import ParsMeet
bot = ParsMeet.Bot(token="Your bot token", ai_key="AI key (optional)")

Send a message:

bot.send_message(chat_id, "Message text")

Send a message with a glass button:

btn1 = bot.create_callback("Button 1", "btn1")
btn2 = bot.create_callback("Button 2", "btn2")
bot.send_message(chat_id, "Text", reply_markup={"inline_keyboard": [[btn1], [btn2]]})

Send a photo:

bot.send_photo(chat_id, "Photo address or link",  caption="Image description")

Send file:

bot.send_document(chat_id, "file_address", caption="file_description")

Reply to message:

bot.reply_message(chat_id, message_id, "reply text")

Edit message:

bot.edit_message(chat_id, message_id, "new text")

Delete message:

bot.delete_message(chat_id, message_id)

Receive messages:

@bot.on_message_all()
def handler(data):
chat_id = data["chat_id"]
text = data["text"]
username = data["username"]

Receive button clicks:

@bot.on_callback_query()
def handler(data):
 chat_id = data["chat_id"]
callback_data = data["data"]

Group management (optional):

bot.ban_user(chat_id, user_id)
bot.unban_user(chat_id, user_id)
bot.promote_user(chat_id, user_id)
bot.demote_user(chat_id, user_id)
bot.pin_message(chat_id, message_id)

Connect to AI:

response = bot.ask_ai("Your question")
bot.send_message(chat_id, response)

Send to all:

bot.broadcast("Message text for everyone")

Run the bot:

bot.run()

Shut down the bot (from the console):

bot.off()

Full example (bot simple):

import ParsMeet

bot = ParsMeet.Bot(token="Your bot token")

@bot.on_message_all()
def handler(data):
chat_id = data["chat_id"]
text = data["text"]

if text == "/start":
btn = bot.create_callback("Menu", "menu")
bot.send_message(chat_id, "Hello, welcome", reply_markup={"inline_keyboard": [[btn]]})
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.3.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsmeet-1.3.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file parsmeet-1.3.1.tar.gz.

File metadata

  • Download URL: parsmeet-1.3.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for parsmeet-1.3.1.tar.gz
Algorithm Hash digest
SHA256 56653bdc80d6e649f97db3b36743734948393ad32c21f7e4a984680a71cd8394
MD5 116e70656f84a31d2fbc168a096c2742
BLAKE2b-256 800d146b4d91684f02981284a1e696ff90ee74283e95bc75496f763c2d6eaa8d

See more details on using hashes here.

File details

Details for the file parsmeet-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: parsmeet-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for parsmeet-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18f7921928499916b20a24fc2d7a2f3a26c7c931d133d4af9e1fb8a5548f0004
MD5 072eff1f5f960aecc8931011b137cfa1
BLAKE2b-256 68db1bf3ecebcc24f1fe8e03a6a3f4de399f153cbf45f8579dea462c707608be

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

1.3.2

2 files

This release

1.3.1 This release

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page