This commit is contained in:
Jacob Nguyen
2022-02-19 09:55:20 -06:00
4 changed files with 11 additions and 11 deletions

View File

@@ -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

1
docs/CNAME Normal file
View File

@@ -0,0 +1 @@
sern-handler.js.org

View File

@@ -12,6 +12,7 @@ export type CommandVal = {
export const Commands = new Map<string, CommandVal>();
export const Alias = new Map<string, CommandVal>();
// Courtesy @Townsy45
async function readPath(dir: string, arrayOfFiles: string[] = []): Promise<string[]> {
try {
const files = readdirSync(dir);

View File

@@ -15,7 +15,7 @@ export type Visibility = 'private' | 'public';
// Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
export type possibleOutput<T = string> = T | (MessagePayload & MessageOptions);
export type execute = Sern.Module<unknown>['execute'];
// Thanks @cursorsdottsx
export type ParseType<T> = {
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
}[keyof T];