Skip to content

Mahdiali313/bot-python-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Soroush Messenger Bot Wrapper for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%