mirror of
https://github.com/sern-handler/snippets
synced 2026-06-06 01:16:58 +00:00
chore: clean-up non-ESM commands
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`, `serncommandesm` and `sernclicommandesm`.
|
||||
you can use `ctxeph`, `ctxopt`, `serndiscordeventesm`, `serneventesm`, `serncommandesm` and `sernclicommandesm`.
|
||||
|
||||
## Release Notes
|
||||
|
||||
@@ -14,4 +14,9 @@ Initial release of sern snippets. It contains simple commands and events, also e
|
||||
|
||||
Adds ESM snippets: `serneventesm` and `serncommandesm`
|
||||
|
||||
---
|
||||
### 1.2.0
|
||||
|
||||
Removes non-ESM snippets: `sernevent` and `serncommand`
|
||||
Adds ESM snippet: `serndiscordeventesm`
|
||||
|
||||
---
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "sern-snippets",
|
||||
"displayName": "sern Snippets",
|
||||
"description": "Snippets for the sern discord bot framework",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"repository": {
|
||||
"url": "https://github.com/sern-handler/snippets"
|
||||
},
|
||||
|
||||
@@ -24,22 +24,6 @@
|
||||
"body": ["await ctx.reply({ $1 })"],
|
||||
"description": "Send a message with an empty array."
|
||||
},
|
||||
"sern: Create a simple event": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "sernevent",
|
||||
"body": [
|
||||
"const { EventType, eventModule } = require('@sern/handler');\r\n\r\nexport default eventModule({\r\n type: EventType.${1:Discord},\r\n name : '$2',\r\n execute: async () => {\r\n $4\r\n }\r\n })"
|
||||
],
|
||||
"description": "Create a simple event in sern."
|
||||
},
|
||||
"sern: Create a simple command": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "serncommand",
|
||||
"body": [
|
||||
"const { commandModule, CommandType } = require('@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 simple ESM event": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "serneventesm",
|
||||
@@ -48,6 +32,14 @@
|
||||
],
|
||||
"description": "Create a simple event in sern."
|
||||
},
|
||||
"sern: Create a simple ESM discord event": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "serndiscordeventesm",
|
||||
"body": [
|
||||
"import { EventType, discordEvent } from '@sern/handler';\r\n\r\nexport default discordEvent({\r\n name : '$2',\r\n execute: async () => {\r\n $4\r\n }\r\n })"
|
||||
],
|
||||
"description": "Create a simple discord event in sern."
|
||||
},
|
||||
"sern: Create a simple ESM command": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "serncommandesm",
|
||||
@@ -58,10 +50,10 @@
|
||||
},
|
||||
"sern: Create a cli ESM command": {
|
||||
"scope": "js,ts",
|
||||
"prefix": "sernclicommandesm",
|
||||
"prefix": "sernclicommand",
|
||||
"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});"
|
||||
"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 = {\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