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

[Respects] Refactor payRespects() using humanize_list() #489

Closed
quachtridat opened this issue Sep 22, 2021 · 0 comments · Fixed by #490
Closed

[Respects] Refactor payRespects() using humanize_list() #489

quachtridat opened this issue Sep 22, 2021 · 0 comments · Fixed by #490
Assignees
Labels
refactor Umbrella label for refactoring efforts

Comments

@quachtridat
Copy link
Member

Cog

Respects.

Refactor

cogs/respects/Respects.py:300-324 forms a respect message by counting the number of members who have paid respects, and formats the resulting message for cases when there is only one member, when there are two members, and when there are three people or more.

However, the manual work done by these lines can also be done in a cleaner way by making calls to redbot.core.utils.chat_formatting.humanize_list(). Also, this may as well help make the code look cleaner to work with #482 because it's likely that issue will also involve modifications towards the same section of the code.

@quachtridat quachtridat added the refactor Umbrella label for refactoring efforts label Sep 22, 2021
@quachtridat quachtridat self-assigned this Sep 22, 2021
@quachtridat quachtridat changed the title [Respects] Refactor payRespects() using humanize_timedelta() [Respects] Refactor payRespects() using humanize_list() Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Umbrella label for refactoring efforts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant