mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-18 10:57:05 -04:00
bring back mention prefix support
This commit is contained in:
parent
341261d314
commit
b19f753ae0
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,7 @@ if(process.env.PREFIX_OVERRIDE) commandPrefixes = process.env.PREFIX_OVERRIDE.sp
|
||||||
|
|
||||||
const commandClient = new CommandClient(cluster, {
|
const commandClient = new CommandClient(cluster, {
|
||||||
activateOnEdits: true,
|
activateOnEdits: true,
|
||||||
mentionsEnabled: false,
|
mentionsEnabled: true,
|
||||||
prefix: commandPrefixes[0],
|
prefix: commandPrefixes[0],
|
||||||
prefixes: commandPrefixes,
|
prefixes: commandPrefixes,
|
||||||
useClusterClient: true,
|
useClusterClient: true,
|
||||||
|
@ -92,6 +92,8 @@ commandClient.on('commandDelete', async ({context, reply}) => {
|
||||||
|
|
||||||
let hasPrefix = false;
|
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.startsWith(p)) hasPrefix = true;
|
||||||
|
if(context.message.content.startsWith(context.client.user.mention)) hasPrefix = true;
|
||||||
|
|
||||||
if(!reply.deleted && !hasPrefix) reply.delete();
|
if(!reply.deleted && !hasPrefix) reply.delete();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue