All Projects → UnitedIncome → Slackbot Destroyer

UnitedIncome / Slackbot Destroyer

📣 ❌ Slack integration that can destroy all incoming messages from Slackbot.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Slackbot Destroyer

slackbot-destroyer
📣 ❌ Slack integration that can destroy all incoming messages from Slackbot.
Stars: ✭ 33 (+43.48%)
Mutual labels:  robot, slack-bot
Fourth robot pkg
4号機(KIT-C4)用リポジトリ
Stars: ✭ 7 (-69.57%)
Mutual labels:  robot
Robot
知识图谱问答机器人,聊天机器人,基于知识图谱、语义理解等的对话机器人。
Stars: ✭ 530 (+2204.35%)
Mutual labels:  robot
Rex Gym
OpenAI Gym environments for an open-source quadruped robot (SpotMicro)
Stars: ✭ 684 (+2873.91%)
Mutual labels:  robot
Thor
DIY 3D Printable Robotic Arm
Stars: ✭ 556 (+2317.39%)
Mutual labels:  robot
Puloversmacrocreator
Automation Utility - Recorder & Script Generator
Stars: ✭ 803 (+3391.3%)
Mutual labels:  robot
Dorita980
Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
Stars: ✭ 523 (+2173.91%)
Mutual labels:  robot
Upboard ros
ROS nodes for upboard usage
Stars: ✭ 22 (-4.35%)
Mutual labels:  robot
Cq Picsearcher Bot
🤖 基于 saucenao / ascii2d / whatanime 的搜图机器人
Stars: ✭ 830 (+3508.7%)
Mutual labels:  robot
Turtlebot3
ROS packages for Turtlebot3
Stars: ✭ 673 (+2826.09%)
Mutual labels:  robot
Mvision
机器人视觉 移动机器人 VS-SLAM ORB-SLAM2 深度学习目标检测 yolov3 行为检测 opencv PCL 机器学习 无人驾驶
Stars: ✭ 6,140 (+26595.65%)
Mutual labels:  robot
Testssl.sh
Testing TLS/SSL encryption anywhere on any port
Stars: ✭ 5,676 (+24578.26%)
Mutual labels:  robot
Robotgo
RobotGo, Go Native cross-platform GUI automation @vcaesar
Stars: ✭ 7,095 (+30747.83%)
Mutual labels:  robot
Itchat
A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。
Stars: ✭ 21,935 (+95269.57%)
Mutual labels:  robot
Scrape Rss Bot
Slack bot that converts links to an RSS feed
Stars: ✭ 16 (-30.43%)
Mutual labels:  slack-bot
Node Serialport
Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
Stars: ✭ 5,015 (+21704.35%)
Mutual labels:  robot
Vue Chat
📲 A web chat application. Vue + node(koa2) + Mysql + socket.io
Stars: ✭ 617 (+2582.61%)
Mutual labels:  robot
Derek
Reduce maintainer fatigue by automating GitHub
Stars: ✭ 714 (+3004.35%)
Mutual labels:  robot
Plen 3dmodel fusion360
PLEN2's 3D model data implemented by Autodesk Fusion 360.
Stars: ✭ 24 (+4.35%)
Mutual labels:  robot
Torpedo
Pluggable, multi-network asynchronous chat bot written in Go
Stars: ✭ 19 (-17.39%)
Mutual labels:  slack-bot

Avatar for Slackbot Destroyer  Slackbot Destroyer 📣 ❌

This bot deletes auto responses from Slack's very own Slackbot. If you'd like to be rid of the responses in certain channels in your organization, you can employ the Slackbot Destroyer to fight on your behalf.

Note that in order to delete Slackbot's messages, this bot must be installed by a user who has permission to delete Slackbot messages in Slack. Slackbot's messages will be deleted using the permissions of the user that installs Slackbot Destroyer.

Example of Slackbot Destroyer in Action

