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

customcommands: thread editing functions #1665

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

SoggySaussages
Copy link
Contributor

@SoggySaussages SoggySaussages commented Jun 12, 2024

Continue forum and thread support for custom commands. This PR focusses on editing existing threads, closing, locking, opening again, slow mode, auto-archive, invitability, and forum pinning and editing tags.

New functions

Function Description
closeThread thread (flag) Closes the specified thread, or the current thread if set to nil. flag part is a bool and if set as true (false is optional) locks the thread as well as closing it.
editThread thread (values) Edits the specified thread, or the current thread if set to nil. values must be key-value pairs of which parameters to edit. Available values:slowmode - provide length in seconds of slowmode; auto_archive_duration - provide duration in hours, must be either 60, 1440, 4320, or 10080; invitable - boolean, set to true to allow non-moderators to add members to the thread (only available for private threads) tags - either name of one tag, or slice of tag names. Overwrites the current tags (only available for forum posts).
openThread thread Opens and unlocks the specified thread, or the current thread if set to nil.
pinForumPost thread Pins the specified thread, or the current thread if set to nil in the parent forum channel.
unpinForumPost thread Unpins the specified thread, or the current thread if set to nil from the parent forum channel.

I recommend reviewing first commit for simplest diff, second commit exclusively re-orders and third commit is minor bug fix.

@SoggySaussages SoggySaussages changed the base branch from master to dev June 12, 2024 10:12
@ashishjh-bst ashishjh-bst merged commit 6b7cc8f into botlabs-gg:dev Jun 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants