aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | | | Don't patch ctx.message.author in antispamGravatar MarkKoz2020-08-15-4/+5
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The modification propagated across all code that is using the same `Message` object, including all other `on_message` listeners. This caused weird bugs e.g. the filtering cog thinking the bot authored a message that triggered a filter. Patching only `ctx.author` means the implementation is more fragile. Infraction code must ensure it only retrieves the author via `ctx.author` and not through `ctx.message`. Fixes #1005 Fixes BOT-7D
| * | | | | | Merge pull request #1108 from ↵Gravatar Mark2020-08-18-0/+3
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/bug/frontend/1030/reddit-title-escape Escape Markdown in reddit post titles
| | * \ \ \ \ \ Merge branch 'master' into bug/frontend/1030/reddit-title-escapeGravatar Mark2020-08-18-9/+0
| | |\ \ \ \ \ \ | | |/ / / / / / | |/| | | | | |
| * | | | | | | Remove the !ask tagGravatar Leon Sandøy2020-08-16-9/+0
| | |/ / / / / | |/| | | | |
| | * | | | | Escape Markdown in reddit post titlesGravatar MarkKoz2020-08-15-0/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a Unicode look-alike character to replace square brackets, since they'd otherwise interfere with the Markdown. Fixes #1030
| | | * | | Verification: move constants to configGravatar kwzrd2020-09-10-25/+43
| | | | | |
| | | * | | Verification: set 'tasks_running' to 0 on suspicious 403sGravatar kwzrd2020-08-29-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Prevent the tasks from starting again if the bot restarts.
| | | * | | Verification: denote `_maybe_start_tasks` as privateGravatar kwzrd2020-08-29-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Consistency with the new `_stop_tasks` method.
| | | * | | Verification: stop tasks on suspicious 403Gravatar kwzrd2020-08-29-1/+4
| | | | | |
| | | * | | Verification: add helper for stopping tasksGravatar kwzrd2020-08-29-5/+17
| | | | | |
| | | * | | Verification: improve allowed mentions handlingGravatar kwzrd2020-08-27-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I really didn't like the constants, but the construction of allowed mentions instances is syntactically noisy, so I prefer to keep it out of the important logic. Abstracting it behind a function seems to be the best approach yet.
| | | * | | Verification: document StopExecution handlingGravatar kwzrd2020-08-27-0/+3
| | | | | |
| | | * | | Verification: stop kicking members on suspicious 403Gravatar kwzrd2020-08-26-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Discord error code 50_0007 signifies that the DM dispatch failed because the target user does not accept DMs from the bot. Such errors are ignored as before. Any other 403s will however cause the bot to stop making requests. This is in case the bot gets caught by an anti-spam filter and should immediately stop.
| | | * | | Verification: add helper for alerting adminsGravatar kwzrd2020-08-26-0/+18
| | | | | |
| | | * | | Verification: retain ping in edited confirmation msgGravatar kwzrd2020-08-26-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent a ghost ping from occurring upon reaction. Co-authored-by: Senjan21 <[email protected]>
| | | * | | Verification: remove explicit everyones from allowed mentionsGravatar kwzrd2020-08-26-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the kwarg isn't passed, it uses the value that was given to the bot on init (False), despite the kwarg defaulting to True. Thanks to Mark and Senjan for helping me understand this. Co-authored-by: MarkKoz <[email protected]> Co-authored-by: Senjan21 <[email protected]>
| | | * | | Verification: separate guild invite by empty lineGravatar kwzrd2020-08-26-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Joe Banks <[email protected]>
| | | * | | Verification: send guild invite with kick messageGravatar kwzrd2020-08-26-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it easy for users to re-join. Co-authored-by: Joe Banks <[email protected]>
| | | * | | Verification: add guild invite to configGravatar kwzrd2020-08-26-0/+2
| | | | | |
| | | * | | Verification: add missing word to task status messageGravatar kwzrd2020-08-19-2/+2
| | | | | |
| | | * | | Verification: pause request execution after each batchGravatar kwzrd2020-08-14-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Limit values are mostly assumptions, as this feature is very difficult to test at scale. Please see docstring amendmends for further information.
| | | * | | Verification: adjust coroutines to use generic dispatchGravatar kwzrd2020-08-13-32/+11
| | | | | |
| | | * | | Verification: add `_send_requests` helperGravatar kwzrd2020-08-13-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generic request dispatch method to avoid code duplication with error handling & bad status logging.
| | | * | | Verification: improve confirmation message handlingGravatar kwzrd2020-08-08-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppress errors coming from Discord when changing the confirmation message in case it gets deleted, or something else goes wrong. This commit also adds either the ok hand or the warning emoji to the edited message content, as with the guild syncer confirmation. Co-authored-by: MarkKoz <[email protected]>
| | | * | | Verification: strip reminder message once and for allGravatar kwzrd2020-08-08-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | Verification: widen set type annotationGravatar kwzrd2020-08-08-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | Verification: only take reactions from core devsGravatar kwzrd2020-08-08-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | Verification: improve `is_verified` checkGravatar kwzrd2020-08-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just reads better. Co-authored-by: MarkKoz <[email protected]>
| | | * | | Verification: address member update race conditionGravatar kwzrd2020-08-07-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an edge case, the `_kick_members` and `_give_role` could act on a member who has verified *after* being marked by `_check_members` as unverified. To address this, we perform one additional check just before sending the request. Testing seems to indicate that the `discord.Member` instance get updates as appropriate, so this should at least reduce the chances of such a race happening to very close to nil.
| | | * | | Verification: rename cache & document new useGravatar kwzrd2020-08-07-9/+15
| | | | | |
| | | * | | Verification: persist task settings in RedisGravatar kwzrd2020-08-07-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If tasks are stopped manually, they will not automatically restart on cog reload or bot restart. Using `maybe_start_tasks` is necessary because we cannot interface with Redis from a sync context. We're using 1 and 0 because RedisCache does not currently permit bool values due to a typestring conversion bug.
| | | * | | Verification: add command interface for task managementGravatar kwzrd2020-08-06-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow checking whether tasks are running, starting them, and stopping them. Currently, the tasks cannot be started or stopped separately. It is not believed that we would need such a level of granularity. Calling `cancel` on a task that isn't running is a no-op.
| | | * | | Merge 'd.py' 1.4 bump from 'origin/master' branchGravatar kwzrd2020-08-06-79/+51
| | | |\ \ \
| | | * | | | Verification: extend cog docstringGravatar kwzrd2020-08-06-1/+17
| | | | | | |
| | | * | | | Verification: make on-join message more accurateGravatar kwzrd2020-08-06-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]>
| | | * | | | Verification: bump confirmation threshold to 1%Gravatar kwzrd2020-08-06-1/+1
| | | | | | |
| | | * | | | Verification: send DM to kicked membersGravatar kwzrd2020-08-06-0/+8
| | | | | | |
| | | * | | | Verification: enable role pingsGravatar kwzrd2020-08-06-2/+10
| | | | | | |
| | | * | | | Verification: disable burst shared filter in verificationGravatar kwzrd2020-08-06-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.
| | | * | | | Verification: add stats collectionGravatar kwzrd2020-08-06-0/+28
| | | | | | |
| | | * | | | Merge master branch into kwzrd/verificationGravatar kwzrd2020-08-06-477/+803
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the RedisCache #1090 fix, allowing us to use the cache to hold the ping task on start-up.
| | | * | | | | Verification: remove unverified role on acceptGravatar kwzrd2020-08-06-0/+5
| | | | | | | |
| | | * | | | | Verification: schedule ping taskGravatar kwzrd2020-08-05-3/+5
| | | | | | | |
| | | * | | | | Verification: implement unverified role ping taskGravatar kwzrd2020-08-05-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.
| | | * | | | | Verification: ignore verification reminder message eventGravatar kwzrd2020-08-04-0/+3
| | | | | | | |
| | | * | | | | Verification: add reminder cacheGravatar kwzrd2020-08-04-0/+5
| | | | | | | |
| | | * | | | | Verification: comment message usesGravatar kwzrd2020-08-04-0/+3
| | | | | | | |
| | | * | | | | Verification: add reminder ping message & frequencyGravatar kwzrd2020-08-04-0/+11
| | | | | | | |
| | | * | | | | Verification: move time constants above messagesGravatar kwzrd2020-08-04-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows referencing the constants within the message bodies.
| | | * | | | | Verification: make authorization message ping core devsGravatar kwzrd2020-08-04-2/+3
| | | | | | | |