A Slack integration to post GIF replies from replygif.net
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist/css
src/Archibald
.editorconfig
.gitignore
LICENSE
README.md
api.php
app.json
composer.json
composer.lock
config.sample.php
index.php

README.md

Archibald

Archibald is a Slack integration written in PHP to post tag-selected GIF replies from replygif.net into your current Slack channel or Direct Messages. You can either self-host it or easily set it up with the Heroku Deploy Button.

How to use Archibald

With Archibald, you can use the following commands in Slack:

/archie tags
Shows a list of all tags that can be used, together with the amount of gifs available in brackets

/archie [tag]
Use a tag to let Archibald search for a gif with that tag and randomly select one for you.
E.g: /archie magic

/archie shaq
You’ll love it, because he (you know who) loves you dearly!

Get Archibald up and running

You will have to take the following steps to set up and configure Archibald for your Slack team:

  1. Configure Slash Command and Incoming WebHooks integrations in your Slack settings.
  2. Deploy the integration with a Slash Command Token and the Incoming WebHooks URL you are given in step 1.

Slash Command Integration

Add a new Slash Command integration for your team.

For the Integration Settings, use the following values:

Setting Value
Command /archie
URL http://yourOwnDomain.com/archibald/api.php if you use your own server or https://your-heroku-app-name.heroku.com/api.php if you use Heroku Deploy Button (see below). If you don’t know the URL yet, come back later.
Method POST
Autocomplete help text
Descriptive Label Archibald

You will get a token that you will have to use later to configure Archibald.

Incoming WebHooks Integration

Now add a new Incoming WebHooks integration for your team.

It doesn’t matter which channel you choose for the messages to be posted to. All you need to do in the settings for the Incoming WebHooks integration is to copy the Webhook URL. You will use it when you configure Archibald. All other values of the Incoming WebHooks integration will be overwritten by Archibald.

Deploy to Heroku

If you set up Archibald the easy way, you can use the Heroku Deploy Button:

Deploy

When you press that button, you will be redirected to Heroku, where you can set up your own app. Insert the Token from the Slash Command integration and the Webhook URL from the Incoming WebHooks integration into the respective form fields and hit Deploy.

If you’re finished with the deployment, you can go and view the app.

Now head over to your Slack Integration settings and insert the URL you’ll be given by the app into the URL field of the Slash Command integration.

That’s it. You can now try out Archibald.

Deploy to your own PHP Server

config.php

Rename config.sample.php to config.php and set the Token from the Slash Command integration as well as the Webhook URL from the Incoming WebHooks integration.

    define('SLASHCOMMAND_TOKEN', 'Your copied Token here');
    define('WEBHOOK_URL', 'The copied WebHook URL here');

Upload files to Webserver

You need to upload all files to a webserver running PHP version 5.4.x or higher. Before you upload the files, be sure to use Composer to also include all vendor files.

composer install