Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

sloth-bot

Slack bot full of fun commands

Installation

Install the required package dependencies

npm install

Usage

Dev Mode

npm run dev

Build and run

npm run build and npm run start

Running forever

You can use the forever npm module to run this bot in the background forever using the command: npm run forever

Custom Plugins

You can add custom plugins by putting your plugins your own plugins folder located in the root directory.

You can look at other plugins to figure out how they should be structured.

You cannot name the folder of a plugin the same as any existing plugin.

Config File

config.json should resemble:

{
  "prefix": "~",
  "slackAPIToken": "",
  "slackBotToken": "",

  "steamAPIKey": "",
  "wolframAPIKey": "",
  "traktAPIKey": "",
  "tmdbAPIKey": "",

  "googleAPIKey": "",
  "cseSearchID": "",
  "cseImageID": "",

  "cookies": [ ],

  "owner": "",
  "noDisable": [ ],
  "viewConfigs": [ ],
  "logMessages": false,

  "saveName": null,

  "giphyRating": null,
  "googleSafeSearch": null,
  "youtubeSafeSearch": null,

  "disableRemember": false,
  "disabledPlugins": [ ],

  "sed": {
    "disabled": false,
    "realnames": false
  }
}

  • Prefix: The character that is required to use bot commands. eg. !googlesearch Sloths
  • Slack API Token: The Slack token is ideally your own token or a token for an account with Admin access. This is required for commands such as !kick and !invite. If you don't want that or can't. Just enter your bots token again
  • Slack Bot Token: This is your bots own token that is generated by Slack when you add a new Bot Integration. This is required for the bot to join your channel and use the API.
  • Google API Key: This is required to use the Google API. You'll need to generate a Google API (Server) Key and enable the Youtube Data API and the Custom Search API. You can do this here; https://console.developers.google.com/
  • CSE ID: This is the custom search engine token that is required in order to use the Google Image function. You can generate one here; https://cse.google.com/create/new . When creating put the Sites to search as *:google.com/* and once created in the options enable Image Search
  • Steam API Key: You'll need a SteamAPI key to make use of most of the Steam functions, you can generate one here; https://steamcommunity.com/dev
  • Wolfram API Key: WolframAlpha API key to make use of their engine
  • Trakt.tv API Key: API Key for using the movie/show details plugin. In order to get a key you need to create a new app here; https://trakt.tv/oauth/applications . Once you have made an app, the API key is the client_id for the app.
  • TMDB API Key: API Key the trakt funcationality, currently only used to get poster images.

License

/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * Luigi POOLE & Js41637 wrote this. You can do whatever you want with this stuff.
 * If we meet some day, and you think this stuff is worth it,
 * you can buy me a beer in return.
 * ----------------------------------------------------------------------------
 */

About

Bot full of fun commands

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.