nyx/index.js

16 lines
385 B
JavaScript
Raw Normal View History

2021-06-24 09:53:19 +02:00
const { ShardingManager } = require("discord.js");
2021-07-13 05:17:39 +02:00
require("dotenv").config();
const manager = new ShardingManager(`./bot.js`, {
token: process.env.TOKEN,
2021-06-24 09:53:19 +02:00
totalShards: `auto`,
});
2021-07-13 05:17:39 +02:00
manager.on(`shardCreate`, shard => {
2021-06-24 09:53:19 +02:00
console.log(
`[${new Date().toString().split(" ", 5).join(" ")}] Spawned shard #${
shard.id
}`
);
});
2021-07-13 05:17:39 +02:00
manager.spawn(manager.totalShards, 10000);