From b19f753ae0a1199a868dbee47a0403064a518d4d Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Fri, 1 Dec 2023 23:40:13 +0100 Subject: [PATCH] bring back mention prefix support --- labscore/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labscore/client.js b/labscore/client.js index 97e329c..540c736 100644 --- a/labscore/client.js +++ b/labscore/client.js @@ -43,7 +43,7 @@ if(process.env.PREFIX_OVERRIDE) commandPrefixes = process.env.PREFIX_OVERRIDE.sp const commandClient = new CommandClient(cluster, { activateOnEdits: true, - mentionsEnabled: false, + mentionsEnabled: true, prefix: commandPrefixes[0], prefixes: commandPrefixes, useClusterClient: true, @@ -92,6 +92,8 @@ commandClient.on('commandDelete', async ({context, reply}) => { let hasPrefix = false; for(const p of commandPrefixes) if(context.message.content.startsWith(p)) hasPrefix = true; + if(context.message.content.startsWith(context.client.user.mention)) hasPrefix = true; + if(!reply.deleted && !hasPrefix) reply.delete(); })