| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
chainbot is a slackbot who watches over the ChainCoin slack channel while we sleep. For now, it can turn certain Slack channels into read only channels by deleting all messages that are posted to that channel. In the future, we will add support for vote banning, moderator banning, and also allow the bot to answer questions. This bot is based off of the excellent brianwilliams.js bot by Tyler Shambora - thank you for your code!!
BOT_TOKEN PORT CLIENT_ID CLIENT_SECRET MEGA_TOKEN READ_ONLY_CHANNELS LISTEN_CHANNELS ANNOUNCER_USERS MODERATOR_USERS UPDATE_USERS HAPPY_REACTIONS ANGRY_REACTIONS
where:
To get the ids of the channels and users you can use the slack api with your token and a tool such as https://www.hurl.it/
Once you've finished all the prior steps and deployed your bot to your Heroku server, visit https://[YOUR HEROKU APP URL].com/login to authenticate your bot. Once you've completed the authentication process, the bot should be a part of your team. Add people to the appropriate whitelists and also channels that you'd like to make read only.
Alternatively, you can use a local node.js server to host the bot. One way of doing this is to use the dotenv module (https://github.com/motdotla/dotenv) to prepare the environment with the needed variables above. An example template.env has been included for this purpose.
While the channels are read-only and all messages are immediately deleted, the bot is allowed to post to the channel and he won't delete his own posts. This is useful if you want to make a designated announcements channel that the bot can post to but everyone else's messages are deleted as to not distract from the announcements the bot posts. In order to post to a read-only channel via. the bot, send him a message with this format:
post to [channel name] [post title] ___ [post message]
for example:
post to development- Warning of the Day ___ No matter what, do not create angry monkeys. Stay turned for more details.
You can use message formatting in the post message, and if you want create a post with two separate title/message combos, separate them with three line breaks like so:
post to news Message Title One ___ Message Body One Message Title Two ___ Message Body Two
This project is licensed under the MIT License - see the LICENSE file for details
| Back | FazBrowse Home | New Git URL |