Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Version 0.6

Choose a tag to compare

@bclindner bclindner released this 16 Dec 20:10

Big changes!

  • RESTCommand has been added! This allows you to hit arbitrary HTTP APIs that return JSON and format them into responses. Example in the README.
    • You essentially give it a regular expression as a triggerregex, an endpoint where the first element is a fmt.Printf-compatible URL format and the rest are numbers corresponding to regex groups from the triggerregex, and a response, or list of responses, which, similar to the endpoint, have a format as a first element, but the rest of the elements are strings roughly matching JSON dot notation (see this repo) that it looks up in the response. A little long-winded and hard to understand, but relatively flexible once learned.
  • XKCDCommand is no more. Happy or sad about it, it's been replaced by the more generic REST command. An example on re-implementation is in the README.
  • Commands now have guild and channel whitelisting and blacklisting. Simply add channelblacklist, guildblacklist, channelwhitelist, or guildwhitelist into the root of your command object (the same spot you'd put type and name), and that command will run with those filters applied. Not well tested yet.