Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.31 KB

README.md

File metadata and controls

48 lines (30 loc) · 1.31 KB

Soroush Messenger Bot Python SDK

Use SoroushBot.py to send video ,image and file easier !

if you can ,please help us to complete this script (SoroushBot.py) .

Installation

Run the below commands

git clone https://github.com/soroush-app/bot-python-sdk
cd bot-python-sdk
pip install -r requirements.txt

Usage

from SoroushBot import SoroushBot

bot_token = 'your bot token'

bot = SoroushBot(bot_token)

to = 'user chat_id'

[error, success] = bot.sendText(to, 'Your text')

if success:
    print('Message sent successfully to user')


channelid = 'channel id without @'

[error, success] = bot.sendText(channelid, 'Your text',isSendToChannel=True)

if success:
    print('Message sent successfully to channel')

"to" value in above example is chat_id of a bot user. You can find it in front of 'from' key in a message that user has sent to your bot. You can see more examples in the examples directory.

use SoroushBot function becuase it's easier to use!

Contribute

Contributions to the package are always welcome!