Skip to main content

This lib for sending message to tg bots

Project description

Documentation link

Python

How to install ?

pip install tg-bot-sender

Imports

from tg_bot_sender import Data, TelegramSender

Getting started

The logs parameter indicates that logs are saved in json format

tg = TelegramSender(telegramToken, logs = False)

Response structure

{ "amount": 0 } // number of messages sent

Options for sending messages

sendFromIds - sending to users

tg.sendFromIds([...telegramUserIds], Data(
    text = 'Hello',
    photo = 'Photo link',
    buttons = [{
        buttonTitle: 'Hello',
        buttonUrl: 'https://google.com'
    }]
))

sendFromId - sending to the user

tg.sendFromIds(telegramUserId, Data(
    text = 'Hello',
    photo = 'Photo link',
    buttons = [{
        buttonTitle: 'Hello',
        buttonUrl: 'https://google.com'
    }]
))

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

tg_bot_sender-0.7.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file tg_bot_sender-0.7.tar.gz.

File metadata

  • Download URL: tg_bot_sender-0.7.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.0

File hashes

Hashes for tg_bot_sender-0.7.tar.gz
Algorithm Hash digest
SHA256 5cea59b475d900d51cac60712159c27a80ee0d5721c4aa59c9c8816c39a180a9
MD5 e4a75121c751f5e93daf2dfc5c468f38
BLAKE2b-256 e4be866107424376f5a4282546a0aa7f06760b58d058780e92ebab8b99e8e41f

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