aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-30Use non-capturing group instead.Gravatar Senjan21-1/+1
2020-07-30Change regex so it catches new discord URLGravatar Senjan21-1/+1
2020-07-30Fix channel moving incase `message.pin` failsGravatar Senjan21-0/+2
2020-07-29Don't ping everyone when tripping filter in DMs.Gravatar Leon Sandøy-1/+1
We don't need a ping in #mod-alerts whenever someone is tripping a filter (like invites or bad language) in a DM to the bot. We can still send an embed, so that we can action it, but there is no urgent need to respond if it's just a direct message to the bot. This is particularly true now that we have #dm-log.
2020-07-28Handle message unpinning betterGravatar ks129-2/+5
2020-07-28correct import orderGravatar Senjan21-1/+1
2020-07-28fix poll command by using clean_content converterGravatar Senjan21-2/+2
2020-07-28Allow specifying a channel to send !embed embedsGravatar kosayoda-3/+7
2020-07-27Update IDs of Code Jam rolesGravatar Sebastiaan Zeeff-2/+2
I've updated the IDs of the two Code Jam Roles to the newly create roles we have.
2020-07-24Fix: Implicit string concatenation considered harmfulGravatar kosayoda-4/+1
Python joins two string adjacent string literals implicitly, which may cause unintended side effects when used with certain string methods. >>> 'A' ' '.join(['1', '2', '3']) '1A 2A 3'
2020-07-23Disabled burst_shared filter temporarilyGravatar Joe Banks-4/+0
2020-07-22Charinfo: correct char limit used in error messageGravatar Mark-1/+1
Co-authored-by: Kieran Siek <[email protected]>
2020-07-23Check that embed desc is not Empty before stripping.Gravatar kosayoda-2/+5
2020-07-22Charinfo: up char limit and reduce line limitGravatar MarkKoz-4/+4
Pagination means more characters can be supported without cluttering anything. It also means infinite lines, so there's no longer a need to squeeze out the most from a single page. Reducing the line limit leads to a smaller, tidier presentation.
2020-07-22Charinfo: use more descriptive field name Gravatar Mark-1/+1
Since the raw field is displayed on every page, but pages are incomplete, it may be unclear whether the field's value is for the current page or for all pages. Co-authored-by: Kieran Siek <[email protected]>
2020-07-22Jam tests: use the MAX_CHANNELS constant moreGravatar MarkKoz-4/+4
It's clearer to write MAX_CHANNELS - 2 than a literal 48.
2020-07-22Jam tests: assert equality of new categoryGravatar MarkKoz-1/+2
2020-07-22Jam tests: add subtests to non-existent category testGravatar MarkKoz-7/+18
The test has to account for not only the name not matching, but also a lack of available spaces for new channels.
2020-07-22Jam tests: fix category testGravatar MarkKoz-14/+24
2020-07-22Jams: create a new category if others are fullGravatar MarkKoz-20/+31
2020-07-22Jam Tests: space out lines for readabilityGravatar MarkKoz-0/+6
2020-07-22Jam Tests: remove default_args attributeGravatar MarkKoz-4/+3
Kind of redundant since it's only used by two tests.
2020-07-22Jam Tests: re-arrange tests to follow definition order in the cogGravatar MarkKoz-10/+10
2020-07-22Jam Tests: fix utils patchGravatar MarkKoz-4/+5
stop needs to be called on the patcher, not the mock. Furthermore, using addCleanup is safer than tearDown because the latter may not be called if an exception is raised in setUp.
2020-07-21Charinfo: paginate the resultsGravatar MarkKoz-6/+6
Pagination ensures the results will never go over the char limit for an embed. Fixes #897 Fixes BOT-3D
2020-07-21Charinfo: use send_denial helperGravatar MarkKoz-13/+7
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