aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | | | | | Make `watchchannels` use `FetchedUser` instead of `proxy_user`Gravatar Manuel Ignacio Pérez Alcolea2019-12-22-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes also removes the original `proxy_user` used by `watchchannels` the attributes in its `discord.Object` object to the one returned by FetchedUser.
| | * | | | | | | | Fix bug to log if `user` is either `Member` or `User`Gravatar Manuel Ignacio Pérez Alcolea2019-12-22-1/+1
| | | | | | | | | |
| | * | | | | | | | Move type declarations for annotations and convertersGravatar Manuel Ignacio Pérez Alcolea2019-12-22-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out how it was originally was the best idea. Now the `infractions` module imports `FetchedUser` and makes a `typing.Union` between it and `utils.UserTypes`. The usage of `FetchedUser` isn't needed in `utils` at all, and it shouldn't be used for/as type hinting there.
| | * | | | | | | | Minor refactor moving `return ...`Gravatar Manuel Ignacio Pérez Alcolea2019-12-22-3/+1
| | | | | | | | | |
| | * | | | | | | | Merge branch 'fetched-user' of https://github.com/manusaurio/bot into ↵Gravatar Manuel Ignacio Pérez Alcolea2019-12-22-1/+1
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fetched-user
| | | * | | | | | | | Add space in conditionGravatar manusaurio2019-12-22-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: Mark <[email protected]>
| | * | | | | | | | | Add descriptive message to exception if user from API doesn't existGravatar Manuel Ignacio Pérez Alcolea2019-12-22-1/+1
| | |/ / / / / / / /
| | * | | | | | | | Correct log messages levels, add log messages and ctx.send messageGravatar Manuel Ignacio Pérez Alcolea2019-12-22-7/+12
| | | | | | | | | |
| | * | | | | | | | Merge branch 'master' into fetched-userGravatar manusaurio2019-12-20-29/+26
| | |\ \ \ \ \ \ \ \
| | * | | | | | | | | "Correct indentation style"Gravatar Manuel Ignacio Pérez Alcolea2019-12-20-2/+4
| | | | | | | | | | |
| | * | | | | | | | | Move `utils.proxy_user` to Converters and do minor refactoringGravatar Manuel Ignacio Pérez Alcolea2019-12-20-55/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `proxy_user` function now belongs to the `Converters` module, since its use is directly related to it. `FetchedUser` uses this function if there's an error trying to fetch and it doesn't indicate a non existing user. Technically finished and working.
| | * | | | | | | | | Make post_user take default values for payload from `getattr`Gravatar Manuel Ignacio Pérez Alcolea2019-12-20-20/+12
| | | | | | | | | | |
| | * | | | | | | | | Make `FetchedUser` return a `discord.Object` if user *may* existGravatar Manuel Ignacio Pérez Alcolea2019-12-20-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FetchedUser Converter now counts with a `proxy_user` helper function (which SHOULD NOT be there) to return a user as a last resource, in case there was an issue fetching from the Discord API, as long as the error isn't that there's no user with the given ID.
| | * | | | | | | | | Give `post_user` default values for `payload` if absent in `user`Gravatar Manuel Ignacio Pérez Alcolea2019-12-20-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now `post_user(...)` expects either a `discord.User` or a `discord.Object` object as `user`. Either way, it will try to take the relevant attributes from `user` to fill the DB columns. If it can't be done, `.avatar_hash`, `.discriminator`, and `name` will take default values.
| | * | | | | | | | | Refactor minor details in `post_infraction`Gravatar Manuel Ignacio Pérez Alcolea2019-12-20-5/+4
| | | | | | | | | | |
| | * | | | | | | | | Make post_infraction try to `post_user` if user doesn't existGravatar Manuel Ignacio Pérez Alcolea2019-12-16-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try twice to apply the infraction. If the user is not in the database, try to add it, then try to apply the infraction again. This allows any moderation function that uses `FetchedUser` as a converter to apply the infraction even when the user is absent in the local database.
| | * | | | | | | | | Add `post_user` function to POST a new user to the DBGravatar Manuel Ignacio Pérez Alcolea2019-12-16-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it is now, this function is planned to be used a big-helper in `post_infraction`. Its interface is partially similar: it will return a "JSON" dictionary if everything went well, or `None` if it failed. If it fails, it will send a message to the channel and register the issue in the `log`.
| | * | | | | | | | | Remove pointless comma after last argumentGravatar Manuel Ignacio Pérez Alcolea2019-12-16-1/+1
| | | | | | | | | | |
| | * | | | | | | | | Add FetchedUser to convert ids of absent users to `discord.User`Gravatar Manuel Ignacio Pérez Alcolea2019-12-16-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This `discord.ext.commands.Converter` fetches a user from the Discord API and returns a `discord.User` object. This should replace the `proxy_user` function from the moderation `utils`.
| | | | | * | | | | | Fix user command error for empty custom statusGravatar S. Co12020-01-15-1/+5
| |_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the scenario where a user has a custom status set to only an emoji & blank text value, their activity status is set as `None`, which causes `discord.utils.escape_markdown` to raise an exception, as it's expecting something string-like. We can guard against this by checking for a `None` value & skipping the markdown escape if necessary.
* | | | | | | | | | Discord.py server added to whitelistGravatar Daniel Brown2020-01-14-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added discord.py's server to the invite whitelist
* | | | | | | | | | Add new partners to invite whitelistGravatar Joseph2020-01-14-0/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #728 from Numerlor/doc_config_useragentGravatar Sebastiaan Zeeff2020-01-13-24/+17
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix intersphinx not getting an user agent for requests
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into doc_config_useragentGravatar Sebastiaan Zeeff2020-01-13-2/+4
| |\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
* | | | | | | | | | | Merge pull request #726 from python-discord/track-command-completions-by-userGravatar Leon Sandøy2020-01-13-2/+4
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Prometheus: track command completions by user.
| * | | | | | | | | | | Use commas instead of `by`.Gravatar Johannes Christ2020-01-12-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Track command completions by user.Gravatar Johannes Christ2020-01-12-2/+4
|/ / / / / / / / / / /
| * / / / / / / / / / Replace sphinx mock classes with SimpleNamespaces; add user_agent to configGravatar Numerlor2020-01-13-24/+17
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #725 from python-discord/track-command-completionsGravatar Johannes Christ2020-01-12-1/+20
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Track command completions.
| * | | | | | | | | | Use parent path properly.Gravatar Johannes Christ2020-01-12-12/+5
| | | | | | | | | | |
| * | | | | | | | | | Track command completions.Gravatar Johannes Christ2020-01-12-1/+27
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #715 from Numerlor/doc-fixGravatar Mark2020-01-12-5/+11
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Make sure docs command's output description is truncated.
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into doc-fixGravatar Mark2020-01-12-197/+314
| |\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
* | | | | | | | | | | Empty commit for autodeploy.Gravatar Johannes Christ2020-01-12-0/+1
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #723 from python-discord/tagptroll1-rules-optional-argsGravatar Johannes Christ2020-01-12-2/+5
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow for throw away words after the rules command call
| * | | | | | | | | | | fix(lint): wrong import orderGravatar Thomas Petersson2020-01-12-2/+2
| | | | | | | | | | | |
| * | | | | | | | | | | feat(!rules): allow for throw away words after the command callGravatar Thomas Petersson2020-01-12-2/+5
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #722 from python-discord/setup-prometheus-endpointGravatar Johannes Christ2020-01-12-179/+292
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | Set up a Prometheus endpoint for metrics
| * | | | | | | | | | | Remove underline from `self.PREFIX`.Gravatar Johannes Christ2020-01-12-3/+3
| | | | | | | | | | | |
| * | | | | | | | | | | Add Guild ID to message counter.Gravatar Johannes Christ2020-01-12-4/+6
| | | | | | | | | | | |
| * | | | | | | | | | | Add documentation.Gravatar Johannes Christ2020-01-12-1/+10
| | | | | | | | | | | |
| * | | | | | | | | | | Track messages by channel.Gravatar Johannes Christ2020-01-12-3/+14
| | | | | | | | | | | |
| * | | | | | | | | | | Track member joins and leaves.Gravatar Johannes Christ2020-01-12-1/+15
| | | | | | | | | | | |
| * | | | | | | | | | | Only request offline members for large guilds.Gravatar Johannes Christ2020-01-12-1/+2
| | | | | | | | | | | |
| * | | | | | | | | | | Add the `metrics` cog.Gravatar Johannes Christ2020-01-12-0/+41
| | | | | | | | | | | |
| * | | | | | | | | | | Start Prometheus HTTP server on bot start.Gravatar Johannes Christ2020-01-12-0/+3
| | | | | | | | | | | |
| * | | | | | | | | | | Install `prometheus-async`.Gravatar Johannes Christ2020-01-12-179/+211
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #705 from python-discord/bug/mod/s317/explicit-active-valueGravatar Johannes Christ2020-01-12-5/+5
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Moderation: explicitly set active value when posting infractions
| * | | | | | | | | | | Moderation: explicitly set active value when posting infractionsGravatar MarkKoz2019-12-19-5/+5
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Required due to changes in the API making the active field required. See python-discord/site/pull/317
* | | | | | | | | | | Merge pull request #714 from python-discord/feat/watch/b713/show-name-if-watchedGravatar Johannes Christ2020-01-12-2/+2
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Watchchannels: show username in response for already watched users