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

Releases: bclindner/valerius

0.7.1

Choose a tag to compare

@bclindner bclindner released this 15 Feb 04:47
Updated to version 0.7.1

Version 0.7

Choose a tag to compare

@bclindner bclindner released this 18 Dec 00:26

No major additions, but some serious QoL improvements:

  • The RESTCommand has had a number of improvements.
    • New options field: headers (map[string]string). This lets you set headers like User-Agent, Authorization, and others to go with each request.
    • New options field: errorMessage (string). If the RESTCommand fails for any reason, you can specify a generic message in the options to respond with in Discord.
    • RESTCommand now logs every request going out and the status of responses coming in. In the event someone's trying to hack your bot via the RESTCommand interface, you'll have some logs. Still, take care in writing proper regular expressions to make it hard or impossible for them.
    • RESTCommands are now cached by default. This shouldn't be too much of a problem, but if the bot starts giving you out-of-date data, you can disable the cache by setting "disableCache": true in the command's option list.
  • Moderate refactor of the source code, allowing for a new command type - ReloadCommand, or reload in the config. This just lets you reload your active config file and re-parse your commands, so you don't have to reset your bot in the event you want to make a small change to your config.
    • If your new config fails, don't worry - it won't break the bot, it'll just continue using the previous configuration.
  • Some improvements to the IASIPCommand - it now allows for multi-line messages. It ignores said newlines, and tries to find line breaks manually, but now multi-line commands will at least work.

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.

Version 0.5

Choose a tag to compare

@bclindner bclindner released this 15 Dec 16:16

Several major changes!

  • All "pingpong" commands have been rolled into one command that does it all!
  • The XKCD command now takes a prefix as an option, so you aren't limited to !xkcd.
  • The IASIP command now takes a prefix as option and sets its own regex, so you don't have to worry about that anymore.

Examples in the README, as usual. Shouldn't need too much modification.

Version 0.4.1

Choose a tag to compare

@bclindner bclindner released this 15 Dec 05:14

Added a command to generate IASIP title cards (with that library I wrote as a bit earlier).

To use this new command, you'll want to get a copy of the Textile font in .ttf format (do some Googling) and add something like this to your bot config:

{
  "name": "IASIP",
  "type": "iasip",
  "options": {
    "trigger": "^!iasip (.*)$",
    "fontpath": "textile.ttf",
    "quality": 100
  }
}

Given you want the command to be !iasip and the font is placed in the same folder as the bot, under textile.ttf.

Version 0.3

Version 0.3 Pre-release
Pre-release

Choose a tag to compare

@bclindner bclindner released this 11 Nov 05:29

Added regex pingpong command, and some code cleanup. See README for configuration example.

Version 0.2

Version 0.2 Pre-release
Pre-release

Choose a tag to compare

@bclindner bclindner released this 11 Nov 03:59

A major rewrite. Several commands have been removed and replaced with generic commands, and the entire thing has been redesigned to accept configuration via JSON. See the README for more details and an example configuration.

Version 0.1

Version 0.1 Pre-release
Pre-release

Choose a tag to compare

@bclindner bclindner released this 11 Nov 05:56

Initial release.