diff --git a/docs/cli/publish.md b/docs/cli/publish.md index e35d7854e..05cfb4a8b 100644 --- a/docs/cli/publish.md +++ b/docs/cli/publish.md @@ -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.