discordjs / Commando

Official command framework for discord.js
Apache License 2.0
496 stars 242 forks source link

Deleting command message #80

Open katlyn opened 7 years ago

katlyn commented 7 years ago

Something that I have seen the need of in some of my bots is deleting the messages that initiated a command. An option that allows for the message the initiated a command to be deleted. This includes the helper messages for arguments. I can delete the very first message that the user sends, but if any helper messages are sent by the bot asking for arguments, there is no way (that I know of) that you can delete them and the responses from the user.

Gawdl3y commented 7 years ago

https://discord.js.org/#/docs/commando/master/class/CommandMessage?scrollTo=responses

Gawdl3y commented 7 years ago

Actually, that may not be it. I'll have to check later.

Telokis commented 6 years ago

Agreed, that would be a nice-to-have.

Armaldio commented 6 years ago

+1, really need to delete the messages in the argument asking process

ghost commented 6 years ago

Any update on this 😞?

Vanthenos commented 5 years ago

Yeah thats a really need option to delete the prompts and response messages

Gawdl3y commented 5 years ago

Currently, it can be accomplished by deleting messages in the CommandoMessage#responses property in the CommandoClient#commandRun event after a delay. A more graceful way of handling this is planned.

BalmaBrian commented 4 years ago

Is it possible to delete more messages in a single channel?

Naim2000 commented 4 years ago

Is it possible to delete more messages in a single channel?

If I understand correctly, isn't that what bulkDelete is for?

BalmaBrian commented 4 years ago

@Naim2000 yes, how ever I am still having trouble using the this.client functionality to access bulkDelete correctly. I am probably approaching this problem incorrectly. Is there a way to use bulkDelete in a run function of a Command class?

Fyko commented 4 years ago

@BalmaBrian The bulkDelete function exists on the TextChannel class and has nothing to do with the client. See this page for more information. Otherwise, feel free to take your Discord.js-related questions to the support channels within the official Discord server - https://discord.gg/bRCvFy9

Kaper365 commented 3 years ago

Is there any update on this issue/enhancement? Deleting arg prompts is still a problematic experience

Akhronox commented 2 years ago

Currently, it can be accomplished by deleting messages in the CommandoMessage#responses property in the CommandoClient#commandRun event after a delay. A more graceful way of handling this is planned.

How do you do that? When I use message.responses I have no options to delete available, VS Code tells me the type is {}.