nyx/index.js
2021-07-13 11:17:39 +08:00

15 lines
385 B
JavaScript

const { ShardingManager } = require("discord.js");
require("dotenv").config();
const manager = new ShardingManager(`./bot.js`, {
token: process.env.TOKEN,
totalShards: `auto`,
});
manager.on(`shardCreate`, shard => {
console.log(
`[${new Date().toString().split(" ", 5).join(" ")}] Spawned shard #${
shard.id
}`
);
});
manager.spawn(manager.totalShards, 10000);