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.2.tar.gz (8.4 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.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsmeet-1.3.2.tar.gz
  • Upload date:
  • Size: 8.4 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.2.tar.gz
Algorithm Hash digest
SHA256 0a90aa6c89666c720be7c94ad5c132ea578d530070547bdf5d618cf204b95c3c
MD5 2cd880e117c5388ef6f76b39482494e3
BLAKE2b-256 342bd837a140de8ea25ea086a86793bfa58b1343ddea8a33db9bc1a0e87ee3ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: parsmeet-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 9.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca276d85bc43c407488e6001ea3e961146509f48458266bfe9902f54a19d4ab8
MD5 e349e559479d34e892ea759ba9445b8e
BLAKE2b-256 b6918a73eaab88bb8395f34a2a63c75d2716d0f6ab7fcba8d1967f173cf2fb10

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

This release

1.3.2 This release

2 files

1.3.1

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