nyx/index.js
2021-09-06 18:38:25 +08:00

15 lines
390 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({ delay: 5500, timeout: 30000 });