mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
bot will now delete command replies if command is deleted
This commit is contained in:
parent
a50e70fb1c
commit
39fa324789
1 changed files with 5 additions and 0 deletions
|
@ -55,6 +55,11 @@ const { maintower } = require('./logging');
|
|||
const { icon } = require('./utils/markdown');
|
||||
const { editOrReply } = require('./utils/message');
|
||||
|
||||
// Delete command responses if the user chooses to delete their trigger or edits the command away
|
||||
commandClient.on('commandDelete', async ({context, reply}) => {
|
||||
if(context.message?.deleted && !reply.deleted || !context.message.content.startsWith(commandPrefix)) reply.delete();
|
||||
})
|
||||
|
||||
commandClient.on('commandRunError', async ({context, error}) => {
|
||||
try{
|
||||
// Log the error via our maintower service
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue