aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-21Moderation: remove multiple active infractions checkGravatar MarkKoz-36/+0
The API was change a long time ago to not allow such a situation.
2020-07-21Superstarify: escape Markdown in nicknamesGravatar MarkKoz-1/+4
2020-07-21Superstarify: use user mentions in mod logsGravatar MarkKoz-3/+4
`format_user` isn't used in the apply mod log cause it already shows both the old and new nicknames elsewhere.
2020-07-21Add util function to format user namesGravatar MarkKoz-0/+7
This will be used a lot when sending mod logs and will help with reducing redundancy and maintaining consistency.
2020-07-21Clean up importsGravatar MarkKoz-14/+13
2020-07-21Use max_units for time since join in user command instead of precisionGravatar Joe Banks-1/+1
2020-07-20Edited tests to reflect changes (removed py formatting)Gravatar wookie184-3/+3
2020-07-20Removed python formatting from returned codeblockGravatar wookie184-1/+1
2020-07-19Revert "Remove duplicate reminder deletion."Gravatar kosayoda-1/+1
This reverts commit 776b4379c478284803a4a526b5f14fe63d8e7c01. This is already being fixed in #835, and therefore is no longer required.
2020-07-19Remove duplicate mentions from reminder argumentsGravatar kosayoda-2/+10
This also accounts for the author passing themselves to mention, and therefore avoids the user from being told they're not allowed to mention themselves even though they could.
2020-07-19Refactor commands return typeGravatar kosayoda-5/+8
2020-07-19Move mentions validation to another methodGravatar kosayoda-13/+20
2020-07-19Refactor reminder edits to reduce code duplicationGravatar kosayoda-40/+25
The reminder expiration returnedfrom the API call is also now parsed again even when the edit is to the duration since it does not matter and trying to keep it DRY while still doing that check is a pain.
2020-07-19Rename method to improve readabilityGravatar kosayoda-3/+3
2020-07-19Fix incorrect typehint and shorten method nameGravatar kosayoda-3/+3
2020-07-19Extract `send_denial` to a utility functionGravatar kosayoda-17/+20
2020-07-19Namespace Member and Role to avoid extra importsGravatar kosayoda-3/+2
2020-07-19Add whitespace to improve readabilityGravatar Kieran Siek-0/+1
Co-authored-by: Mark <[email protected]>
2020-07-16Incidents: reduce log level of 403 exceptionGravatar kwzrd-2/+3
In addition to 404, this shouldn't send Sentry notifs. Co-authored-by: MarkKoz <[email protected]>
2020-07-16Bugfix: Show ID for embed DM relays, too.Gravatar Leon Sandøy-1/+1
2020-07-16Incidents: reduce log level of 404 exceptionGravatar kwzrd-2/+14
Co-authored-by: MarkKoz <[email protected]>
2020-07-16Prevent deleting messages above the desired message.Gravatar Senjan21-6/+7
2020-07-16Allow editing additional mentions for reminders.Gravatar kosayoda-0/+28
2020-07-16List additional mentions in `!reminder list`.Gravatar kosayoda-3/+9
2020-07-16Send additional mentions in reminders.Gravatar kosayoda-1/+5
2020-07-16Allow mentioning other users and roles in reminders.Gravatar kosayoda-6/+26
2020-07-16Add generator that converts IDs to Role or Member objects.Gravatar kosayoda-0/+7
2020-07-16Add method to check if user is allowed to mention in reminders.Gravatar kosayoda-1/+21
2020-07-16Extract sending error embed to a separate method.Gravatar kosayoda-13/+12
2020-07-16Remove duplicate reminder deletion.Gravatar kosayoda-1/+1
The function `_delete_reminder` was called twice, once in `schedule_reminder`, which calls `send_reminder`, then another in `send_reminder` itself. This led to a 404 response from the site api, as the reminder was already deleted the first time. Fixes BOT-6W
2020-07-15Fix docstring and commentsGravatar Senjan21-13/+7
2020-07-15Added command&system to purge all messages up to given messageGravatar Senjan21-1/+39
2020-07-15Oops, these prints shouldn't be here.Gravatar Leon Sandøy-3/+0
https://github.com/python-discord/bot/issues/1041
2020-07-15How did that except except block get in?Gravatar Leon Sandøy-3/+0
Weird. https://github.com/python-discord/bot/issues/1041
2020-07-15Create a UserMentionOrID converter.Gravatar Leon Sandøy-1/+24
When we're using the !reply command, using a regular UserConverter is somewhat problematic. For example, if I wanted to send the message "lemon loves you", then I'd try to write `!reply lemon loves you` - however, the optional User converter would then try to convert `lemon` into a User, which it would successfully do since there's like 60 lemons on our server. As a result, the message "loves you" would be sent to a user called lemon.. god knows which one. To solve this bit of ambiguity, I introduce a new converter which only converts user mentions or user IDs into User, not strings that may be intended as part of the message you are sending. https://github.com/python-discord/bot/issues/1041
2020-07-15Ves' refactorGravatar Leon Sandøy-15/+16
Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-07-15Add some stats for DMs sent and received.Gravatar Leon Sandøy-0/+3
https://github.com/python-discord/bot/issues/1041
2020-07-15Add the user ID to the username in dm relays.Gravatar Leon Sandøy-1/+1
Without this, it is difficult to know precisely who the user that is DMing us is, which might be useful to us. https://github.com/python-discord/bot/issues/1041
2020-07-15Restore DM user caching.Gravatar Leon Sandøy-6/+22
This reverts commit 042f472a
2020-07-15Pass processed string to `extractBests`Gravatar kosayoda-2/+2
Fixes a regression where the string to be matched was not processed beforehand.
2020-07-15Document new kwarg in docstringGravatar kosayoda-0/+2
2020-07-14HelpChannels: remove cooldown info from available messageGravatar MarkKoz-3/+0
Users can no longer see available channels if they're on cooldown. They will instead see a special "cooldown" channel which will explain what's going on.
2020-07-14Suppress NotFound when removing help cmd reactionsGravatar MarkKoz-7/+6
The message may be deleted somehow before the wait_for times out. Fixes #1050 Fixes BOT-6X
2020-07-15Remove caching of last_dm_user.Gravatar Leon Sandøy-25/+20
If you're typing up a reply and the bot gets another DM while you're typing, you might accidentally send your reply to the wrong person. This could happen even if you're very attentive, because it might be a matter of milliseconds. The complexity to prevent this isn't worth the convenience of the feature, and it's nice to get rid of the caching as well, so I've decided to just make .reply require a user for every reply. https://github.com/python-discord/bot/issues/1041
2020-07-14Update bot/resources/tags/or-gotcha.mdGravatar ItsCinnabar-1/+1
Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-07-14Incidents: link `proxy_url` if attachment fails to downloadGravatar kwzrd-50/+59
Suggested by Mark during review. If the download fails, we fallback on showing an informative message, which will link the attachment cdn link. The attachment-handling logic was moved from the `archive` coroutine into `make_embed`, which now also returns the file, if available. In the end, this appears to be the smoothest approach. Co-authored-by: MarkKoz <[email protected]>
2020-07-14Update or-gotcha.mdGravatar ItsCinnabar-1/+0
2020-07-14Update or-gotcha.mdGravatar ItsCinnabar-1/+1
2020-07-14Update or-gotcha.mdGravatar ItsCinnabar-1/+2
Adjust description and include link to docs
2020-07-14Remove redundant kwarg in !kick and !shadow_kickGravatar kosayoda-2/+2
The kwarg `active=False` is already being passed in `apply_kick`, therefore passing it in the parent callers result in a TypeError. Fixes #976 Fixes BOT-5P