-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Feat: Add slash command to generate application form for various community roles #1049
base: develop
Are you sure you want to change the base?
Feat: Add slash command to generate application form for various community roles #1049
Conversation
Can i be assigned to this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branch update is required, it is using removed APIs
5c0ef6e
to
3159bed
Compare
Marked PR as draft since there needs to be some rework on certain things which will be specified in the TODO. |
cb7815a
to
042a0e0
Compare
@christolis what happens to the generated form after x user applies through form? Does the form need to be re-created? Or is it only unavailable for x user to a certain time period? Also how do we update the form if need be? |
1a8e458
to
29c8ee6
Compare
The generated form is persistent and used by everybody. It does not need to be recreated by whoever has the |
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR and the thought put into the development of the feature is evident.
Please can you look into the comments, additionally, there are some duplicate checks happening e.g. multiple guild == null
checks. This can be done once much earlier and then you don't have to worry about it.
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
41c3edd
to
5542289
Compare
5542289
to
0b18118
Compare
Co-authored-by: Suraj Kumar <[email protected]>
0b18118
to
a8178b9
Compare
This removes the permission check for the bot to have the `MANAGE_ROLES` permission in order to execute the command.
.../src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/config/RoleApplicationSystemConfig.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
.../src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationCreateCommand.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your effort <3
Closes #1024.
Screenshots
Configuration changes
applicationForm.applicationChannelPattern
applications end up.
"applications-log"
TODO
HashMap<Member, OffsetDateTime>
where the key is theMember
who sent an application and the value is the date and time that they sent it. There should be a condition every time aMember
attempts to send any application which utilizes the aforementionedHashMap
to prevent spam.Switch to(EDIT: Impossible since this would forcibly include all existing roles)EntitySelectInteractionEvent
for the dropdown menu.