-
-
Notifications
You must be signed in to change notification settings - Fork 475
feat: add ThreadAutoArchiveDuration enum #2826
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
base: master
Are you sure you want to change the base?
feat: add ThreadAutoArchiveDuration enum #2826
Conversation
Add an enumeration ThreadAutoArchiveDuration to get time before the thread was archived. The selected enumeration value is automatically retrieved. You can always set the archiving time as a number without using this enumeration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see the benefit of this.
It just brings more understanding to the code. Yes, the modification isn't necessarily important, but it avoids having numbers that can be boring to read, and gives a better understanding of the time provided. You can even use enumeration to enable interactive modification with a bot without having to put in the four possibilities and just use enumeration. |
I have apply changes ! :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please add the enum to the docs in https://github.com/Pycord-Development/pycord/blob/master/docs/api/enums.rst
Look at the other enums in the file and reproduce how they are declared.
I find this not very necessary. See the documentation and the type pycord/discord/types/threads.py Line 36 in 1c65fc8
|
I find that just the figures as shown remain rather unclear about the actual time given. The addition I'm proposing doesn't add anything vital, but I think it makes the code easier to understand, without being compulsory. |
Same to be fair, but as long as it's just an Enum class I feel like the changes are acceptable, unlike the original proposition which added too much verbosity. Although this is not strictly necessary. |
Co-authored-by: Paillat <[email protected]> Signed-off-by: BOXER <[email protected]>
Co-authored-by: Paillat <[email protected]> Signed-off-by: BOXER <[email protected]>
👍 I have make changes ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As fare as code quality goes, lgtm.
From a usefulness perspective, I don't think this is strictly necessary but I feel like it's a plus to have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we have merge conflicts
Most imports are automatically modified by bots that reformat the code once the pull request is made |
then disregard. But please fix the merge conflicts |
Co-authored-by: plun1331 <[email protected]> Signed-off-by: Lala Sabathil <[email protected]>
Co-authored-by: plun1331 <[email protected]> Signed-off-by: Lala Sabathil <[email protected]>
Signed-off-by: Lala Sabathil <[email protected]>
Add an enumeration ThreadAutoArchiveDuration to get time before the thread was archived.
The selected enumeration value is automatically retrieved. You can always set the archiving time as a number without using this enumeration.
Summary
This pull request doesn't make any corrections to the code, but adds an enumeration to help find the available thread archive times.
It's not necessarily necessary, but it makes the code easier to read and understand.
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.