matrix-hacks / matrix-puppet-slack

puppet style slack bridge for matrix
46 stars 17 forks source link

Add support for slash commands #61

Open twouters opened 5 years ago

twouters commented 5 years ago

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] ...).

thomas-profitt commented 5 years ago

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)