Skip to content

Commit 30703d3

Browse files
committed
docs: Update STRUCTURE to remove custom LSP/TypeScript patches
1 parent 1f7a3a5 commit 30703d3

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

docs/STRUCTURE.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ The PS module has three parts - `commands`, `handlers`, and `loaders`.
2424
### Commands
2525

2626
The `commands` directory stores all PS commands. A single file can export one or multiple commands, and each
27-
command has configuration options. By convention, 'barrel' commands (such as `GAMES.tsx`) that export multiple
28-
commands are named with capital letters.
27+
command has configuration options. Folders can be used when a single source has too much complexity to be one
28+
file (eg: games).
2929

3030
Commands may be either `.ts` or `.tsx` files - the `.tsx` extension is required to enable JSX syntax in the code.
3131

32-
Please note that **JSX syntax that is not inside another JSX function/call will be converted to a string**. This is
33-
applicable to all `tsx` files inside the `ps` folder - so patterns like `message.replyHTML(<b>Access denied.</b>)` can
34-
be used. This is reflected in both `tsc` checks as well as the actual chatbot with `npm start`, but IDEs like WebStorm
35-
and Visual Studio Code have slight differencess due to needing a custom Language Service Plugin.
32+
Commands that output JSX must use one of the `*HTML` methods to work! `message.reply(JSX)` will not work; use
33+
`message.replyHTML(JSX)` instead.
3634

3735
### Handlers
3836

@@ -41,9 +39,8 @@ more details.
4139

4240
### Loaders
4341

44-
The `loaders` directory contains code to load data from a database into cache. This lets the bot synchronize data such as
45-
alts and roomconfigs. It also contains the TypeScript plugin to convert JSX into HTML within the `ps` folder by injecting
46-
a `jsxToHTML` call.
42+
The `loaders` directory contains code to load data into cache (such as entries from a database, or command cache).
43+
This lets the bot synchronize data such as alts and roomconfigs.
4744

4845
---
4946

0 commit comments

Comments
 (0)