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
parent
19b9d4db61
commit
3937c0a838
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue