Skip to content

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

@rattus-rattus-rattus

Description

@rattus-rattus-rattus

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestspec neededRequires clarification on the specifications

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions