Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete all typed commands when deleteMessages is set #144

Closed
wants to merge 1 commit into from

Conversation

cozza55
Copy link

@cozza55 cozza55 commented May 12, 2022

Fixes #135

Feel free to suggest rework if you don't agree with the approach.

@markokajzer markokajzer deleted the branch markokajzer:master March 26, 2023 12:33
@markokajzer
Copy link
Owner

i guess this was closed by accident when i renamed master -> main

feel free to re-open if you want to

@@ -44,5 +44,15 @@ export default class MessageHandler {
}

commandToRun.run(message, params);

if (deleteMessages && !message.deleted && !this.wasMessageAlreadyDeleted(message)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config is already imported. as an example check L23 which just uses config.prefix.length

i think you can just skip using a parameter, and simply use config.deleteMessages here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd also love for the command to finish first, and then delete the message, so everyone knows what's up 🤙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting typed commands
2 participants