Skip to content

Commit

Permalink
Merge pull request #172 from iminlikewithyou/fix-crash
Browse files Browse the repository at this point in the history
fix crash when channel is null
  • Loading branch information
iminlikewithyou authored Jul 28, 2024
2 parents b87f144 + 37764f1 commit 4263e2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/command-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export function registerClientAsCommandHandler(client: Client, commandFolder: st
}

function isBroadcastChannel(channel: GuildTextBasedChannel) {
if (!channel) return false;
return channel.name.toLowerCase().includes("bot");
}

Expand Down

0 comments on commit 4263e2f

Please sign in to comment.