简体   繁体   中英

How to integrate python bot on slack?

I have written a bot for slack channel using python. now each time I need to open a command prompt and run python3 filename.py to run the functionality.

Is there any way so that I can integrate it with slack channel? this command will run once a day basis.

You need to use the slack API and Slack's Bot User to integrate your code with Slack. Using the slack event, you can fetch the channel ID and where your slack bot will respond or accept messages from. For this is it better that you create an application, maybe a Flask app, that keeps running on your server, listening for activity. Here is a repo that does pretty much that https://github.com/slackapi/Slack-Python-Onboarding-Tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM