aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-08-04HelpChannels: create a generic function to handle pin errorsGravatar MarkKoz-11/+26
This can be used for both pinning and unpinning messages. The error handling code was largely similar between them.
2020-08-04HelpChannels: don't unpin message if ID is NoneGravatar MarkKoz-0/+3
Fixes #1082 Fixes BOT-7G
2020-08-04HelpChannels: add more detail to unpin log messagesGravatar MarkKoz-3/+7
2020-08-04HelpChannels: move unpinning to separate functionGravatar MarkKoz-12/+16
2020-08-04Revert "Disabled burst_shared filter temporarily"Gravatar Joseph Banks-0/+4
This reverts commit be14db91b1c70993773e67cfa663fef0cfa85666.
2020-08-03Add support for plural FilterList types.Gravatar Leon Sandøy-5/+17
This will allow mods to use '!whitelist get guild_invites' in addition to '!whitelist get guild_invite' This is just a naive implementation which works if the plural form is a simple s at the end of the word. It's implemented into the converter.
2020-08-03Add some feedback to the _sync_data helper.Gravatar Leon Sandøy-7/+15
Previously, this would not provide any feedback at all, which is really terrible UX. Sorry about that. This also adds error handling in case the API call fails.
2020-08-03Move function params to 4-space indentation.Gravatar Leon Sandøy-2/+17
2020-08-03Move function params to 4-space indentation.Gravatar Leon Sandøy-18/+18
2020-08-03Change some errant single quotes to doubles.Gravatar Leon Sandøy-4/+4
2020-08-03Adding a beautiful walrus to filter_lists.py.Gravatar Leon Sandøy-2/+2
Thanks @Den4200!
2020-08-03Sort all load_extension groups alphabetically.Gravatar Leon Sandøy-5/+4
2020-07-31Remove superfluous Available help channels.Gravatar Leon Sandøy-4/+12
This adds a little bit of logic to the Help Channel `init_available` coroutine, which runs when the cog loads. This ensures that if there are more help channels in available than there should be, we remove the superfluos ones. Previously, if the bot started with too many channels, it would maintain and defend that excessive amount. This is because we never actually count the number of channels before adding in new available channels whenever one disappears. If we ever get too many available channels in the future, this can be solved by simply reloading this cog.
2020-07-30Use full flag name for case-insensitivityGravatar Senjan21-1/+1
requested by lemon
2020-07-30Missed `?` in regex.Gravatar Senjan21-1/+1
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-30Add more explicit feedback to failures.Gravatar Leon Sandøy-7/+17
For deleting and listing data, we now get some more feedback when things fail.
2020-07-29Dynamically amend types to filterlist docstrings.Gravatar Leon Sandøy-5/+38
We want the !help invocations to give you all the information you need in order to use the command. That also means we need to provide the valid filterlist types, which are subject to change. So, we fetch the valid ones from the API and then dynamically insert them into the docstrings.
2020-07-29Make sure file formats have leading dots.Gravatar Leon Sandøy-0/+8
2020-07-29Apply suggested change from @MarkKoz.Gravatar Leon Sandøy-4/+1
2020-07-29Fix broken antimalware tests.Gravatar Leon Sandøy-1/+1
2020-07-29We search for an invite instead of matching one.Gravatar Leon Sandøy-1/+1
This means we can validate invites that start with https://, whereas before we could not.
2020-07-29word_watchlist -> filter_token in filtering.py.Gravatar Leon Sandøy-2/+2
2020-07-29Restructure bot.filter_list_cache.Gravatar Leon Sandøy-21/+20
This is an optimization designed to eliminate all the list comprehensions we were doing inside antimalware and filtering. The cache is now structured so that the content is the key and the metadata is the value.
2020-07-29Fix a bad type annotation.Gravatar Leon Sandøy-2/+2
2020-07-29Fix imports in converters.pyGravatar Leon Sandøy-5/+6
2020-07-29Refactor filtering: use non-compiled expressions.Gravatar Leon Sandøy-10/+6
2020-07-29Make a helper for validating guild invites.Gravatar Leon Sandøy-16/+18
2020-07-29Make a helper for inserting filter lists.Gravatar Leon Sandøy-21/+16
2020-07-29Kaizen - group private methods together.Gravatar Leon Sandøy-43/+43
2020-07-29Use a defaultdict(list) for filter_list_cache.Gravatar Leon Sandøy-6/+7
2020-07-29Expect status 400 for duplicates.Gravatar Leon Sandøy-2/+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-27Bump flake8 version to 3.8Gravatar Leon Sandøy-173/+191
This is necessary to support walrus operators.
2020-07-27Rename AllowDenyList to FilterListsGravatar Leon Sandøy-45/+45
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-24More explicit dict indexing Gravatar Leon Sandøy-3/+3
Addresses reviews from MarkKoz Co-authored-by: Mark <[email protected]>
2020-07-24Add sanity to partner and verification check in filtering.py.Gravatar Leon Sandøy-2/+2
2020-07-24No need for all() in cog_check for AllowDenyLists.Gravatar Leon Sandøy-4/+1
2020-07-24Put valid_types_list inside the conditional.Gravatar Leon Sandøy-1/+1
2020-07-24Catch ResponseCodeError in the ValidAllowDenyListType converter.Gravatar Leon Sandøy-7/+7
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]>