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.0.tar.gz (7.5 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.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsmeet-1.3.0.tar.gz
  • Upload date:
  • Size: 7.5 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.0.tar.gz
Algorithm Hash digest
SHA256 9f56d19163bd591482d0f02d6fe0f4b87f6de9ca3807da1364b9cd801f74029a
MD5 dfc8ac99244f0cb8c51ec7e9419bd692
BLAKE2b-256 3febd44bc400d81e41d9175add92263aa83a813c6759bfd9168382eeccd90131

See more details on using hashes here.

File details

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

File metadata

  • Download URL: parsmeet-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a65ac9ab26879e7c744de7648258ebe866aa8bacfc123b1bf1488e2bea9f645
MD5 01284aec2a86c24a93684b2cc4e4300d
BLAKE2b-256 813a28f6dbfe1ce63d3b708505bf663324824a19b0b234e64b1308c6c454764e

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

1.3.2

2 files

1.3.1

2 files

This release

1.3.0 This release

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