Skip to content

Add a prune command #330

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

Closed
Heatmanofurioso opened this issue Dec 15, 2021 · 12 comments
Closed

Add a prune command #330

Heatmanofurioso opened this issue Dec 15, 2021 · 12 comments
Labels
discussion enhancement New feature or request new command Add a new command or group of commands to the bot priority: normal valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.

Comments

@Heatmanofurioso
Copy link
Contributor

Add a command to more easily prune spammy user messages

It could have a syntax similar to /prune {user} {channel/all} {timeframe:1h/1d}

So, for example
/prune @Heatmanofurioso all 1h -> Would prune all messages sent by the user in the last hour
/prune @Heatmanofurioso #lobby 1d -> Would prune all messages sent by the user in the last day, in the lobby
/prune @Heatmanofurioso #lobby 12 -> Would prune the last 12 messages sent by the user in the lobby

We could also add a parameter for a reason, for logging purposes

@Heatmanofurioso Heatmanofurioso added the enhancement New feature or request label Dec 15, 2021
@Heatmanofurioso Heatmanofurioso added this to the Improvement phase 1 milestone Dec 15, 2021
@Heatmanofurioso Heatmanofurioso added discussion new command Add a new command or group of commands to the bot labels Dec 15, 2021
@marko-radosavljevic
Copy link
Contributor

I agree, purge/prune is a really needed moderation command. Especially for staff assistants, since they don't have a way to delete messages en masse.

If a person has permission to manually delete as many messages as they want, they should also be able to do that in a comfortable manner. ☺️

I also need/want this feature often. For example, to remove past 10 messages in a channel, or to remove past 1h of a user in all channels (something dyno's /purge can't do).

It should be flexible enough to cover all use-cases, and I think you have done a good job regarding that. Only issue I have with is UX wise; using the same option for time hour/day and number of messages. Thanks ❤️

History on this issue: #218, #238

@Tais993
Copy link
Member

Tais993 commented Dec 16, 2021

Duplicate of #17?

Exactly same functionality, we wanted to implement this already.

While it is a duplicate, it probably is better to try it again here.
In the old issue there were random changes and it seemed like the wanted implementation got ignored (which resulted in a different implementation from anything discussed before in the PR)

@Heatmanofurioso
Copy link
Contributor Author

@marko-radosavljevic I also agree that using the same option there doesn't feel like the best choice.

Do you have anything to propose in it's place that felt practical?
I'd like to be able to choose one method or another. I think that's the best approach, regarding necessity

@marko-radosavljevic
Copy link
Contributor

tl;dr

I think we should drop the 'delete last x messages' and go just with 'time'.

For example, if there is a spambot, and we want to remove all messages comfortably, we just delete past 2h, and we are done.

And if we want to delete a selection, for example, if people have off-topic discussion in #today_you_learn, we can have another command that takes a formID : toID range.


There are few issues with removing past x messages I can think of:

  • How do we know how many messages we want to delete? We would have to count them manually.
  • What counts as a message?
    • Does this count?

      Alathreon started a thread: Minecraft channel. See all threads. — Yesterday at 20:50

    • Do messages in threads count? If they do, in which order they would be deleted? Time they were created, or their position in the chat history.
    • Do images count as messages?
    • Do bot responses count?
  • What happens if you accidentally enter 88 instead of 8, you would permanently delete a whole day of chat history.

It doesn't seem very practical UX-wise, and it's dangerous, sooner or later someone will make a mistake. We would need some sort of confirmation button, where the bot would say: Do you really want to delete past 492 messages?

Also, we would have to manually count messages, but to do that, we would need to know how exactly to count them. We can achieve a similar result with just time option, and it's easier than counting messages manually. We just check the time unwanted behaviour happened, and then we delete until that point in time.

Now, this becomes impractical in case we want to delete deep into the past, and impossible if we want to remove just a selection. So for this functionality we can maybe go with another command, that will take formID : toID range. It's powerful and flexible, but it comes at the cost of UX. We can't just type and auto-complete, or script the command, we have to get the ID with mouse, tab, get another ID with mouse… But it's not too terrible imo, since we won't use it that often.

