Skip to content

Migrate kick, ban and unban command - #196

Closed
RealYusufIsmail wants to merge 189 commits into
Together-Java:developfrom
BotCraftHub:feature/kick_and_ban_commands
Closed

RealYusufIsmail wants to merge 189 commits into
Together-Java:developfrom
BotCraftHub:feature/kick_and_ban_commands

Conversation

@RealYusufIsmail

@RealYusufIsmail RealYusufIsmail commented Oct 16, 2021 •

Copy link
Copy Markdown
Contributor

I have added a kick, ban and unban command. I will be adding more moderation commands in the future.
For the kick command you have to do /kick @user were as for the ban command you have to do /ban @user del_day(int). For the unban command you will type /unban user_id

Partially implements #63 and #64 .

@RealYusufIsmail
RealYusufIsmail requested review from a team as code owners October 16, 2021 15:26
@RealYusufIsmail
RealYusufIsmail marked this pull request as draft October 16, 2021 15:31
@RealYusufIsmail
RealYusufIsmail marked this pull request as ready for review October 16, 2021 15:31
@RealYusufIsmail RealYusufIsmail changed the title Feature/kick and ban commands Added Kick and Ban command Oct 16, 2021
@Zabuzard Zabuzard changed the title Added Kick and Ban command Migrate kick and ban command Oct 16, 2021
@illuminator3

illuminator3 commented Oct 16, 2021 •

Copy link
Copy Markdown
Contributor

Hi, thanks for contributing to our project!

Before committing, you always have to make sure to apply our code styling using gradle spotlessApply.

@Zabuzard Zabuzard added the new command Add a new command or group of commands to the bot label Oct 16, 2021
@Zabuzard Zabuzard added this to the Improvement phase 1 milestone Oct 16, 2021

@Zabuzard Zabuzard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good first attempt but needs ~3 more iterations to be polished enough. Keep it up 👍

@Zabuzard Zabuzard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am telling you again to run your actual code before you push anything. Try it out locally on your private server (see the tutorials).

Your code, as it is right now, does not work and has weird UX.

Also, please do not just resolve conversations that are not resolved yet. And pay attention to push your changes before you mark anything resolved.

RealYusufIsmail and others added 9 commits October 30, 2021 13:08
…ration/UnbanCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/UnbanCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/KickCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/UnbanCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/KickCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/BanCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/BanCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…ration/KickCommand.java

Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
@RealYusufIsmail

Copy link
Copy Markdown
Contributor Author

@Zabuzard Is there anything else i need to change?

Comment on lines +17 to +25
/**
* @param reason The Boolean reasonLimit will check if the reason is above the provided limit.
* <br>
* If it is it will throw an error and will tell the user that the reason can not be over
* the {@link ModerationUtils#REASON_MAX_LENGTH} <br>
* If the reason is under the limit it will pass and will allow the command to continue.
*
* @return {@link ModerationUtils#REASON_MAX_LENGTH}
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Missing description.
  • Still bad javadoc in general.
  • Incorrect return description

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only addressed the first bullet point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean

@RealYusufIsmail

Copy link
Copy Markdown
Contributor Author

For Moderation utils for the reason check should I add a IllegalArgumentException @Zabuzard

All the checks pass and i have improved the javaDoc.

Yusuf
Comment on lines +9 to +10
* This contains if statements that are common in all the moderation commands suck se the if
* statement for the reason length

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad javadoc, english issues, reads super weird and is not on point. Rephrase:

Utility class offering helpers revolving around user moderation, such as banning or kicking.

Comment on lines +17 to +25
/**
* @param reason The Boolean reasonLimit will check if the reason is above the provided limit.
* <br>
* If it is it will throw an error and will tell the user that the reason can not be over
* the {@link ModerationUtils#REASON_MAX_LENGTH} <br>
* If the reason is under the limit it will pass and will allow the command to continue.
*
* @return {@link ModerationUtils#REASON_MAX_LENGTH}
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only addressed the first bullet point.

private static final Logger logger = LoggerFactory.getLogger(BanCommand.class);

/**
* Constructs an instance

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dot.

I still have to improve the javadoc in the
 ModerationUtils class
@Zabuzard Zabuzard mentioned this pull request Nov 3, 2021
22 tasks done
@Zabuzard

Zabuzard commented Nov 3, 2021

Copy link
Copy Markdown
Member

Closing in favor of #244 .

@Zabuzard Zabuzard closed this Nov 3, 2021
@RealYusufIsmail
RealYusufIsmail deleted the feature/kick_and_ban_commands branch November 3, 2021 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new command Add a new command or group of commands to the bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants