diff --git a/README.md b/README.md index aef6ee0..fb929c2 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,7 @@ export default { visibility : 'private', test : false, type: Sern.CommandType.SLASH | Sern.CommandType.TEXT, - execute : async ({ message, interaction }, args) => { - interaction.reply({ content: 'Pong! }); - } + execute : async ({ message, interaction }, args) => 'pong!' }; ``` @@ -80,14 +78,14 @@ See [documentation](https://sernhandler.js.org) for TypeScript examples and more ## Contribute -- Pull up on [issues](https://github.com/jacoobes/Sern/issues) and tell me if there are bugs +- Pull up on [issues](https://github.com/jacoobes/Sern/issues) and tell us, if there are bugs - All kinds of contributions are welcomed! ## TODO -- [ ] Default commands -- [ ] Categories -- [ ] Ruling out all bugs in the command system -- [ ] Better support for slash commands -- [ ] More Build scripts -- [ ] Logger +- Default commands +- Categories +- Ruling out all bugs in the command system +- Better support for slash commands +- More Build scripts +- Logger diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..4572bac --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +sern-handler.js.org \ No newline at end of file diff --git a/src/handler/utilities/readFile.ts b/src/handler/utilities/readFile.ts index ee9e0c7..1a5fadb 100644 --- a/src/handler/utilities/readFile.ts +++ b/src/handler/utilities/readFile.ts @@ -12,6 +12,7 @@ export type CommandVal = { export const Commands = new Map(); export const Alias = new Map(); +// Courtesy @Townsy45 async function readPath(dir: string, arrayOfFiles: string[] = []): Promise { try { const files = readdirSync(dir); diff --git a/src/types/handler.ts b/src/types/handler.ts index 20e13a2..062113a 100644 --- a/src/types/handler.ts +++ b/src/types/handler.ts @@ -15,7 +15,7 @@ export type Visibility = 'private' | 'public'; // Anything that can be sent in a `#send` or `#reply` export type possibleOutput = T | (MessagePayload & MessageOptions); export type execute = Sern.Module['execute']; - +// Thanks @cursorsdottsx export type ParseType = { [K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never; }[keyof T];