Skip to content

Slackbot that runs in Lumen as an API. It's features are Karma points given to slack users, telling a joke, and telling the weather and air quality. I worked on the weather and air quality features.

License

Notifications You must be signed in to change notification settings

webmannys/lumen-karmabot

Repository files navigation

Slack Karmabot Built on Lumen

This provides a simple karmabot that is built on Lumen. Since we are only returning JSON and requests are not exactly cached, we queue up the requests and process them afterwards. Simple approach.

At some point in its life, it will also have testing. However, I need to figure out how to do that in Laravel/Lumen so this is not yet ready.

Config Variables

ALLOWED_SLACK_PROCESSING_TOKENS: This consists of tokens that will filter out to make sure the requests are only coming in from the right intent places. SLACK_OAUTH_ACCESS_TOKEN: The oauth token is needed to connect to slack and get list of users, send message to channel.

Setup on Slack

You need to enable the following features:

  • Incoming Webhooks
  • OAuth and Permissions
  • Event Subscriptions
  • Bot Users

You need to create a bot with the following oauth privileges:

  • bot
  • chat:write:bot
  • incoming-webhook
  • users:read

You also need to subscribe the bot to the following event subscriptions:

  • app_mention
  • message.channels
  • message.groups (this one is optional and really only use the bot in private groups).

To setup weather feature:

To setup Air Quality feature:

About Lumen

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.

Official Documentation

Documentation for the framework can be found on the Lumen website.

Security Vulnerabilities

If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

License

The Lumen framework is open-sourced software licensed under the MIT license.

About

Slackbot that runs in Lumen as an API. It's features are Karma points given to slack users, telling a joke, and telling the weather and air quality. I worked on the weather and air quality features.

Resources

License

Stars

Watchers

Forks

Packages

No packages published