Together-Java / TjBot

A bot for the together java discord server. Name still undecided
6 stars 6 forks source link

Warn System #4

Open AzatothTheAwakened opened 4 years ago

AzatothTheAwakened commented 4 years ago

What does the new feature do?

As a Moderator I want to warn users for inacceptable behaviour. This warn is permanently stored so that I can keep track of the offenses a User has. A warn should contain the offender, a timestamp, a reson, an ID, the severity, and the Moderator that warned the offender. As a Moderator I want to query a User for recieved warnings and get a list of all above stated Informations for each warning. As a Moderator I want to be able to see all Warned users and how many warnings they recieved so far so that I can keep track on whoom I need to keep an eye on. As a Moderator I want to be able to delete a warning by the corresponding ID which results in the warning being deleted permanently and the User being informed.

The offender should recieve a direct message to inform them about their misbehaving which should include the reason, the severity and the timestamp.

How does this feature benefit the server?

It makes it easier to keep track on misbehaving people and to know who might misbehave in future.

Example of usage:

Warning a user

>warn User#1234 1 "Personal insults to User#1337"

User#1234 recieves a Message:

[Timestamp]
You have been warned on Together Java.
Severity: Minor
Reason: Personal insults to User#1337

Querying warnings for a user

>warnings User#1234

Lists all warnings for User#1234:

ID    Moderator    Timestamp    Severity    Reason
5     Mod#1234     [Timestamp]  1           Personal insults to User#1337

Querying all warnings

>warnings

Results in a list which shows all warned users and how many warnings they recieved so far:

User         Warnings
User#1234    1

Deleting a warning

>deletewarning 5

results in:

Deleted warning for User#1234:
5     Mod#1234     [Timestamp]  1           Personal insults to User#1337

The corresponding User should recieve a similar Message.

Notes

This feature is open for discussion, critique or improvement.

Shrined commented 4 years ago

Do you have anything in mind on how we would permanently store the warning info? Perhaps JDBC?

AzatothTheAwakened commented 4 years ago

I think we should go with SQLite and JOOQ

SQLite because its really easy to setup and get it running (Beginner friendly) JOOQ because its right in the middle of not having to write annoying raw SQL and still writing SQL, so beginners still learn SQL and experienced people dont have to write that much sql. I will open up another Issue for further discussion.

Fibii commented 4 years ago

i want to take this if it is available.