Created
September 12, 2016 08:07
-
-
Save anri-c/cd6067b62369d2d4353f3a5bd42802f1 to your computer and use it in GitHub Desktop.
errBot を導入して Slack と連携させてみる ref: http://qiita.com/anri-c/items/95cd9e5fa01253a87410
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mkvirtualenv -p `which python3` errenv | |
| (errenv) $ pip install errbot | |
| (errenv) $ mkdir mybot | |
| (errenv) $ cd mybot/ | |
| (errenv) ~/mybot$ errbot --init | |
| Your Errbot directory has been correctly initialized ! | |
| Just do "errbot" and it should start in text/development mode. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (errenv) ~/mybot$ errbot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> !tryme | |
| It works ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (errenv) $ pip install slackclient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (errenv) $ vi ~/mybot/config.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| BACKEND = 'Slack' | |
| -- snip -- | |
| BOT_ADMINS = ('@xxxx', ) | |
| BOT_IDENTITY = { | |
| 'token': 'xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (errenv) $ errbot --daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment