Together-Java / TJ-Bot

TJ-Bot is a Discord Bot used on the Together Java server. It is maintained by the community, anyone can contribute.
https://togetherjava.org
GNU General Public License v3.0
100 stars 83 forks source link

chore: rename ban history options to be clearer #1082

Closed SimonVerhoeven closed 2 months ago

SimonVerhoeven commented 3 months ago

Updates the delete history options as follows: recent => day all => week

To make how much is cleared clearer.

Resolves #1081

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

SquidXTV commented 3 months ago

I would say the description needs to be updated as well:

the amount of days of the message history to delete, none means no messages are deleted.

if the options are none/day/week

SimonVerhoeven commented 3 months ago

Would the portion of the message history to delete. suffice?

SquidXTV commented 3 months ago

Would the portion of the message history to delete. suffice?

Well wouldn't it be even fine to just simplify it to the message history to delete. and then the options are self-explanatory? Maybe better if the options are named like last day/last week as well.

tj-wazei commented 2 months ago

I approved for the renaming of things but the ban command in it's logic looks incorrect to me (out of scope for Simon).

The Bulk Message Delete API https://discord.com/developers/docs/resources/channel#delete-message

You can delete messages that are younger than 2 weeks. The API can only delete a maximum of 100 messages. Which means for us to do a whole weeks worth of messages, we'd have to make multiple API calls in batches of 100.

Something to look into. Maybe create a new Issue for investigation?

Zabuzard commented 2 months ago

i dont mind. so far it wasnt a problem. afaik these choices are passed directly as they are to the API and align with the options u have when u ban through the native discord UI without our command. and thats fine. adjust the names if it helps, but there isnt really much need for the actions to do anything beyond that