fixes an issue with prefixes

This commit is contained in:
bignutty 2024-05-28 20:34:41 +02:00
parent a9c851c8d9
commit f3cb7dea56

View file

@ -121,7 +121,7 @@ commandClient.on('commandDelete', async ({context, reply}) => {
if(context.message?.deleted) return reply.delete();
let hasPrefix = false;
for(const p of commandPrefixes) if(context.message.content.startsWith(p)) hasPrefix = true;
for(const p of commandPrefixes) if(context.message.content.toLowerCase().startsWith(p)) hasPrefix = true;
if(context.message.content.startsWith(context.client.user.mention)) hasPrefix = true;
if(!reply.deleted && !hasPrefix) reply.delete();