Skip to content

Commit

Permalink
code: Usefull snipet to create comamnd or args param
Browse files Browse the repository at this point in the history
  • Loading branch information
youKnowOwO committed Aug 23, 2020
1 parent fc9766c commit 0d3e964
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .vscode/Yumeko.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
// Place your yumeko workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"Declare Command": {
"scope": "typescript",
"prefix": "cmd:declare",
"body": [
"import Command from \"@yumeko/classes/Command\";",
"import type { Message } from \"discord.js\";",
"import { DeclareCommand } from \"@yumeko/decorators\";",
"",
"@DeclareCommand(\"\", {",
"\taliases: [],",
"\tdescription: {",
"\t\tcontent: \"\",",
"\t\tusage: \"\",",
"\t\texamples: [\"\"]",
"\t},",
"\tcategory: \"\"",
"})",
"export default class extends Command {",
"\tpublic async exec(msg: Message): Promise<Message> {",
"\t\treturn msg;",
"\t}",
"}"
],
"description": "To Declare Command"
},
"Add Args": {
"scope": "typescript",
"prefix": "cmd:args",
"body": [
"{",
"\tidentifier: \"\",",
"\tmatch: \"\",",
"\ttype: \"\"",
"}"
]
}
}

0 comments on commit 0d3e964

Please sign in to comment.