diff --git a/src/listeners/verification/leaveVC.ts b/src/listeners/verification/leaveVC.ts index e1d4084..14cda3a 100644 --- a/src/listeners/verification/leaveVC.ts +++ b/src/listeners/verification/leaveVC.ts @@ -148,7 +148,7 @@ export class VerificationLeaveVCListener extends Listener { listTextChannels.forEach((c) => { const textChannel = c as TextChannel; // Checks if the channel topic has the user's snowflake - if (textChannel.topic!.includes(userSnowflake!)) { + if (textChannel.topic !== null && textChannel.topic.includes(userSnowflake!)) { textChannel.delete(); } }); diff --git a/src/listeners/verification/start.ts b/src/listeners/verification/start.ts index 99e6dc8..ac9da77 100644 --- a/src/listeners/verification/start.ts +++ b/src/listeners/verification/start.ts @@ -80,7 +80,7 @@ export class VerificationReady extends Listener { const textChannel = c as TextChannel; // Checks if the channel topic has the user's snowflake emptyVC.forEach((snowflake) => { - if (textChannel.topic!.includes(snowflake)) { + if (textChannel.topic !== null && textChannel.topic.includes(snowflake)) { textChannel.delete(); } });