Public | Automated Build

Last pushed: 8 months ago
Short Description
Docker automated build for Hubot with the Discord adapter
Full Description


A docker image using the hubot-discord adapter for hubot.


When you just run the container, hubot will be started with the discord adapter and the name plompbot:

docker run --rm -ti laninabox/hubot-discord

There are some variables you need to pass to make it work though:

Variable Required Description
HUBOT_DISCORD_TOKEN yes Sets the oauth2 token, generate one here. Create a new application, and then a new bot application. Use that token.
HUBOT_MAX_MESSAGE_LENGTH no Sets the message length. (later to be deprecated)
other_hubot_vars no All other HUBOT_VARS, some explanation can be found here.

Below is an example with the required ENV variables:

docker run --rm -ti -e HUBOT_DISCORD_TOKEN=1234567890 laninabox/hubot-discord

You can put these ENV vars in a file for convenience and then run as follows:

docker run --rm -ti --env-file ./env.list laninabox/hubot-discord

You can add your custom coffeescript like so:

docker run --rm -ti \
           --env-file ./env.list \
           -v src/ \

Your custom commands will then be available to hubot.
Call him by his name.

Adding a private bot to a discord server

If you selected the bot to be private, you first need to add it to your discord server so the bot is able to join.

To do this, follow this link and replace your client_id with your bot's oauth2 token:{{bot_oath2_token}}&scope=bot&permissions=0


Run in debug mode and start a custom adapter:

docker run --rm -ti --env-file ./env.list -e HUBOT_IRC_DEBUG=yes -e HUBOT_LOG_LEVEL="debug" laninabox/hubot -a discord

Or with a shell.

Run in debug mode and start bash:

docker run --rm -ti --env-file ./env.list -e HUBOT_IRC_DEBUG=yes -e HUBOT_LOG_LEVEL="debug" laninabox/hubot /bin/bash 

From there you can start hubot with:

/hubot/bin/hubot -a discord --name towerbot --alias jos

All scripts are located in /hubot/npm_modules/


To build this image, just clone the repo and:

docker build -t laninabox/hubot-discord . 

(c) 2016 Utopit VOF

Docker Pull Command
Source Repository