Slack bot that announces daily catered meals
Lunchly is a Slack bot that posts daily meal announcements for companies with scheduled meal catering. Using Skills, Listeners, and Actions, Lunchly can be extended to support different vendors and interactions. It comes with built-in ZeroCater support.
Lunchly runs on Node 8.3+ and uses Slack's Real Time Messaging API and Web API clients. ZeroCater integration is provided via the @lunchly/service-zerocater plugin.
To get started, clone this repository and install dependencies using npm
.
# Get the code
git clone https://github.com/lunchly/slack-bot.git
# Install dependencies
npm install
Lunchly configuration is kept inside of a /sites.json file in the project room. This file defines a list of channels to monitor and their associated ZeroCater account IDs.
Your ZeroCater account ID can be found in the URL of your account's meal page.
-
Copy
sites.example.json
tosites.json
and replace with your values. -
If you don't already have one, create a new bot user for your Slack team. You'll need the bot token (begins with
xoxb-
) to run Lunchly.
To run Lunchly, ensure the configuration steps above are completed, and do the following:
SLACK_BOT_API_TOKEN=xoxb-0000-your-token MIXPANEL_TOKEN=000 LOG_LEVEL=debug npm run dev
SLACK_BOT_API_TOKEN=xoxb-0000-your-token MIXPANEL_TOKEN=000 npm run start
Lunchly listens for interactions in all channels it is a member of. If a meal is found for that day then the bot will post a message containing details about the meal.
Triggers*: !lunch
, lunch is here
, what's for lunch
, what is for lunch
, what is today's lunch
, what's for lunch
Apostrophe optional. Case insensitive.
MIT © Chris Vogt