From 3937c0a83892964cba53d2fb2e3a852477d1caba Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 3 Oct 2020 15:18:27 +0300 Subject: [PATCH] Start expiredBlockLoop() directly, not on "ready" event This is because the client is already ready by this point, as plugins are only loaded after the ready event. --- src/modules/block.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/block.js b/src/modules/block.js index 25d51b4..252be93 100644 --- a/src/modules/block.js +++ b/src/modules/block.js @@ -28,7 +28,7 @@ module.exports = ({ bot, knex, config, commands }) => { setTimeout(expiredBlockLoop, 2000); } - bot.on("ready", expiredBlockLoop); + expiredBlockLoop(); const blockCmd = async (msg, args, thread) => { const userIdToBlock = args.userId || (thread && thread.user_id);