Conversation
The command will close the thread (if on a text channel), and archive the post (if on a forum channel). When in a forum channel, the command will look for a tag from that specific forum called 'done' (each tag will have different IDs depending on the forum) and apply to the post if found. The bot will send a message notifying who closed it.
cmaureir
commented
Feb 6, 2025
Collaborator
Author
close_command.mp4 |
egeakman
approved these changes
Feb 7, 2025
Member
egeakman
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
artcz
requested changes
Feb 7, 2025
Contributor
artcz
left a comment
There was a problem hiding this comment.
Hey! thanks for the code. Let's also add some test here: https://github.com/EuroPython/internal-bot/blob/main/intbot/tests/test_bot/test_main.py :)
Collaborator
Author
|
@artcz I "tried" to add a test case, but I'm not certain if I'm doing right :/ it will most probably fail, but let's see |
Collaborator
Author
|
so should I hardcode the types instead of creating a real Thread/Message/Forum ? |
Collaborator
Author
|
Now it works! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The command will close the thread (if on a text channel), and archive the post (if on a forum channel).
When in a forum channel, the command will look for a tag from that specific forum called 'done' (each tag will have different IDs depending on the forum) and apply to the post if found.
The bot will send a message notifying who closed it.