refactor: prettify templates index files

This commit is contained in:
George Needham
2023-06-11 10:40:33 -05:00
parent 53f8e64639
commit 4cbb9415f1
4 changed files with 25 additions and 39 deletions

View File

@@ -1,9 +1,5 @@
import { Client, GatewayIntentBits } from 'discord.js';
import {
Sern,
single,
makeDependencies
} from '@sern/handler';
import { Sern, single, makeDependencies } from '@sern/handler';
const client = new Client({
intents: [
@@ -24,18 +20,16 @@ const client = new Client({
* This is used for external event modules as well
*/
async function init() {
await makeDependencies({
build: (root) =>
root.add({ '@sern/client': single(() => client) })
});
//View docs for all options
Sern.init({
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
commands: 'dist/commands',
// events: 'dist/events' (optional),
});
await makeDependencies({
build: (root) => root.add({ '@sern/client': single(() => client) }),
});
//View docs for all options
Sern.init({
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
commands: 'dist/commands',
// events: 'dist/events', //(optional)
});
}
client.login();