From 7c7dc779c865f324587b0d1d48b285f7336b2aaf Mon Sep 17 00:00:00 2001 From: TheEssem Date: Tue, 31 Mar 2020 10:01:33 -0500 Subject: [PATCH] Added option to .env to specify number of shards --- .env.example | 2 ++ utils/client.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 0cbf3b5..cf0d9e8 100644 --- a/.env.example +++ b/.env.example @@ -11,6 +11,8 @@ TOKEN= MONGO=mongodb://localhost:27017/esmBot # Put snowflake ID of bot owner here OWNER= +# Put amount of needed shards here +SHARDS=1 ########### # Optional diff --git a/utils/client.js b/utils/client.js index 08a4280..a9fa945 100644 --- a/utils/client.js +++ b/utils/client.js @@ -16,7 +16,7 @@ const client = new Client(process.env.TOKEN, { TYPING_START: true, USER_UPDATE: true }, - maxShards: "auto", + maxShards: process.env.SHARDS, opusOnly: true }); module.exports = client;