mirror of
https://github.com/SrIzan10/sern-create-bot.git
synced 2026-05-01 11:05:20 +00:00
refactor: prettify templates index files
This commit is contained in:
@@ -20,16 +20,14 @@ const client = new Client({
|
||||
* This is used for external event modules as well
|
||||
*/
|
||||
await makeDependencies({
|
||||
build: (root) =>
|
||||
root
|
||||
.add({ '@sern/client': single(() => client) })
|
||||
build: (root) => root.add({ '@sern/client': single(() => client) }),
|
||||
});
|
||||
|
||||
//View docs for all options
|
||||
Sern.init({
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'src/commands',
|
||||
// events: 'src/events' (optional),
|
||||
// events: 'src/events', //(optional)
|
||||
});
|
||||
|
||||
client.login();
|
||||
|
||||
@@ -21,17 +21,16 @@ const client = new Client({
|
||||
*/
|
||||
|
||||
async function init() {
|
||||
await makeDependencies({
|
||||
build: (root) =>
|
||||
root.add({ '@sern/client': single(() => client) })
|
||||
});
|
||||
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: 'src/commands',
|
||||
// events: 'src/events' (optional),
|
||||
});
|
||||
//View docs for all options
|
||||
Sern.init({
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'src/commands',
|
||||
// events: 'src/events', //(optional)
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import {
|
||||
Sern,
|
||||
makeDependencies,
|
||||
single,
|
||||
} from '@sern/handler';
|
||||
import { Sern, makeDependencies, single } from '@sern/handler';
|
||||
|
||||
const client = new Client({
|
||||
intents: [
|
||||
@@ -24,15 +20,14 @@ const client = new Client({
|
||||
* This is used for external event modules as well
|
||||
*/
|
||||
await makeDependencies({
|
||||
build: (root) =>
|
||||
root.add({ '@sern/client': single(() => client) })
|
||||
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),
|
||||
// events: 'dist/events', //(optional)
|
||||
});
|
||||
|
||||
client.login();
|
||||
|
||||
@@ -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