-
-
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
Add transfer question feature #885
Conversation
ankitsmt211
commented
Sep 17, 2023
- add command in message context
- can be used to transfer questions
- resolves Transfer question Context Command #868
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.
cal u explain what this transfer feature is all about?
private static final String TRANSFER_QUESTION_TITLE_ID = "transferID"; | ||
private static final String TRANSFER_QUESTION_INPUT_ID = "tranferQuestion"; | ||
private static final String TRANSFER_QUESTION_TAG = "tags"; | ||
private static final String QUESTIONS_CHANNEL_ID = "1051826284008853505"; |
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.
don't hard code this and use longs for channel id
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.
Any suggestions? Get channel by name maybe?
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.
yes, get channel name from config
Any one with role higher or equal to Community Ambassador, can transfer questions from any non-question channel, it will create a modal and prefill all the values. Once submitted, the question will be posted in question forums, original message will be deleted. A dm will be sent to user as a soft warning. |
Thanks for the work done ❤️ |
please share screenshots of every part of the flow. otherwise its very hard to review the UX part of things |
|
If anyone could review if log messages are detailed enough, thanks. Also, i missed something in here "mentioning" author of question in newly created post. I'll add that as well. |
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
TextInput transferQuestionTag = TextInput | ||
.create(TRANSFER_QUESTION_TAG, "Transfer question tags", TextInputStyle.SHORT) | ||
.setValue("Java") | ||
.build(); |
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.
use selection menu, get the list from config
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.
@Taz03 modals only support text input according to JDA doc
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.
so theres no better way to do that?
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.
Theres this StringSelectMenu maybe we can send it before or after the main modal
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.
im not sure if u can make this an ephemeral dialog though. perhaps sth to explore, but i would also be okay if we have that in a second iteration of the feature instead, cause it sounds complex
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java
Outdated
Show resolved
Hide resolved
event.getJDA() | ||
.getForumChannelById(QUESTIONS_CHANNEL_ID) | ||
.createForumPost(forumTitle, forumMessage) | ||
.setTags(ForumTagSnowflake.fromId(javaTag.getId())) |
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.
y always javaTag
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.
Earlier suggestion was to include a selection menu but didn't seam feasible, used java as it's default and most used tag. Plus this is just a feature to be used as "last resort" clean up tool not to be used primarily.We also wanna make it quicker for moderator to be able to use this quickly without much hassle that's why most values are also prefilled. If any post do not belong to certain category, any helper can see that and change category.
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.
hmm, but this won't work anyways coz u can't just hard code the java tag, it is a config thing. The best option I can think of is having a selection menu
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.
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.
this one is still not implemented, ill do this one hopefully soon.
@Taz03 you mentioned something about getting channel from config, are you suggesting "regex pattern" for helper forum? Maybe get a list of all channels and match with that to get the target channel? |
Not a fan of "three" back to back mentions are being triggered here for OP
|
yes |
I agree, let's get rid of the mention in source channel. That way we don't annoy and confuse the newcomer with mentions all over the place. They only get mentioned where we want them to go, to a correct help thread. Additionally, we keep the source channel clean, and don't interrupt ongoing discussions. Seems like a cleaner and more streamlined approach. |