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.
cshd
Dragory 2020-10-03 15:18:27 +03:00
parent 19b9d4db61
commit 3937c0a838
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ module.exports = ({ bot, knex, config, commands }) => {
setTimeout(expiredBlockLoop, 2000); setTimeout(expiredBlockLoop, 2000);
} }
bot.on("ready", expiredBlockLoop); expiredBlockLoop();
const blockCmd = async (msg, args, thread) => { const blockCmd = async (msg, args, thread) => {
const userIdToBlock = args.userId || (thread && thread.user_id); const userIdToBlock = args.userId || (thread && thread.user_id);