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:
- Configure Slash Command and Incoming WebHooks integrations in your Slack settings.
- 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:
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:
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