aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/__init__.py (follow)
Commit message (Collapse)AuthorAgeLines
* Format code with new ruff rulesGravatar Chris Lovering2023-11-06-1/+1
|
* Fix and simplify 'disambiguate' utilityGravatar wookie1842023-07-08-36/+15
|
* Apply fixes for ruff lintingGravatar Chris Lovering2023-05-09-11/+8
| | | | | Co-authored-by: wookie184 <[email protected]> Co-authored-by: Amrou Bellalouna <[email protected]>
* Fix type annotationsGravatar decorator-factory2021-08-31-2/+3
|
* chore: Reformat bot/utils/__init__.pyGravatar ToxicKidz2021-05-15-6/+10
|
* chore: Refactor more code to follow our style guideGravatar ToxicKidz2021-05-14-3/+8
|
* fix: Use str.isdecimal instead of str.isdigitGravatar ToxicKidz2021-05-09-2/+2
|
* chore: Prefer double quotes over single quotesGravatar ToxicKidz2021-05-04-7/+7
|
* Deseasonify: implement __str__ for Month enumGravatar kwzrd2020-04-01-1/+6
| | | | | | | | This way, we can standardize the way Months are shown to both the user and the developer. Note that if passing a Month member to an f-string, the `!s` format code must be specified to ensure our __str__ is used. Co-authored-by: MarkKoz <[email protected]>
* Deseasonify: move current month resolver to utilsGravatar kwzrd2020-03-30-0/+15
| | | | | The function is useful to other modules as well - not only decorators. This declares it as public and moves it to a more accessible place.
* Deseasonify: move pagination module under utilsGravatar kwzrd2020-03-26-1/+1
|
* Add context manager to safely unlock role mentionabilityGravatar Sebastiaan Zeeff2019-12-04-0/+23
| | | | | | | | | | | | | | | | | | | | Currently, our regualar roles are not mentionable by default. This means that features that rely on roles to keep track of users that want to receive announcements, like the AoC Day Countdown, don't actually ping the users subscribed to it. The solution is obviously that the bot should unlock prior to making the announcement. However, this is complicated by the fact that there needs to be a sufficient delay. both between unlocking and sending the message and between sending the message and locking the role again. If not, Discord's not done synchronizing across all servers and some users won't receive a ping. To make this easier, I have implemented a context manager that takes an instance of `discord.Role` and an optional `delay` (default: 5s) that yields a context in which the role is unlocked. This context manager also makes sure that the role is locked even if an exception occured within the unlocked context.
* Fix incorrect merge conflict resolutions, lint remaining itemsGravatar S. Co12019-09-11-1/+1
|
* Lint remaining filesGravatar S. Co12019-09-09-2/+2
| | | hacktoberstats cog handled in separate PR
* Merge pull request #260 from kosayoda/text-modifyGravatar Mark2019-09-03-0/+56
|\ | | | | Modify text :-)
| * Add utils function to replace multiple words in a given stringGravatar kosayoda2019-08-18-0/+56
| |
* | Replace paramater and return value docstring documentation with an extended ↵Gravatar kosayoda2019-08-19-11/+5
|/ | | | summary
* Formating and linter fixesGravatar Christopher Goes2019-03-05-2/+1
|
* Initial move of Snakes cog from the bot to seasonalbotGravatar Chris Goes2019-03-04-0/+80
|
* Solved merge conflictsGravatar Leon Sandøy2018-11-20-0/+0