You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever theres a spam bot, or something related, deleting messages by hand isn't exactly an option.
At the times the moderators aren't active or online, this means manual removal of their messages.
I propose a different logic to the command, basically I would align it to the other commands (the ban functionality specifically), which just deletes all messages from the last day or so.
It would be simpler to use and I think it would cover the use case as well.
Could we make it such that passing multiple users as arguments would delete the previous 100(if 100 is passed as an argument) messages of those users? We would have to keep varargs as an argument and the no of messages too, but then the vararg would have to be the final parameter.
100 messages of those users
This either requires us to store all messages send, or we need to retrieve ... messages from each channel to find their messages.
Both are, not really a nice solution imo.
One feels like a waste of storage, and one will cause rate-limits.
If the user only send 99, and we still try to delete 100 the bot will keep retrieving messages.
So there needs to be a limit of when the bot stops retrieving.
For your info, bots can't do "from:Tijs#0002" to see all messages send by "Tijs#0002"
The search API is only for users, so these kind of commands are hard to properly make.
Thanks Github for removing the 0's..
And since both you and Zabuzard mentioned caching messages.
We can think about this, but we need to set a limit on when messages will be removed.
Like, we will store user ID's and message ID's for 5 days?
I honestly don't know how much storage this takes, so I'm not sure how realistic this is.
We can just try it when the vps is ready, see #27
After results from how much storage messages take we can decide further if everyone is alright with that?
Regarding this command. I have my closed my original pr and will open a new one. I will make 2 commands clear and purge. The clear command will allow you to clear a vast number of messages. This is useful for occasion such as raids and then i will will create a purge command which will allow you to delete specific messages
For completeness, let me repeat the functionallity I want:
I can give the command a message ID from
I can give the command an optional message ID to (if not given, it will just assume "all" or "most recent" message as end point)
It then deletes all messages in the current channel between those two message IDs.
Therefore, methods like MessageChannel#getHistoryAfter and similar might be useful.
I am lowering priority of this command since (as far as I can think back), we never had such a situation in our server yet. Only situations in which you would also want to ban (and then messages are deleted anyways).
But sure, being prepared for a raid or something is never a bad thing.
For completeness, let me repeat the functionallity I want:
I can give the command a message ID from
I can give the command an optional message ID to (if not given, it will just assume "all" or "most recent" message as end point)
It then deletes all messages in the current channel between those two message IDs.
Therefore, methods like MessageChannel#getHistoryAfter and similar might be useful.
Ok. I see what you want. I will make one command called purge in which you can do /purge messageid(from) messagid(to)
Activity
Zabuzard commentedon Sep 6, 2021
I propose a different logic to the command, basically I would align it to the other commands (the ban functionality specifically), which just deletes all messages from the last day or so.
It would be simpler to use and I think it would cover the use case as well.
Tais993 commentedon Sep 6, 2021
This requires us to cache every single message for 1 day, it's possible but sounds overkill to me.
Or helpers receive ban permissions (which shouldn't happen imo)
AzatothTheAwakened commentedon Sep 6, 2021
Rename it "purge" because thats usually how its called in other bots
[-]Clear command[/-][+]purge/clear command[/+]java-coding-prodigy commentedon Sep 8, 2021
Could we make it such that passing multiple users as arguments would delete the previous 100(if 100 is passed as an argument) messages of those users? We would have to keep varargs as an argument and the no of messages too, but then the vararg would have to be the final parameter.
Tais993 commentedon Sep 8, 2021
One feels like a waste of storage, and one will cause rate-limits.
If the user only send 99, and we still try to delete 100 the bot will keep retrieving messages.
So there needs to be a limit of when the bot stops retrieving.
For your info, bots can't do "from:Tijs#0002" to see all messages send by "Tijs#0002"
The search API is only for users, so these kind of commands are hard to properly make.
Tais993 commentedon Sep 8, 2021
Thanks Github for removing the 0's..
And since both you and Zabuzard mentioned caching messages.
We can think about this, but we need to set a limit on when messages will be removed.
Like, we will store user ID's and message ID's for 5 days?
I honestly don't know how much storage this takes, so I'm not sure how realistic this is.
We can just try it when the vps is ready, see #27
After results from how much storage messages take we can decide further if everyone is alright with that?
Zabuzard commentedon Sep 9, 2021
Blocked by #59
[-]purge/clear command[/-][+][FEATURE] purge/clear command[/+]13 remaining items
Tais993 commentedon Oct 23, 2021
If we go for user specific purge commands, we still need to decide it's full implementation.
Since it requires storing users their messages, we'll need to decide for how long we'll store messages.
500 messages max, 100, less more?
5 days max, 2 days max, less more?
Zabuzard commentedon Oct 23, 2021
We dont need to store the actual content though. Only message id , author id and timestamp. Or something like that.
The #117 command actually already added such a database table which stores such message metadata up to 30 days, I think.
RealYusufIsmail commentedon Oct 28, 2021
Regarding this command. I have my closed my original pr and will open a new one. I will make 2 commands clear and purge. The clear command will allow you to clear a vast number of messages. This is useful for occasion such as raids and then i will will create a purge command which will allow you to delete specific messages
Tais993 commentedon Oct 28, 2021
Just create 1 command and use subcommands
Zabuzard commentedon Oct 28, 2021
For completeness, let me repeat the functionallity I want:
fromto(if not given, it will just assume "all" or "most recent" message as end point)It then deletes all messages in the current channel between those two message IDs.
Therefore, methods like
MessageChannel#getHistoryAfterand similar might be useful.Zabuzard commentedon Oct 28, 2021
I am lowering priority of this command since (as far as I can think back), we never had such a situation in our server yet. Only situations in which you would also want to ban (and then messages are deleted anyways).
But sure, being prepared for a raid or something is never a bad thing.
RealYusufIsmail commentedon Oct 28, 2021
Ok. I see what you want. I will make one command called purge in which you can do
/purge messageid(from) messagid(to)Zabuzard commentedon Dec 16, 2021
Closing in favor of duplicate #330 .