matrix-puppet-slack
matrix-puppet-slack copied to clipboard
Add support for slash commands
We can get a list of supported slash commands with commands.list on connect and listen for commands_changed RTM events to get updates.
Sending commands is possible too.
I'm not sure yet how we should expect the user to input the slash commands. Riot does not send unknown commands as messages, so either we expect users to escape the slash (\/<command> [args] ...) or we define a specific keyword to prepend slash commands (!slackcmd <command> [args] ...).
I dig it.
I don't think we would want Slack commands in bridged Matrix rooms to look like Matrix commands anyway, when the convention in Matrix is for commands implemented by bots to be prefixed when ! instead of /, so I think something like "!who" or "!slack /who" or something would feel better than "/who" working as if it were a Matrix/Matrix client command.
Some Slack commands' output may need to be handled in special ways too, like the only-visible-to-me messages not being visible in Matrix (creating another issue for that now)