Sharding Dies

here is some of my code: shards.mjs:
import { ShardingManager } from "discord.js";
import dotenv from 'dotenv';
dotenv.config();

import { Logger } from "logger-ts-node";

const manager = new ShardingManager('./src/bot.mjs', {
token: process.env.TOKEN
});

manager.on('shardCreate', shard => Logger.info(`Launched shard ${shard.id}`));

manager.spawn();
import { ShardingManager } from "discord.js";
import dotenv from 'dotenv';
dotenv.config();

import { Logger } from "logger-ts-node";

const manager = new ShardingManager('./src/bot.mjs', {
token: process.env.TOKEN
});

manager.on('shardCreate', shard => Logger.info(`Launched shard ${shard.id}`));

manager.spawn();
ready.mjs:
import { Events, ActivityType } from "discord.js";
import { Logger } from "logger-ts-node";

export default {
name: Events.ClientReady,
once: true,
async execute(client) {
Logger.info(`Logged in as ${client.user.tag}`);
await client.user.setPresence({
activities: [{ name: `Under Development`, type: ActivityType.Custom }],
status: 'idle'
});
}
}
import { Events, ActivityType } from "discord.js";
import { Logger } from "logger-ts-node";

export default {
name: Events.ClientReady,
once: true,
async execute(client) {
Logger.info(`Logged in as ${client.user.tag}`);
await client.user.setPresence({
activities: [{ name: `Under Development`, type: ActivityType.Custom }],
status: 'idle'
});
}
}
No description
3 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Dãrķ Søŭł
Dãrķ SøŭłOP9mo ago
[email protected] D:\MIXAHΛ\HeartCore\Bots\Heartcore-Bot
[email protected] D:\MIXAHΛ\HeartCore\Bots\Heartcore-Bot
v20.11.1
Want results from more Discord servers?
Add your server