Making Slack More Fun with Slacky

Max Bridgland
3 min readJan 11, 2020

Imagine being able to automate tasks, add custom notifications, custom commands, and add more fun things to do in Slack with your coworkers. Well I made it possible since there were no other Python selfbots Open Sourced on GitHub for Slack. I had always enjoyed using selfbots on Discord but since they were against ToS I had stopped. Slack on the other hand has no issues with these “custom integrations” and if anything, enable it. So today I present to you, Slacky.

Slacky is a personal token based approach to the common Slack bot. It allows for all RTM functionality a normal Slack bot would, but it uses your account to do it. It reads messages from your user in order to automate and make your messages more fun. It comes with a load of commands off the bat but also allows for easily adding plugin packs or your own custom Python commands.

Below you can see a preview of the tool:

It’s also really easy to add your own plugins. A simple example plugin takes less than 30 lines! Here is an example:


from slacky import client, config, Prefixes, check_user
from slack.errors import SlackApiError
def custom_example(**payload):
# Get Data from Payload
data = payload['data']
channel_id = data['channel'] # Get Channel ID
user = data.get('user') # Get User
timestamp = data['ts'] # Get msg Timestamp
if check_user(user): # Check if User == You
web_client = client # Init Client
text = data.get('text') # Get Text
# Check for Command Here
if text:
text_split = text.split(' ')
cmd = text_split[0]
if cmd == config['prefix'] + 'example':
# Command has been triggered
print(Prefixes.event + 'Ran Command: example')
# Logic Goes Here
try:
web_client.chat_update(
channel=channel_id,
ts=timestamp,
text="This command is an example."
)
except SlackApiError as e:
print(Prefixes.error + str(e))

There are a bunch of default commands as of the first release already. You can see a full list of them on the README but at the time of writing this below is a list of commands available:

You can run this locally or with Docker to have it run in the background! The source code is available here and any plugin packs would be greatly appreciated! You will be featured in the README just make a Pull Request with any plugin packs you make.

--

--

Max Bridgland

QA Engineer @ Reggora | iOS and Python | Tweets are my own opinion and do not reflect my employer | @GetSileo @SecuraRepo @psty_io | 19