feat: Add slashcommand api
This commit is contained in:
@@ -30,6 +30,8 @@ Server-scoped plugins installed to the server you are currently viewing are enab
|
||||
|
||||
When plugins add quick actions to a server, the server side panel shows a View plugins link in the plugin area. Open it to see a grid of plugin action tiles. Selecting a tile runs that plugin's action in the current server and channel context.
|
||||
|
||||
Plugins can also add `/` slash commands. Type `/` in the message box to open the command menu; plugin commands appear there tagged with the plugin name, alongside built-in commands like `/lenny`. See [Text and Direct Messages](./text-and-direct-messages.md#slash-commands) for how to use the menu.
|
||||
|
||||
## Install a Local Plugin
|
||||
|
||||
Desktop builds can discover local plugin folders from the app data plugins directory.
|
||||
@@ -65,7 +67,7 @@ Examples:
|
||||
| Messages | Send messages, read current messages, moderate messages, or render embeds. |
|
||||
| Users and roles | Read member lists, create plugin users, or manage users. |
|
||||
| Voice and media | Play audio, add an audio stream, add a video stream, or adjust volume. |
|
||||
| UI | Add pages, settings pages, side panels, toolbar buttons, or DOM elements. |
|
||||
| UI | Add pages, settings pages, side panels, toolbar buttons, slash commands, or DOM elements. |
|
||||
| Storage | Save plugin preferences locally or per server. |
|
||||
|
||||
Only grant capabilities to plugins you trust.
|
||||
|
||||
@@ -13,6 +13,7 @@ Text channels belong to a server. Everyone with access to that server and channe
|
||||
You can use text channels to:
|
||||
|
||||
- send normal messages;
|
||||
- run slash commands by typing `/`;
|
||||
- edit or delete your own messages when allowed;
|
||||
- react to messages;
|
||||
- send attachments;
|
||||
@@ -24,6 +25,17 @@ You can use text channels to:
|
||||
|
||||
Direct messages are private conversations outside a server channel. Use them when a message is meant for one person instead of the server.
|
||||
|
||||
## Slash Commands
|
||||
|
||||
Type `/` at the start of the message box to open the slash command menu. It lists the commands you can run, with a short description for each.
|
||||
|
||||
- Keep typing to filter the list (for example `/le`).
|
||||
- Use the up and down arrow keys to move through the list, then press `Enter` or `Tab` to pick a command. You can also click one.
|
||||
- Press `Escape` to close the menu.
|
||||
- A command that needs extra text fills the box with `/name ` so you can type the rest, then send it.
|
||||
|
||||
MetoYou includes built-in commands such as `/lenny`, which posts `( ͡° ͜ʖ ͡°)`. Plugins can add their own commands, which appear in the same menu (tagged with the plugin name). Slash commands are available in both text channels and direct messages; some plugin commands only appear inside a server. Text that starts with `/` but matches no command is sent as a normal message.
|
||||
|
||||
## Attachments and Media
|
||||
|
||||
Attachments can appear as files, images, audio, or video depending on the file type and what the app can preview. If an image or link cannot load directly, the app can use fallback paths where available.
|
||||
|
||||
Reference in New Issue
Block a user