aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | Founders Talentpool permissions (#3308)Gravatar Joe Banks2025-04-06-10/+11
| | | | | | | | | | * Add founders role to constants.py * Add Founders to some talentpool commands
* | Remove unused `ValidDiscordServerInvite` converter (#3307)Gravatar decorator-factory2025-04-06-39/+0
| |
* | Merge pull request #3306 from python-discord/remove-ping-on-auto-banGravatar Boris Muratov2025-03-31-1/+4
|\ \ | | | | | | Remove pings when auto-banning in filters
| * | Remove pings when auto-banning in filtersGravatar Chris Lovering2025-03-30-1/+4
|/ / | | | | | | Mods no longer want to be pinged when a fitler results in an auto ban, but we still want the message to be sent to mod-alerts.
* | Bump getsentry/action-release from 1 to 3 (#3305)Gravatar dependabot[bot]2025-03-29-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [getsentry/action-release](https://github.com/getsentry/action-release) from 1 to 3. - [Release notes](https://github.com/getsentry/action-release/releases) - [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/action-release/compare/v1...v3) --- updated-dependencies: - dependency-name: getsentry/action-release dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | Zen slicing (#3297)Gravatar ChrisJL2025-03-29-13/+116
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added the possibility of slicing for the zen command * Fixed off-by-one error, as the end index can be equal to the length of the zen * Added support for negative signs and replaced re.search by re.match * Allows for end_index == len(zen_lines). Previously, in that case, end_index % zen_lines would be 0, even though it's the last line * Allows for slicing without a specified end index (e.g. "1:" will return all lines from the second to the last) * Update end index display when slicing in the zen command Co-authored-by: Vivek Ashokkumar <[email protected]> * Added tests for the zen command --------- Co-authored-by: Vivek Ashokkumar <[email protected]> Co-authored-by: ChrisJL <[email protected]>
| * \ Merge branch 'main' into zen_slicingGravatar ChrisJL2025-03-29-9/+157
| |\ \ | |/ / |/| |
* | | Merge pull request #2973 from python-discord/feat/reminder-add-notifyGravatar ChrisJL2025-03-29-6/+153
|\ \ \ | | | | | | | | Button for others to opt-in to be notified for reminders
| * \ \ Merge branch 'main' into feat/reminder-add-notifyGravatar ChrisJL2025-03-29-3/+4
| |\ \ \ | |/ / / |/| | |
* | | | Correct dependabot configGravatar Chris Lovering2025-03-29-3/+4
| |_|/ |/| |
| * | Merge branch 'main' into feat/reminder-add-notifyGravatar ChrisJL2025-03-29-2430/+4027
| |\ \ | |/ / |/| |
| * | Reminders: Simplify helper function to get button embedGravatar hedy2024-03-27-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | This removes the need of any form of error handling from `embeds` list indexing, and makes the code more concise and readable. The drawback is that a whole new embed object have to be allocated each time, rather than editing the description like before.
| * | Reminders: Refactor all opt-in button related logic into View classGravatar hedy2024-03-26-41/+37
| | | | | | | | | | | | | | | - More resilient handling of API errors. - Don't rely on string manipulation to disable the button.
| * | Reminders: More robust implementation of mention opt-in buttonGravatar hedy2024-03-25-89/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves most, if not all issues from the previous commit. - A timeout of 5 minutes is enforced - this means the button can no longer be used either when the reminder arrives or 5 minutes passes since creation, whichever comes first. - Reminder edits in between creation and button clicks will be handled responsibly - This includes both edits of duration, mentions, and deleting reminders altogether. - UX is improved. This list of to-be-mentioned users is sent up-front with the author included. Instructions to click the button comes right after the list. - No updates to the API or site schema required, as the button message will disable itself when it encounters any sort of errors. - Implementation is also somewhat simplified. There are probably more improvements, maybe one caveat, but it's like almost midnight and I want to sleep :/ I sure hope the list above covers most of it. Further testing will be done. Now `.remind 10s test` is ingrained in my muscle memory...
| * | Reminders: Add a button for others to opt-in to a pingGravatar hedy2024-03-24-7/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial implementation - it's currently _far_ from perfect and is very susceptible to errors. Notable features beyond the basic requirements: - Fails safely when max mentions reached (we're limited by the 2000-character limit when sending the reminder with the pings), and disables the button. - Adds an additional embed to the initial confirmation message to show who clicked on the notify button. - Edits the additional embed and disables the button when the reminder is sent. In many ways, this implementation is quite bad: - Uses an async callback to delegate the task of PATCH-ing the API to edit mentions to the `new_reminders` method. - Edits to the opt-in list embed relies on the fact that the reminder is not edited (using !remind edit) before someone clicks on the button. A trivial way to fix this would be to add another field to the site schema to store the `notification_view` in some way. - The button is neither disabled nor any edits to the embed made when the reminder is deleted before someone clicks on the button. - String splitting is used which relies on the exact format of the embed message when editing the embed to disable the button. We have to reminder to update this piece of code when adjusting its format in the future. The UX can also be improved. Currently, I can't think of a way to concisely phrase the button embed message so that it is clear that the button is for people _other than_ the reminder author. Notes: - Max reminder mentions: - Mentions are pinged directly in a discord message when the reminder is sent. This means we're limited by the 2000-char limit. If we take each User ID snowflake to be 18-characters, and considering each mention to be formated as "<@ID> " (with extra space), it results in about 90 mentions max. I've set the constant to 80 just in case. - This is not an issue when the mentions are added in through other means than the button we're adding in this commit, because the user has to use @-mentions when sending the `!remind edit` command, which is already under the discord's character limit. - Log messages are added when something unexpected occurs within the code. Hopefully this is unlikely to happen after the implementation issues listed above are solved. - The opt-in list in the second embed is separate from mentions added in the original reminder creation, or any further edits, because mentions are added by the to-be-mentioned-user, rather than by the reminder author in this way. (Even though they are stored the same way.)
| | * Added tests for the zen commandGravatar LeandroVandari2025-03-24-0/+90
| | |
| | * Update end index display when slicing in the zen commandGravatar Leandro Vandari2025-03-20-1/+1
| | | | | | | | | Co-authored-by: Vivek Ashokkumar <[email protected]>
| | * Allows for slicing without a specified end index (e.g. "1:" will return all ↵Gravatar LeandroVandari2025-03-18-2/+2
| | | | | | | | | | | | lines from the second to the last)
| | * Allows for end_index == len(zen_lines). Previously, in that case, end_index ↵Gravatar LeandroVandari2025-03-18-1/+1
| | | | | | | | | | | | % zen_lines would be 0, even though it's the last line
| | * Added support for negative signs and replaced re.search by re.matchGravatar LeandroVandari2025-03-17-1/+1
| | |
| | * Fixed off-by-one error, as the end index can be equal to the length of the zenGravatar LeandroVandari2025-03-15-1/+1
| | |
| | * Added the possibility of slicing for the zen commandGravatar LeandroVandari2025-03-15-13/+26
| |/ |/|
* | Bump aiohttp from 3.11.12 to 3.11.13 (#3280)Gravatar dependabot[bot]2025-03-08-84/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.11.12 to 3.11.13. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.11.12...v3.11.13) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | Bump pydantic-settings from 2.8.0 to 2.8.1 (#3282)Gravatar dependabot[bot]2025-03-08-23/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.8.0 to 2.8.1. - [Release notes](https://github.com/pydantic/pydantic-settings/releases) - [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.8.0...v2.8.1) --- updated-dependencies: - dependency-name: pydantic-settings dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | Bump ruff from 0.9.7 to 0.9.9 (#3283)Gravatar dependabot[bot]2025-03-08-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.7 to 0.9.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.7...0.9.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | Drop bs4 back down to 4.12.3Gravatar Chris Lovering2025-02-26-10/+9
| | | | | | | | | | This upgrade is suspected to cause the error with the cogs cog we were seeing in #dev-log. E.G. https://discord.com/channels/267624335836053506/622895325144940554/1344409315556986991
* | Bump deps to latest (#3262)Gravatar ChrisJL2025-02-21-1036/+1102
| | | | | | | | | | | | | | | | | | | | | | * Bump deps to latest * Sort deps * Use new style group for dev deps * Add attrs to ignore list of pip-licenses * Bump bot-core up to 11.6.0
* | Configure dependabot to only open PRs for major version bumps (#3227)Gravatar ChrisJL2025-02-16-0/+4
| | | | | | Security updates will always open PRs
* | Merge pull request #3260 from ↵Gravatar ChrisJL2025-02-16-1/+114
|\ \ | | | | | | | | | | | | dd2480-spring-2025-group-1/kim/test-cases-for-bot-utils-helpers fix: `has_lines` returns empty str instead of bool
| * | test: add test cases for `bot/utils/helpers.py`Gravatar Strengthless2025-02-14-0/+113
| | |
| * | fix: `has_lines` returns empty str instead of boolGravatar Strengthless2025-02-14-1/+1
| | |
* | | Merge pull request #3259 from bast0006/bast0006-textless-remindmeGravatar ChrisJL2025-02-16-15/+6
|\ \ \ | | | | | | | | Permit !remindme with no specified content
| * | | Clean up extraneous logic and typing variance now that reminders always have ↵Gravatar bast2025-02-13-8/+3
| | | | | | | | | | | | | | | | content
| * | | Permit !remindme with no specified contentGravatar bast2025-02-13-7/+3
| |/ / | | | | | | | | | It's often desired to refer to the current discussion context without needing to explicitly write a placeholder
* / / Send purged msg log to #message-change-log too (#3255)Gravatar Vivek Ashokkumar2025-02-16-8/+9
|/ /
* | Merge pull request #3247 from python-discord/swfarnsworth/fix-auto-uploadGravatar Steele Farnsworth2025-02-12-35/+176
|\ \ | | | | | | Swfarnsworth/fix auto upload
| * \ Merge branch 'main' into swfarnsworth/fix-auto-uploadGravatar Steele Farnsworth2025-02-11-1/+1
| |\ \ | |/ / |/| |
* | | Ignore both archived and locked posts when archiving idleGravatar Chris Lovering2025-02-08-1/+1
| | | | | | | | | | | | | | | For some reason a thread with .closed=True was getting past this if statement. See https://python-discord.sentry.io/issues/6281905188 and the value for post in the stack frame
| * | Use `"charset" in Attachment.content_type` to determine that it's text-based.Gravatar Steele Farnsworth2025-02-08-1/+1
| | | | | | | | | | | | Previously, `on_message` used `Attachment.content_type.startswith("text")` for this, but this is false for some text-based files (like json).
| * | `and` -> `or`Gravatar Steele Farnsworth2025-02-08-1/+1
| | |
| * | Change indentation of lines in docstring.Gravatar Steele Farnsworth2025-02-08-2/+2
| | |
| * | Merge branch 'main' into swfarnsworth/fix-auto-uploadGravatar Steele Farnsworth2025-02-08-8/+6
| |\ \ | |/ / |/| |
* | | Merge pull request #3254 from python-discord/fix-help-cogGravatar Steele Farnsworth2025-02-08-8/+6
|\ \ \ | | | | | | | | Help cog improvements
| * | | Only pass post_id to the scheulded task, to be clear on intentionsGravatar Chris Lovering2025-02-07-5/+5
| | | |
| * | | Fetch latest help post further up the call stack when looking to archiveGravatar Chris Lovering2025-02-07-4/+2
|/ / / | | | | | | | | | This ensures that the logic prior to closing also has the updated thread info
| * | Rename class and some constants.Gravatar Steele Farnsworth2025-01-30-10/+8
| | |
| * | Add newline before if statement.Gravatar Steele Farnsworth2025-01-30-0/+1
| | |
| * | Make parenthetical await expressions their own statements.Gravatar Steele Farnsworth2025-01-30-2/+4
| | |
| * | Move functionality for awaiting emoji reactions to its own function.Gravatar Steele Farnsworth2025-01-30-28/+41
| | |
| * | Remove tests for deleted behavior.Gravatar Steele Farnsworth2025-01-30-37/+0
| | | | | | | | | | | | Previously, (txt, csv, json, and py) files evoked special behavior from the filtering system. This is no longer the case.