Skip to main content

A short description of my package

Project description

The tele_ms Function

This function is designed to send messages to a specific Telegram user using the bot token and user's chat ID.

The function supports sending formatted text using MarkdownV2. Supported formats include:

  • Bold text: *text*
  • Italic text: _text_
  • Strikethrough text: ~text~
  • Monospaced text: `text`
  • Text with a link: [text](url)
  • Spoiler text: ||text||
  • Code block: ```code```

It also supports sending files and images via URL or file path. The function automatically detects whether the input is a path or URL and handles it accordingly. If the file or image includes text, it will be automatically added to the file or image description. Additionally, the function supports sending buttons of type types.InlineKeyboardButton, allowing multiple buttons in the same message or just one button. Let's start with examples.

# Importing the library
import pazok

Bot and user information

token = "token_bot" id = "chat.id"

Sending text only

text = "test" # Can be formatted with any supported telebot library format pazok.tele_ms(token, id, txt=text)

Sending text with a button

text = "test" # Can be formatted with any supported telebot library format button = "name_button", "url_button"

Sending multiple buttons in the same message

buttons = [ "name_button1", "url_button1", "name_button2", "url_button2", "name_button3", "url_button3" ]

Sending the button with text

pazok.tele_ms(token, id, txt=text, buttons=buttons)

Sending a file or image using their path or URL with text and button

text = "text" button = "name_button", "url_button" file = "Link or path to the file" image = "Link or image path" pazok.tele_ms(token, id, txt=text, file=file, buttons=buttons)

Note: It's possible to send either a file or an image in each message. It's not possible to send both an image and a file in the same message.

Sending an image

pazok.tele_ms(token, id, txt=text, img=image, buttons=buttons)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pazok-0.1.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

pazok-0.1.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pazok-0.1.1.0.tar.gz.

File metadata

  • Download URL: pazok-0.1.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.13

File hashes

Hashes for pazok-0.1.1.0.tar.gz
Algorithm Hash digest
SHA256 e3088dcdb68ca7c0c8b5a2032ac1746f991e7d258c24ab6bbc42c18769df6b11
MD5 cfdd690660bea8804ada6355608a47ef
BLAKE2b-256 646dcf955941271f072c5d309e8b0f98c5c663c8b17035c4f29bd1b0d3772b87

See more details on using hashes here.

File details

Details for the file pazok-0.1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pazok-0.1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.13

File hashes

Hashes for pazok-0.1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b2db3675f79b21e0de2f1e7d06a14f6cf9d9089e930e57e31c6558fd09b9a99
MD5 605462e0fcca9b8798bd333419625593
BLAKE2b-256 ece9b66917e23d4764c089805f148f952a2e8b324e7495af6e9d6cb6cc47b9dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page