Skip to content

Commit 995bf0b

Browse files
committed
Give c2.LinkType prose documentation
1 parent c26f95f commit 995bf0b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/wip-plugins.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,19 @@ end)
557557

558558
The full range of options can be found in the typing files ([LuaLS](./plugin-meta.lua), [TypeScript](./chatterino.d.ts)).
559559

560+
#### `LinkType` enum
561+
562+
This table describes links available to plugins.
563+
564+
| `LinkType` | `c2.Link.value` content | Action on click | Example |
565+
| ----------------- | ---------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------- |
566+
| `Url` | Any URI that makes sense to open | Open Link in browser | `https://example.org` |
567+
| `UserInfo` | A Twitch username or `id:TwitchID` | Open a usercard | `mm2pl`, `id:117691339` |
568+
| `UserAction` | Command to run or message to send | Send command/message | `/timeout mm2pl 1s test`, `!spoilers` |
569+
| `JumpToChannel` | [Channel name](#channelget_name) | Go to already open split with given channel | `#pajlada` |
570+
| `CopyToClipboard` | Any Unicode text | Copy value to clipboard | n/a |
571+
| `JumpToMessage` | ID of the message | Highlight the message with given ID in current split, do nothing if it was not found | n/a |
572+
560573
### Input/Output API
561574

562575
These functions are wrappers for Lua's I/O library. Functions on file pointer

0 commit comments

Comments
 (0)