feat/make cli example command

This commit is contained in:
George Needham
2023-11-05 14:30:56 -06:00
parent 49cfa0c70d
commit 55b6f6df22
2 changed files with 9 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ Use [sern](https://sern.dev) as your discord framework please. Thanks! <3
## Usage
you can use `ctxeph`, `ctxopt`, `sernevent`, `serncommand`, `serneventesm` and `serncommandesm`.
you can use `ctxeph`, `ctxopt`, `sernevent`, `serncommand`, `serneventesm`, `serncommandesm` and `sernclicommandesm`.
## Release Notes

View File

@@ -55,5 +55,13 @@
"import { commandModule, CommandType } from '@sern/handler';\r\n\r\nexport default commandModule({\r\n\ttype: CommandType.$1,\r\n\tplugins: [],\r\n\tdescription: '$2',\r\n\toptions: [],\r\n\texecute: async (ctx) => {\r\n\t\t$3\r\n\t},\r\n});"
],
"description": "Create a simple command in sern."
},
"sern: Create a cli ESM command": {
"scope": "js,ts",
"prefix": "sernclicommandesm",
"body": [
"import { commandModule, CommandType } from '@sern/handler';\r\nimport { PermissionFlagsBits } from 'discord.js';\r\n\r\n//config for publishing command to discord api.\r\nexport const config: Partial<ValidPublishOptions> = {\r\n//dmPermission: true //uncomment to allow command to run in dms\r\n//defaultMemberPermissions: [PermissionFlagsBits...] // uncomment to require specific permission to run command.\r\nguildIds: [""] //uncomment to insert specific guild ids that this command can be used in or remove for global usage.};\r\n\r\nexport default commandModule({\r\n\ttype: CommandType.$1,\r\n\tplugins: [],\r\n\tdescription: '$2',\r\n\toptions: [],\r\n\texecute: async (ctx) => {\r\n\t\t$3\r\n\t},\r\n});"
],
"description": "Create a cli command in sern."
}
}