From 4ba9d3a28fb97696a8b71330d6803a29ac34866e Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 6 Jun 2019 01:21:12 +0200 Subject: [PATCH] Release 0.2.8 --- CHANGELOG.md | 2 + Cargo.lock | 2 +- README.md | 216 ++++++++++-------------------------------- bot/Cargo.toml | 2 +- bot/src/settings.yaml | 5 +- 5 files changed, 59 insertions(+), 168 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10bf3e2b..3c078369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `[current_song]` has been deprecated in favor of `player/song-file` settings. - `[[modules]]` configuration has been deprecated in favor of their corresponding setting. - Fully deprecated the need for a configuration file. If you want to migrate existing settings, run the bot once with the configuration file, then it can safely be deleted. +- Add more commands to `!gtav` and add command-specific overrides through `gtav/command-config`. ### Added - Added the ability to scale the maximum volume of a player by a percentage using the following settings: @@ -23,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * This includes the groups: **@streamer**, **@moderator**, **@subscriber**, and **@everyone**. - A UI page to handle Authorization. - Load fallback songs from `player/fallback-uri`. +- `!speedrun` command to get records from speedrun.com. [auth.yaml]: bot/src/auth.yaml [Unreleased]: https://github.com/udoprog/setmod/compare/0.2.7...master diff --git a/Cargo.lock b/Cargo.lock index 2b238c0f..c098fac5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2051,7 +2051,7 @@ dependencies = [ [[package]] name = "setmod-bot" -version = "0.2.7" +version = "0.2.8" dependencies = [ "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/README.md b/README.md index 34c2e569..d169af2f 100644 --- a/README.md +++ b/README.md @@ -145,31 +145,17 @@ It supports the following template variables: * `{{name}}` - the user who said the word. * `{{target}}` - the channel where the word was sent. -## Features +## Commands -Note: In a future version, `features` will be removed in favor of `[[modules]]`. See below. +Every command is enabled through a Setting named `/enabled`. -Features are enabled per-channel like this: +To for example enable the `!admin` command, you'd have to make sure the `admin/enabled` setting is set. -```toml -features = [ - "name-of-feature" -] -``` - -Where `name-of-feature` is one of the features listed below. - -#### `admin` feature - -You enable the feature by adding `"admin"` to the `features` array in the configuration: +#### Misc Commands -```toml -features = [ - "admin", -] -``` +You enable the `!admin` command by setting `admin/enabled` to `true`. -Enabled commands: +Available commands: * `!uptime` - Get the current uptime. * `!title` - Get the current title. @@ -177,21 +163,15 @@ Enabled commands: * `!game` - Get the current game. * `!game ` - Update the game to be ``. -#### `command` feature - -You enable the feature by adding `"command"` to the `features` array in the configuration: +#### `!command` command -```toml -features = [ - "command", -] -``` +You enable custom command administration by setting `command/enabled` to `true`. Allows setting and requesting custom commands. A command is the bot responding with a pre-defined message based on a template. -Enabled commands: +Available commands: * `!command edit ` - Set the command `` to respond with `` (**moderator**). * `!command clear-group ` - Clear the group for command `` (**moderator**). @@ -206,9 +186,7 @@ Template variables that can be used in ``: * `{{name}}` - The user who said the word. * `{{target}}` - The channel where the word was sent. -#### `alias` feature - -This feature is enabled by default. +#### `!alias` command Allows setting custom aliases. Aliases are prefixes that when invoked they will be expanded when processed by the bot. @@ -216,7 +194,7 @@ Aliases are prefixes that when invoked they will be expanded when processed by t For example, lets say we have an alias named `!sr` configured to `!song request {{rest}}`. This would allow us to invoke `!sr don't call me` and it would be processed as `!song request don't call me`. -Enabled commands: +Available commands: * `!alias edit ` - Set the command `` to alias to `` (**moderator**). * `!alias clear-group ` - Clear the group for alias `` (**moderator**). @@ -231,7 +209,7 @@ Template variables that can be used in ``: * `{{name}}` - The user who invoked the alias. * `{{target}}` - The channel where the alias was invoked. -###### Deprecated configuration +###### Deprecated configuration `[[aliases]]` Aliases used to be specified in the configuration. If these are still present, the bot will migrate those aliases into the database and post a warning at startup. @@ -252,40 +230,30 @@ match = "!volume" replace = "!song volume {{rest}}" ``` -#### `afterstream` feature +Now it's all handled using the `!alias` command. -You enable the feature by adding `"afterstream"` to the `features` array in the configuration: +#### `!afterstream` command -```toml -features = [ - "afterstream", -] -``` +You enable the `!afterstream` command by setting `afterstream/enabled` to `true`. Enabled adding afterstream messages. Afterstream messages keeps track of who added them and when. -Enabled commands: +Available commands: * `!afterstream ` - Leaves the `` in the afterstream queue. Afterstreams that are posted are made available in the UI at: http://localhost:12345/after-streams -#### `song` feature +#### `!song` command -You enable the feature by adding `"song"` to the `features` array in the configuration: - -```toml -features = [ - "song", -] -``` +You enable the `!song` command by setting `song/enabled` to `true`. Enables song playback through Spotify. -Enabled commands: +Available commands: * `!song request spotify:track:` - Request a song through a Spotify URI. * `!song request https://open.spotify.com/track/` - Request a song by spotify URL. @@ -311,39 +279,20 @@ Enabled commands: * `!song when` - Find out when your song will play. * `!song when ` - Find out when the song for a specific user will play (**moderator**). -#### `clip` feature - -You enable the feature by adding `"clip"` to the `features` array in the configuration: +#### `!clip` command -```toml -features = [ - "clip", -] -``` +You enable the `!clip` command by setting `clip/enabled` to `true`. -The `clip` feature enables the `!clip` command. +The `!clip` command enables the `!clip` command. This command has a cooldown determined by the `[irc] clip_cooldown` configuration key (see above). -#### `8ball` feature +#### `!8ball` command -You enable the feature by adding `"8ball"` to the `features` array in the configuration: - -```toml -features = [ - "8ball", -] -``` +You enable the `!8ball` command by setting `8ball/enabled` to `true`. Enables the Magic `!8ball` command. Cause it's MAGIC. -## Modules - -Modules are defined in the `[[modules]]` sections of the configuration. - -They enable certain behavior of the bot, and are generally better than `features` since they allow adding configuration -associated with the module. - #### `currency` Enables a loyalty currency system and a couple of commands. @@ -363,71 +312,51 @@ Enabled commands depend on the `name` of your currency, so we are gonna assume t - `!thingies windfall ` - Give away `` currency to all current viewers (**moderator**). - `!thingies show ` - Show the amount of currency for the given user (**moderator**). -#### `swearjar` +#### `!swearjar` command -You enable the `swearjar` module by adding the following to your configuration: +You enable the `!swearjar` command by setting `swearjar/enabled` to `true`. -```toml -[[modules]] -type = "swearjar" +This also requires the `!currency` command to be enabled. -# The amount of currency to reward all watchers with. -reward = 10 -# Cooldown between invocations, default: 1m -# cooldown = "1m" -``` +Available commands: -This also requires the `currency` feature to be enabled. +* `!swearjar` - Anyone can invoke the swearjar to reward all viewers with some currency from the streamer when they swear. -Enabled commands: +#### `!countdown` command -* `!swearjar` - Anyone can invoke the swearjar to reward all viewers with some currency from the streamer when they swear. +You enable the `!countdown` command by setting `countdown/enabled` to `true`. -#### `countdown` +The `!countdown` command allows setting a countdown and a corresponding template, that will be written to a file while the countdown is active. -You enable the `countdown` module by adding the following to your configuration: +The following settings are required: -```toml -[[modules]] -type = "countdown" -path = "E:\\temp\\countdown.txt" -``` +* `countdown/path` - The path to write the countdown to. -Enabled commands: +Available commands: * `!countdown set