Skip to content

shaykalyan/slack-ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-ascii

Don't feel like giving into the so-called emoji future?
Then try out slack-ascii to bring (╯°□°)╯︵ ┻━┻ and more to your Slack team!

Usage

Just type /ascii [keyword], and a clone of yourself will pop-in and respond with an emoticon. Use help as the keyword to get a list of available emoticons.

Installation

The overall installation process involves the following:

  • Creating a Slash Command integration to trigger slack-ascii
  • Creating an Incoming Webhook integration to receive a response from the server
  • Acquiring the Slack Web API token for your team to allow the response to mimic the user that triggered the command
  • Configuring and deploying the Heroku app to host this bot

Deploy

First, click the above deploy button to begin deployment to Heroku. Leave the configuration page open for now, and return to this page to enter the Config Variables when prompted below.

Slack Web API Token

  • In a new tab, go to https://api.slack.com/web
  • Scroll down to Authentication
  • Click on Create token next to your team
  • Copy the API Token and paste it into the Heroku app's Config Variables for SLACK_TEAM_API_TOKEN
  • Close

Incoming Webhook Setup

  • In a new tab, go to your team's integrations page https://<team>.slack.com/services/new
  • Scroll to the bottom of the page to the DIY Integrations & Customizations section
  • Click on Add next to Incoming Webhook and configure as follows:
    • Select any channel when prompted as the app will respond directly to the channel that the command originates from.
    • Copy the Webhook URL and paste it into the Heroku app's Config Variables for SLACK_HOOK_URL
    • Description: Slack ASCII Bot
    • Customize name: slack-ascii
  • Click on Save Settings and close

Slash Command Setup (I)

  • In a new tab, go to your team's integrations page https://<team>.slack.com/services/new
  • Scroll to the bottom of the page to the DIY Integrations & Customizations section
  • Click on Add next to Slash Commands and configure as follows:
    • Command: /ascii
    • URL: https://<app-name>.herokuapp.com/ where <app-name> is the name generated by Heroku (later below)
    • Method: GET
    • Tick the show this command in the autocomplete list checkbox in the Autocomplete help text section
      • Description: Gimme some ASCII action!
      • Usage hint: [keyword]
    • Descriptive Label: ASCII Emoticons for Slack
  • Copy the Token and paste it into the Heroku app's Config Variables for SLACK_SLASH_COMMAND_TOKEN
  • Leave this page open for now and carry out the deployment with Heroku

Heroku Deployment

  • Leave the App Name field blank as Heroku will generate one for you
  • Ensure all Config Variables are now populated
  • Click on Deploy for free
  • Once deployment has completed, the App Name field will be populated. Take a note of this.
  • Close

Slash Command Setup (II)

  • Update the Slash Command's URL with the updated app name following the Heroku deployment
  • Click on Save Integration and close

Phew! Now that we're done with that, your Slack ASCII integration should be all up and running. Give it a go!

Development

Environment Variables

After clicking on the "Deploy with Heroku" button, or cloning this repo, you will need to setup the following environment variables. These can either be stored in a .env file or set up as the Config Variables in Heroku.

  • SLACK_SLASH_COMMAND_TOKEN - The token from Slack's Slash Command
  • SLACK_HOOK_URL - URL for Slack's Incoming Webhook
  • SLACK_TEAM_API_TOKEN - Slack Web API token for the team

About

ASCII Emoticons for Slack!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published