Fix crash when command does not exist
All checks were successful
CI / CI (push) Successful in 1m24s

This regression appeared when I removed custom command support
This commit is contained in:
SileNce5k 2025-05-02 16:50:20 +02:00
parent 6b45bc6799
commit 30c7fd171f
Signed by: SileNce
GPG key ID: B0A142BB4291B204

View file

@ -19,6 +19,7 @@ module.exports = function(client, owners, message, globalPrefix){
const commandName = args.shift().toLowerCase();
const command = client.commands.get(commandName);
if(!command) return;
if(command.needsWhitelist){
let isWhitelisted = client.whitelist.get(message.guild.id)?.includes(command.name);
if(!isWhitelisted){