Installation Steps 💽

  1. Go to your organization's Slack integration page and create a new application. An organization admin will need to do this as this bot requires permissions to delete messages using the credentials of an admin user.
  2. Create a name for the bot and pick a workspace.
    Text field for bot name and dropdown for workspace
  3. On the next page, you'll need to add features and functionality to enable a bot user and set permissions. Click on 'Bots'
  4. Configure your bot with the name you want to see in Slack and a username (we'll use this later!). Save these settings and go back to the Basic Information page.
    Two text fields for name and username
  5. You need to add Permission Scopes for the bot. For full functionality, you need to add the following:
    Scopes enabled: channels:read, channels:write, chat:write:bot, chat:write:user
    Note that 'Add a bot user' in the Interactivity section will be automatically enabled by the previous step in the instructions.
  6. Back on the Basic Information page, the Features and Functionality section should look like this now:
    Bots and Permissions should have green checkmarks
  7. You can now install the app in your Slack workspace!
  8. Later, you'll need the BOT_ID. You can obtain this by running:
export BOT_NAME=$bot_username_from_bot_user_step
pipenv run python id.py
  1. When configuring on Heroku, you'll need the two tokens from the OAuth & Permissions page for the app. The relevant section looks like this:
    Shows OAuth Access Token and Bot User OAuth Access Token fields
  2. Now, we need to set up the bot on Heroku (this is free). Click the button below to get started!

Deploy

If you'd like to run the application manually you can add the required secrets within constants.py as environment variables and then run $ python app.py.


Configuration on Heroku

The installation button will require you to enter a number of API keys. Below you'll find an explanation

Key Value Information Required
BOT_ID The ID of your Slack bot user, this is required so the bot knows when a command is directed at it. You can obtain this ID through the steps described in the Installation process. Yes
SLACK_BOT_TOKEN The bot token found within the Slack API settings. Yes
SLACK_USER_TOKEN The user token found within the Slack API settings. This must be the user token of an admin. Yes
AWS_ACCESS_KEY_ID Your AWS access key id, only required if you'd like to persist the bot settings. No
AWS_SECRET_ACCESS_KEY Your AWS access key id, only required if you'd like to persist the bot settings. No
AWS_BUCKET_NAME The name of your S3 bucket on AWS, only required if you'd like to persist the bot settings. No
CHANNEL_WHITELIST A comma seperated list of channels you'd like the bot to operate in, if this is left blank the bot will be allowed to join any channel. Requires channels:write and channels:read permissions. For example general, random. No

Configuring Persistent Storage on AWS

Heroku has no ability to do persistent storage, and will periodically reboot your dynos, causing your bot to lose its state. We have a simple data persistence option using an S3 bucket on AWS. Here are steps on AWS to configure persistent storage.

  1. Log on to the AWS Console and navigate to the S3 service.
  2. Click on 'Create bucket', and choose a name for your bucket. This value will go in the AWS_BUCKET_NAME environment variable in your Heroku settings.
  3. You don't need to change any other settings, so just keep clicking next to the 'Review' section, then click 'Create bucket'.
  4. You will need to create an IAM user and policy for Slackbot Destroyer on the IAM page.
  5. First, click on 'Policies' in the sidebar, then 'Create policy'. We're going to create a policy that will give the user read and write access to ONLY the S3 bucket we just created.
  6. Click on the JSON tab in the policy editor and paste in the following:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::{bucket-name-on-s3}"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::{bucket-name-on-s3}/*"
            ]
        }
    ]
}
  1. Click on 'Review policy', and give it a name and a description on the next page, then click 'Create policy'.
  2. Now navigate to 'Users' in the sidebar and click 'Add user'. Give the user a name and enable only 'Programmatic access', then click 'Next: Permissions'.
  3. On the 'Permissions' page, click on 'Attach existing policies directly', and find the policy we just created. Select it, then hit 'Next: Review'.
  4. Click on the 'Create user' button. THIS IS YOUR ONLY CHANCE TO GET THE SECRET ACCESS KEY. If you don't grab it now, you'll have to regenerate credentials for the user.
  5. Copy the 'Access key ID' and 'Secret access key' to the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables in Heroku. Click 'Close' when you're finished.
  6. It may take a little time for permissions to percolate through the system. Go get a coffee! ☕️
  7. In Heroku, under 'Resources', restart the worker. Use heroku logs on the command line to check that everything is initialized correctly.
  8. Enjoy a persistent bot!

Commands 💻

The following commands are available.

# Displays a list of available commands.
@slackbot-destroyer commands

# Activate Slackbot Destroyer in a channel.
@slackbot-destroyer destroy

# Deactivate Slackbot Destroyer in a channel.
@slackbot-destroyer deactivate

# Show how many times Slackbot Destroyer has destroyed Slackbot responses.
@slackbot-destroyer stats

# Teleport to the future
@slackbot-destroyer teleport

# Make Slackbot Destroyer moderate the frequency of Slackbot responses.
@slackbot-destroyer moderate

# Ask Slackbot Destroyer what it is doing in the current channel.
@slackbot-destroyer wassup

# Ask Slackbot Destroyer what Slackbot responses it has seen so far.
@slackbot-destroyer track

# Change the frequency of a Slackbot response (1 will always show the response and 0.1 will show it 10% of the time).
@slackbot-destroyer hunt [index from track command] [new frequency]

Development 🔧

Want to mod a bot? You can develop SLACKBOT DESTROYER on OSX via the following steps:

  1. Use homebrew to install pyenv
  2. Use pyenv to install Python 3.6(.6)
  3. Configure either local or global python to be 3.6
  4. Use these steps to install Pip
  5. Using the pip you just installed, install pipenv
  6. Run pipenv install
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].