mirror of
https://github.com/sern-handler/snippets
synced 2026-06-06 01:16:58 +00:00
Merge pull request #9 from Peter-MJ-Parker/main
feat/make cli example command
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user