aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | | | | | | | | | | | | | | | | | | Add constants for badgesGravatar Joseph Banks2020-08-14-0/+11
| | |_|_|_|/ / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | Type check root aliasesGravatar MarkKoz2020-08-24-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like normal aliases, they should only be tuples or lists. This is likely done by discord.py to prevent accidentally passing a string when only a single alias is desired.
| | * | | | | | | | | | | | | | | | | | | Help: include root aliases in outputGravatar MarkKoz2020-08-22-1/+3
| | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | Include root aliases in the command name conflict testGravatar MarkKoz2020-08-22-0/+1
| | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | Replace alias command definitions with root_aliasesGravatar MarkKoz2020-08-22-81/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fruits of my labour.
| | * | | | | | | | | | | | | | | | | | | Bot: fix AttributeError for commands which lack root_aliasesGravatar MarkKoz2020-08-22-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if the `command` decorators are patched, there are still some other internal things that need to be patched. For example, the default help command subclasses the original `Command` type. It's more maintainable to exclude root alias support for these objects than to try to patch everything.
| | * | | | | | | | | | | | | | | | | | | Patch d.py decorators to support root aliasesGravatar MarkKoz2020-08-22-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid explicitly specifying `cls` everywhere, patch the decorators to set the default value of `cls` to the `Command` subclass which supports root aliases.
| | * | | | | | | | | | | | | | | | | | | Bot: add root alias supportGravatar MarkKoz2020-08-22-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override `Bot.add_command` and `Bot.remove_command` to add/remove root aliases for a command (and recursively for any subcommands). This has to happen in `Bot` because there's no reliable way to get the `Bot` instance otherwise. Therefore, overriding the methods in `GroupMixin` unfortunately doesn't work. Otherwise, it'd be possible to avoid recursion by processing each subcommand as it got added.
| | * | | | | | | | | | | | | | | | | | | Define a Command subclass with root alias supportGravatar MarkKoz2020-08-22-0/+15
| |/ / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subclass is used because cogs make copies of Command objects. They do this to allow multiple instances of a cog to be used. If the Command class doesn't inherently support the `root_aliases` kwarg, it won't end up being copied when a command gets copied. `Command.__original_kwargs__` could be updated to include the new kwarg. However, updating it and adding the attribute to the command wouldn't be as elegant as passing a `Command` subclass as a `cls` attribute to the `commands.command` decorator. This is because the former requires copying the entire code of the decorator to add the two lines into the nested function (it's a decorator with args, hence the nested function).
* | | | | | | | | | | | | | | | | | | | Disable raw commandsGravatar Joe Banks2020-08-20-2/+2
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Merge pull request #1116 from Numerlor/reminders-fixGravatar Joe Banks2020-08-20-2/+24
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restrict reminder methods to authors and admins.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into reminders-fixGravatar Joe Banks2020-08-20-15/+8
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Merge pull request #1117 from ↵Gravatar Mark2020-08-20-15/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/bug/1112/backend/wait-for-deletion-client Make client parameter mandatory for wait_for_deletion
| * | | | | | | | | | | | | | | | | | | | Make client parameter mandatory for wait_for_deletionGravatar MarkKoz2020-08-20-15/+8
|/ / / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A client instance is necessary for the core feature of this function. There is no way to obtain it from the other arguments. The previous code was wrong to think `discord.Guild.me` is an equivalent. Fixes #1112
| * / / / / / / / / / / / / / / / / / / Restrict reminder methods to authors and admins.Gravatar Numerlor2020-08-20-2/+24
|/ / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, any user could modify the reminders of others by the id. This restricts the behaviour to only admins and users can only modify the reminders they authored.
* | | | | | | | | | | | | | | | | | | Merge pull request #1106 from AtieP/masterGravatar Mark2020-08-19-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add doc cleanup
| * | | | | | | | | | | | | | | | | | | msg rather than doc_embedGravatar AtieP2020-08-16-2/+2
| | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | Use wait_for_deletion from /bot/utils/messages.py instead of doc_cleanupGravatar AtieP2020-08-16-25/+3
| | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | Satisfy some of the Azure pipelines' code requirementsGravatar AtieP2020-08-15-3/+3
| | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | Add doc cleanupGravatar AtieP2020-08-15-2/+26
| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | Merge pull request #1109 from python-discord/bug/mod/1065/unnominate-bannedGravatar Mark2020-08-19-20/+36
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unnominate banned users from the talent pool
| * | | | | | | | | | | | | | | | | | | | Replace stinky single-item unpacking syntaxGravatar MarkKoz2020-08-19-1/+1
| | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | Swap argument order in ChainMapsGravatar MarkKoz2020-08-19-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The defaults should be last to ensure they don't take precedence over explicitly set values.
| * | | | | | | | | | | | | | | | | | | | Unnominate banned users from the talent poolGravatar MarkKoz2020-08-15-19/+35
| | |/ / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1065
* | | | | | | | | | | | | | | | | | | | Merge pull request #1100 from python-discord/bug/filters/1099/dupe-offensive-msgGravatar Senjan212020-08-19-3/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filtering: ignore errors for duplicate offensive messages
| * | | | | | | | | | | | | | | | | | | | Filtering: ignore errors for duplicate offensive messagesGravatar MarkKoz2020-08-12-3/+11
| | |/ / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error happens when a filter is triggered by a message edit. Fixes #1099 Fixes BOT-6B
* | | | | | | | | | | | | | | | | | | | Merge pull request #1107 from python-discord/bug/filters/1005/antispam-ctx-patchGravatar Senjan212020-08-19-4/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't patch ctx.message.author in antispam
| * | | | | | | | | | | | | | | | | | | | Truncate mod log contentGravatar MarkKoz2020-08-15-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discord has a limit of 2000 characters for messages.
| * | | | | | | | | | | | | | | | | | | | 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
| | | | | | | | | | | | | | | | | | |