aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-08-06Verification: make on-join message more accurateGravatar kwzrd-2/+4
It now explains that new users can only see a limited amount of public channels, and that there will be more once they verify. Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-08-06Verification: bump confirmation threshold to 1%Gravatar kwzrd-1/+1
2020-08-06Verification: send DM to kicked membersGravatar kwzrd-0/+8
2020-08-06Verification: enable role pingsGravatar kwzrd-2/+10
2020-08-06Verification: disable burst shared filter in verificationGravatar kwzrd-1/+10
We will begin pinging users in the verification channel, prompting them to join. This can cause a surge of activity that may trigger the filter. A better solution would involve allowing per-filter channel config, but after internal discussion this is seen as unnecessary for now.
2020-08-06Verification: add stats collectionGravatar kwzrd-0/+28
2020-08-06Verification: remove unverified role on acceptGravatar kwzrd-0/+5
2020-08-05Guild invite regex: Add support for dashes in the invite codeGravatar Dennis Pham-1/+1
2020-08-05Revert "HelpChannels: use more reliable check for claimed channel"Gravatar kwzrd-1/+1
This reverts commit 59c62162
2020-08-05Redis: remove erroneous `_redis` aliasGravatar kwzrd-9/+8
If a RedisCache instance was being accessed before bot has created the `redis_cache` instance, the `_redis` alias was being set to None, causing AttributeErrors in lookups. See: #1090
2020-08-05Verification: schedule ping taskGravatar kwzrd-3/+5
2020-08-05Verification: implement unverified role ping taskGravatar kwzrd-0/+52
We're making good use of d.py's tasks framework. RedisCache is used to persist the reminder message ids, which can conveniently be converted into timestamps. It is therefore trivial to determine the time to sleep before the first ping. After that, the bot simply pings every n hours.
2020-08-04HelpChannels: use more reliable check for claimed channelGravatar MarkKoz-1/+1
Using the channel's category isn't reliable since it may take Discord a while to actually move the channel once it's received a request from the bot. I suppose using redis technically has the same problem, but it should be much faster and less susceptible to lag than Discord. Fixes #1074
2020-08-04Source: remove redundant check for help commandsGravatar MarkKoz-4/+1
The code is identical to the else block and there's no reason for help commands to have an explicit check.
2020-08-04Source: raise BadArgument for dynamically-created objectsGravatar MarkKoz-3/+14
Commands, cogs, etc. created via internal eval won't have a source file associated with them, making source retrieval impossible. Fixes #1083 Fixes BOT-7K
2020-08-04Cancel scheduled tasks when cogs unloadGravatar MarkKoz-1/+14
When cogs reload, they used new Scheduler instances, which aren't aware of previously scheduled tasks. This led to duplicate scheduled tasks when cogs re-scheduled tasks upon initialisation. Fixes #1080 Fixes BOT-7H
2020-08-04Verification: ignore verification reminder message eventGravatar kwzrd-0/+3
2020-08-04Verification: add reminder cacheGravatar kwzrd-0/+5
2020-08-04Verification: comment message usesGravatar kwzrd-0/+3
2020-08-04Verification: add reminder ping message & frequencyGravatar kwzrd-0/+11
2020-08-04Verification: move time constants above messagesGravatar kwzrd-10/+10
Allows referencing the constants within the message bodies.
2020-08-04Verification: make authorization message ping core devsGravatar kwzrd-2/+3
2020-08-04Verification: schedule member update taskGravatar kwzrd-1/+12
Turns out that it's necessary to cancel the task manually. Otherwise, duplicate tasks can be running concurrently should the extension be reloaded.
2020-08-04Verification: add region comments & move property to topGravatar kwzrd-4/+17
Cog is getting large so let's allow collapsing related bits.
2020-08-04Verification: create task to update unverified membersGravatar kwzrd-0/+37
2020-08-04Verification: repurpose & rename `_check_users`Gravatar kwzrd-10/+8
Let's only use this function to check on the guild status. It can be exposed via a command in the future. Name adjusted to be more accurate w.r.t. Discord terminology.
2020-08-04Verification: implement `_verify_kick` helperGravatar kwzrd-0/+63
This will be used to guard the call to `_kick_members`.
2020-08-04Verification: implement `_kick_members` helperGravatar kwzrd-3/+21
2020-08-04Verification: implement `_give_role` helperGravatar kwzrd-2/+21
2020-08-04Verification: implement `check_users` coroutineGravatar kwzrd-1/+59
See docstring for details. The coroutine will be registered as a task at a later point.
2020-08-04Verification: define time constantsGravatar kwzrd-0/+3
2020-08-04Verification: refactor `discord` importsGravatar kwzrd-11/+13
Let's access these via the qualified name. The amount of imported names was starting to get unwieldy.
2020-08-04Verification: add @Unverified role to configGravatar kwzrd-2/+3
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-08-02Verification: send initial message on member joinGravatar kwzrd-1/+11
2020-08-02Verification: adjust & rename welcome messageGravatar kwzrd-3/+3
Let's give it a better name so that it's clear when this message is sent. The initial words are adjusted to avoid repetition after the on join message.
2020-08-02Verification: add initial on join messageGravatar kwzrd-0/+7
This message will be sent via direct message to each user who joins the guild.
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