Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

jrmann1999/ImgurBot

Repository files navigation

ImgurBot

This repository is an example using NodeJS to implement a listener for a Cisco Spark chat-bot.

It currently listens for mentions in rooms it is a member of, searching for Imgur animated gifs and returning them to the room. It can also be Private messaged and will subsequently reply.

As long as the script is running, it will remember the last 10 posts it has made, and can be deleted by telling it to delete (@bot delete). Repeated operations will result in repeated deletions up to the last 10 posts.

You must have setup a Spark bot and obtained the Authorization token, additionally you will need to sign up for the Imgur API and have that token available. Both will need to be specified as environment variables to run the bot successfully.

Usage:

IMGURAPIKEY=KEY SPARKAPIKEY=KEY node server.js

No console output is expected with this.

Debug:

I have utilized the debug module within NPM to setup custom debugging, the three named debug options are:

DEBUG=server
This will give you debug information about the main server routine, generally giving you console logging indicating the steps the system is taking

DEBUG=imgur or spark
This will highlight any errors or non HTTP status codes of 200, and what the data looks like when that occurs

About

Cisco spark chat-bot for looking up gifs and replying in cisco spark chat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published