What do you think @Heatmanofurioso? ^^

@Zabuzard
Copy link
Member

Personally, I have never been in a situation I need a purge command anyways. But I am also a mod, hence I have access to ban+delete message history.

Sometimes I have to delete like 4 messages in a row to clear a conversation from a wrong channel; but I would probably continue to do this just with right click -> delete instead of using a command that is likely not flexible enough.

So the only real use case that is actually meaningful and not just "because we can", which I personally see here, is that a Staff Helper wants to clear spam because he only has access to kick and per-message-delete. In which case a "delete message history of user X from the past Y time" would be all that is needed.

@Tais993
Copy link
Member

Tais993 commented Dec 16, 2021

^^^

The from (ID) to (ID) is reallyyyyy rare.
To get the ID you need to click the same amount as deleting the message, and you also need to type the command.

Takes too much time, doubt anyone will use

@marko-radosavljevic
Copy link
Contributor

marko-radosavljevic commented Dec 16, 2021

Yeah, it's mostly for staff assistants, since it's super annoying to manually delete spam from every channel. That's also how this issue originated.

If's flexible enough, mods can also use it. In case you ever want to delete 20+ messages, it's handy. To clear the channel, to delete messages but without banning the user… We had Shrimp the other day, manually deleting 50 messages, and he is a mod, and we have a dyno's ?pruge. I see this as a separate command tho, more powerful but worse UX. ^^

But that is not the primary goal. We want to make simple QoL utility for staff assistants. So yeah, just having time and no additional flags is the cleanest UX, and covers 99% of the cases. An important difference from dyno's ?purge is that we will be able to delete messages from all channels, which is the majority of use-cases.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jan 16, 2022
@Zabuzard Zabuzard removed the stale label Jan 17, 2022
@Heatmanofurioso
Copy link
Contributor Author

Would this proposal still be relevant in your eyes @Zabuzard ?

Even for another server, it feels like it'd be useful for Staff Helpers against spammers

@Zabuzard
Copy link
Member

Zabuzard commented Feb 8, 2022

We have been talking a lot already on such a feature and what the UX and use cases for it should be.

I think we figured out quite well by now what we expect and what not (if reading the history of this chat and the linked chats).

So as long as something is created that goes hand in hand with what those discussions resulted in, absolutely go for it. There is definitely a use case for such a command - it is just smaller and more specific than what most people originally proposed.

@marko-radosavljevic
Copy link
Contributor

marko-radosavljevic commented Feb 8, 2022

Yup, we bounced a lot of ideas about it, it's now up to the person implementing it to frame the best feature out of all this. And we can always improve it further while it's in draft PR phase. ☺️

I'm always finding new use cases for purge, and I dislike how inflexible discord is with removing messages, and cleaning up channels.

For example, I accidentally derailed a suggestion conversation with another member yesterday, and it would be nice to be able to just 'reset it' (with permission of said user), because that serves the most utility for everyone involved. It's very painful when you don't have that flexibility, but you need it, in case of someone spamming, etc.

Edit: 15 minutes ago, I removed 6-8 messages from a channel they didn't belong to. Which is not that terrible, since I learned that I can hold shift and delete each message with one click. Before this revelation, it was much more annoying, so this use-case mostly disappeared for me (message count between 6-12 messages), since there wouldn't be a lot of time saved by me typing the command. Still not opposed to it tho, but the primary objective is QoL feature for staff assistants in removing spam from multiple channels.

So, personally, I'm open to a lot of different ideas regarding this. Feel free to create a rough draft, and we will see where it goes from there. It's always a good idea to gather as much input before doing any real work, so I appreciate you asking us. ❤️

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

@github-actions github-actions bot added stale inactivity-closed Issues that have been closed due to inactivity, but are otherwise valid and might be reopened later labels Mar 11, 2022
@marko-radosavljevic marko-radosavljevic added valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board. and removed inactivity-closed Issues that have been closed due to inactivity, but are otherwise valid and might be reopened later stale labels Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request new command Add a new command or group of commands to the bot priority: normal valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Projects
None yet
Development

No branches or pull requests

4 participants