Skip to content

Commit 1dda0c8

Browse files
committed
Fixed docs
1 parent d3bc13e commit 1dda0c8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ stdout and stderr. Commands do **not** get run in chronological order and each
1212
command may only get run once per *SM*.
1313

1414
### Example
15-
To use the module, you'll need to pass a configuartion object containing the connect information to the [*SMF*](https://github.com/server-state/specs/blob/master/terminology/server-module-function.md).
16-
17-
Since the module uses `mysql2`, which is *mostly API-compatible with `mysqljs/mysql`*, you may refer to https://github.com/mysqljs/mysql#connection-options for specifications. In most cases, though, you'll need to pass a `host`, a `user`, a `password` and possibly a `port`:
18-
15+
As `options`, the `raw-module` *SMF* takes an array of commands (`string[]`)
16+
that get executed:
1917
```js
2018
serverState.registerModule('raw', require('@server-state/raw-module'), [
2119
'ls',
@@ -24,6 +22,10 @@ serverState.registerModule('raw', require('@server-state/raw-module'), [
2422
]);
2523
```
2624

25+
It then returns the outputs of these commands in a key-value-pair object where
26+
the commands serve as keys (this is also the reason why duplicate commands
27+
aren't allowed).
28+
2729
Example return object:
2830
```json
2931
{

0 commit comments

Comments
 (0)