From 2829b3638c539eace37e638e2836c2c464d2b75e Mon Sep 17 00:00:00 2001 From: zhiyan114 Date: Thu, 7 Nov 2024 15:06:25 -0500 Subject: [PATCH] Fix class binding for callback stuff --- src/services/unverifyKick.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/unverifyKick.ts b/src/services/unverifyKick.ts index 1202e05..665d991 100644 --- a/src/services/unverifyKick.ts +++ b/src/services/unverifyKick.ts @@ -25,10 +25,10 @@ export class unverifyKickLoader { await this.checkAndKick(); // Set grace period callback func - this.client.on('guildMemberAdd', this.setGracePeriod); + this.client.on('guildMemberAdd', this.setGracePeriod.bind(this)); // Set cronjob to check every hour - schedule("0 * * * *", this.checkAndKick); + schedule("0 * * * *", this.checkAndKick.bind(this)); }