Browse API 1 documentation
grove.channelActions.register()
Replace native joined-channel menu actions.
Mango 3.1+View Markdown
Replace native joined-channel menu actions.
Signature
ts
grove.channelActions.register(actions: { id: string; label: string }[]): void
Availability
Server-scoped runtimes with ui.channel-actions; server Roots and tabs can contribute.
Parameters
| Parameter | Required | Description |
|---|---|---|
actions |
Yes | Full replacement list; [] clears it. |
id |
Yes | Nonempty normalized identifier using letters, numbers, hyphen, underscore, or dot. |
label |
Yes | Nonempty single-line native menu label; capped at 80 characters. |
Return value
Returns undefined.
Behavior and errors
At most eight valid unique actions are retained from up to 32 candidates. Duplicate IDs keep the first. Unsupported scopes and missing permission refuse contributions. A user click emits channelAction; no IRC access follows from this UI grant alone.
Example
js
grove.on('channelAction', event => {
if (event.action === 'inspect') console.info('Channel action selected')
})
grove.channelActions.register([{ id: 'inspect', label: 'Inspect channel' }])
See Event reference.