Skip to content
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

Modify behaviour of .unsolved to prevent thread archiving in help forum #73

Open
josh-kynaston opened this issue Aug 10, 2024 · 0 comments
Labels
enhancement New feature or request spec needed Requires clarification on the specifications

Comments

@josh-kynaston
Copy link
Contributor

Currently, there is no way to prevent thread from being archived within the help forum once the .solved command has been invoked. After invocation, there is a 300 second delay before archiving, which was left to allow time for the .unsolved command to be used, if required. This was never implemented.

bot/plugins/clopen.py

Lines 729 to 738 in 9c91e60

async def unsolved(conf: GuildConfig, post: Thread, reason: str) -> None:
if not any(tag.id == conf.solved_tag_id for tag in post.applied_tags):
return
await set_solved_tags(conf, post, [conf.unsolved_tag_id], reason)
await post.send(embed=unsolved_embed(reason), allowed_mentions=AllowedMentions.none())
async def wait_close_post(post: Thread, reason: str) -> None:
await asyncio.sleep(300) # TODO: what if the post is reopened in the meantime?
await post.edit(archived=True, reason=reason)

@josh-kynaston josh-kynaston added enhancement New feature or request spec needed Requires clarification on the specifications labels Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spec needed Requires clarification on the specifications
Projects
None yet
Development

No branches or pull requests

1 participant