fix: check category before moving to appeal category #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With PR #31, modmail threads are automatically moved to the ban appeal category if a user with an open thread gets banned and then joins the ban appeal server. The bot will also send an embed stating ""Moving thread to 📩|Modmail Appeals category since recipient has joined the appeals server.""
However, currently, if a user who is actively appealing leaves and rejoins the ban appeal server, the bot will send an embed stating "Moving thread to 📩|Modmail Appeals category since recipient has joined the appeals server."- even if the user's modmail thread is already in the appeals category.
This PR will ensure that the bot will not attempt to move the thread to ban appeal category if it's already in the ban appeal category and also ensure that the correct message of "The recipient has joined the Appeals server" is sent.
I've tested the changes using the staff Bot Test Server as the main guild and my private test server as the appeals guild

Instructions for local testing:
I've never had any success trying to load local plugins, so I always load plugins from GitHub.
Fork our plugin repo, switch to the
rejoin-appeal-category
branch, and update the guild ID in this line to your test appeal server's guild ID (this can be any server where both your bot and the account you're banning have access).Clone the ModMail repo:
.env
file:(you can replace the category ID with the name of your appeal category if you're using a private test server as the main server)