Use slash commands instead of message listeners for stored replies #241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative approach to #148, will close #131
This puts every
!command
under a single top-level/r
command, with an autocompleted list of replies as the first argument. It includes the idea introduced by #240 (thanks @ScriptyChris!) of telling the bot who to ping — #240 had the problem of double-pinging, but as a slash command argument it can be done without that drawback.This code removes some commands for simplicity, it's a functional proof of concept more than final code. Remove commands:
!mdn
!lock
!unlock
Another change:
!commands
has been changed to/r help
, which uses an ephemeral reply to avoid shoving everything off scroll back.This is very much a rough draft, functional but incomplete. Before merging we should add logic to encourage folks to shift from
!commands
syntax to slash commands and figure out how to handle!mdn
Demo: