mirror of
https://github.com/sern-handler/create-bot
synced 2026-06-06 01:16:53 +00:00
refactor: prettify templates index files
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user