Conversation
Upon the deletion of a message within a help post, a system notification will be displayed, providing guidance on the proper procedure for deleting the post.
There was a problem hiding this comment.
better to create a new listener here, this one seems to handle creation stuff
There was a problem hiding this comment.
yeah, this is definitely the wrong class to handle this
There was a problem hiding this comment.
yeah, this is definitely the wrong class to handle this
| .sendMessage( | ||
| """ | ||
| It looks like a message was deleted in this help post.\s | ||
| To properly close this post, please __right-click__ on the **Created Post** __followed by__ **Delete Post**\s | ||
| instead of deleting messages. This ensures proper record-keeping and\s | ||
| helps other users find solutions.""") |
There was a problem hiding this comment.
people in our server cant delete threads. u need to educate them about using /help-thread close and not in a text-way but as slash command. do a text search of mentionSlashCommand, ull find a helper for it.
| failure -> LOGGER.error( | ||
| "Could not retrieve thread owner for thread ID {}: {}", | ||
| threadChannel.getId(), failure.getMessage(), failure)); |
There was a problem hiding this comment.
failure.getMessage() is unecessary, ur already attaching the exception itself at the end which contains all info :)
|
|
||
| @Override | ||
| public void onMessageDelete(MessageDeleteEvent event) { | ||
| // Check if the deleted message was from a thread |
There was a problem hiding this comment.
i think u misunderstood the task. its not about deleting any message in a help thread. its about deleting the original (first) message only. and ideally also only if it was deleted by OP. otherwise it also triggers when someone else deletes it (for example a mod).
There was a problem hiding this comment.
I am not familiar with the role system in the server.
Normal user's can also created posts or is it for OP's and above?
There was a problem hiding this comment.
any user can create a question thread and any user can send messages in the thread.
the github-issue is about OP deleting the first message in the thread, not "any".
There was a problem hiding this comment.
Normal user's can also created posts or is it for OP's and above?
Btw for clarification: OP stands for "Original Poster", so it means the person creating the question in our case
| threadChannel.getGuild() | ||
| .retrieveMemberById(ownerId) | ||
| .queue(member -> threadChannel | ||
| .sendMessage( |
There was a problem hiding this comment.
id prefer sending a DM instead of a public message. public message only as fallback if DMs are closed. see /transfer which has a similar flow
There was a problem hiding this comment.
I think that the hint should be in the thread directly, because thats also the context of their actions. Just like how the notification for automatic closing works.
There was a problem hiding this comment.
fair. we can keep it then, i guess.
Upon the deletion of a message within a help post, a system notification will be displayed, providing guidance on the proper procedure for deleting the post.