aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-02-09Create an AsyncContextManagerMock mock for testing asynchronous context managersGravatar Akarys42-0/+12
It can be used to test aiohttp request functions, since they are async context managers
2020-02-09Use actual functions instead of lambdas for bot.wait_forGravatar Akarys42-2/+14
The use of lambdas made the functions hard to test, this new format allows us to easily test those functions and document them.
2020-01-29Re-eval snippet with emoji reactionGravatar Matteo Bertucci-23/+46
If the eval message is edited after less than 10 seconds, an emoji is added to the message, and if the user adds the same, the snippet is re-evaluated. This make easier to correct snipper mistakes.
2020-01-28Don't strip whitespaces during snekbox formattingGravatar Matteo Bertucci-2/+1
It could lead to a misleading result if it is stripped.
2020-01-15Fix user command error for empty custom statusGravatar S. Co1-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.
2020-01-14Discord.py server added to whitelistGravatar Daniel Brown-0/+1
Added discord.py's server to the invite whitelist
2020-01-14Add new partners to invite whitelistGravatar Joseph-0/+2
2020-01-13Replace sphinx mock classes with SimpleNamespaces; add user_agent to configGravatar Numerlor-24/+17
2020-01-12Use commas instead of `by`.Gravatar Johannes Christ-1/+1
2020-01-12Track command completions by user.Gravatar Johannes Christ-2/+4
2020-01-12Use parent path properly.Gravatar Johannes Christ-12/+5
2020-01-12Track command completions.Gravatar Johannes Christ-1/+27
2020-01-12Empty commit for autodeploy.Gravatar Johannes Christ-0/+1
2020-01-12Remove underline from `self.PREFIX`.Gravatar Johannes Christ-3/+3
2020-01-12fix(lint): wrong import orderGravatar Thomas Petersson-2/+2
2020-01-12feat(!rules): allow for throw away words after the command callGravatar Thomas Petersson-2/+5
2020-01-12Add Guild ID to message counter.Gravatar Johannes Christ-4/+6
2020-01-12Add documentation.Gravatar Johannes Christ-1/+10
2020-01-12Track messages by channel.Gravatar Johannes Christ-3/+14
2020-01-12Track member joins and leaves.Gravatar Johannes Christ-1/+15
2020-01-12Only request offline members for large guilds.Gravatar Johannes Christ-1/+2
2020-01-12Add the `metrics` cog.Gravatar Johannes Christ-0/+41
2020-01-12Start Prometheus HTTP server on bot start.Gravatar Johannes Christ-0/+3
2020-01-12Install `prometheus-async`.Gravatar Johannes Christ-179/+211
2020-01-11Add handling for empty PEP metadata valuesGravatar S. Co1-8/+6
Some PEPs have a metadata field that is present but has an empty value (e.g. PEP 249), causing an exception to be raised when attempting to add it as an embed field value, which cannot be empty. This refactors the information parsing to prevent the field from being added if there is no value to provide, as well as cut down on copy+paste when populating fields in the embed.
2020-01-11Update Code Jam Participant IDGravatar Leon Sandøy-1/+1
2020-01-09Adding PyGame and Ren'Py to the invite white listGravatar Daniel Brown-0/+2
With the addition of the #game-development channel, I would expect we'll see an increase in people needing specific help with the various engines and libraries that Python has to offer. As part of this, I'm adding the servers for PyGame and Ren'Py to the white list to help people get to the proper resources they might need.
2020-01-01Move comment into if bodyGravatar Numerlor-2/+2
2020-01-01Rename last_paragraph_end variable to a more fitting nameGravatar Numerlor-6/+6
2019-12-31Make sure description is truncated to max 1000 charsGravatar Numerlor-2/+8
2019-12-30Watchchannels: show username in response for already watched usersGravatar MarkKoz-2/+2
Makes it clear which user it is in the case of an ID being used to invoke the command.
2019-12-30Update filetype whitelist to include audio formatsGravatar Ava-0/+3
Discord has a built-in player for all of these and they are really just stripped down videos, which are allowed.
2019-12-26Use a static discord shield on the readme.Gravatar scragly-1/+1
2019-12-26Correct eval output to include the 11th lineGravatar Akarys42-1/+1
2019-12-25Hardcode SIGKILL valueGravatar Akarys42-1/+3
It allows the cog to also work on Windows, because of Signals.SIGKILL not being defined on this platform
2019-12-23Move Expiry converter alias to converters.pyGravatar MarkKoz-10/+10
2019-12-23Refactor user type aliasesGravatar MarkKoz-15/+15
2019-12-23Create an alias for a Member + FetchedUser converterGravatar MarkKoz-20/+23
2019-12-22Make FetchedUser a subclass of UserConverterGravatar MarkKoz-50/+52
2019-12-22Use log.warning instead of the deprecated log.warnGravatar MarkKoz-1/+1
2019-12-22Show only status code in Discord msg when infraction post failsGravatar MarkKoz-7/+4
When debugging, the response_text exceeds the character limit since it's basically an entire HTML document.
2019-12-22Use more specific error message for infraction DM user fetchGravatar MarkKoz-1/+1
2019-12-22Add ducky attributes to bot.constantsGravatar Sebastiaan Zeeff-0/+6
I have added attributes to the Emojis class in `bot.constants` for the newly added ducky emoji constants.
2019-12-22Remove unreachable break in post_infraction loopGravatar MarkKoz-3/+1
* Show the user in the post_infraction error log message
2019-12-22Add ducky constants to make duckpond workGravatar Sebastiaan Zeeff-1/+7
I have added the IDs of the new duckies we have to the constants
2019-12-22Catch HTTPException in fetching, only fetch if isn't User or MemberGravatar Manuel Ignacio Pérez Alcolea-8/+12
There's now a check to see if the `user` argument (possibly a `discord.Object`) needs to be made a `User`, instead of doing so directly, to avoid unnecessary requests to the Discord API. Besides that, a possible HTTPException is catched if it the fetch fails, cancelling the message to be send to the user (which would make the following calls fail later on for not being of the proper type.)
2019-12-22Allow PSD's and more on antimalware whitelistGravatar Leon Sandøy-0/+5
Also includes the following related formats: - .svg - .ai (Adobe Illustrator) - .aep (Adobe After Effects) - .xcf (GIMP
2019-12-22Make `watchchannels` use `FetchedUser` instead of `proxy_user`Gravatar Manuel Ignacio Pérez Alcolea-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.
2019-12-22Fix bug to log if `user` is either `Member` or `User`Gravatar Manuel Ignacio Pérez Alcolea-1/+1
2019-12-22Move type declarations for annotations and convertersGravatar Manuel Ignacio Pérez Alcolea-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.