mirror of
https://github.com/sern-handler/website
synced 2026-06-06 01:16:47 +00:00
more info
This commit is contained in:
@@ -33,24 +33,29 @@ If you do not know how to obtain either of these credentials, [click here](https
|
||||
- Automatically syncs api with your command base
|
||||
- generates JSON file of output (**.sern/command-data-remote.json**)
|
||||
- supports publishing direct esm typescript files
|
||||
- commonjs users need to compile first and then run sern publish on the dist/ output
|
||||
- commonjs + javascript users need to compile first and then run sern publish on the dist/ output
|
||||
- prerequire scripts.
|
||||
- supports a configuration that is the same as the original publish plugin.
|
||||
|
||||
|
||||
Each command file can have an extra config that follows this typescript interface:
|
||||
PermissionResolvable is a discord.js type, but it will accept anything that the discord API accepts
|
||||
Each command file can have an extra config that follows `ValidPublishOptions`:
|
||||
## Config
|
||||
```ts
|
||||
|
||||
interface ValidPublishOptions {
|
||||
type ValidMemberPermissions =
|
||||
| PermissionFlagBits //discord.js enum
|
||||
| PermissionFlagBits[] //array of discord.js enum
|
||||
| string //must be a stringified number
|
||||
| bigint
|
||||
|
||||
interface PublishConfig {
|
||||
guildIds: string[];
|
||||
dmPermission: boolean;
|
||||
defaultMemberPermissions: PermissionResolvable;
|
||||
defaultMemberPermissions: ValidMemberPermissions;
|
||||
}
|
||||
type Options =
|
||||
| ValidPublishOptions
|
||||
| (absPath: string, module: CommandModule) => ValidPublishOptions
|
||||
type ValidPublishOptions =
|
||||
| PublishConfig
|
||||
| (absPath: string, module: CommandModule) => PublishConfig
|
||||
```
|
||||
In other words, you can export a function or object.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user