aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | * Reddit: use qualified_name attribute when removing the cogGravatar MarkKoz2019-12-11-1/+1
| | | | | | |
| | | | | | * Reddit: move BasicAuth instantiation to __init__Gravatar MarkKoz2019-12-11-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The object is basically just a namedtuple so there's no need to re-create it every time a token is obtained. * Remove log message which shows credentials. * Initialise headers attribute to None in __init__.
| | | | | | * Reddit: move token renewal inside fetch_postsGravatar MarkKoz2019-12-11-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the duplicate code for renewing the token. Since fetch_posts is the only place where the token gets used, it can just be refreshed there directly.
| | | | | | * Merge branch 'master' into reddit-api-oauthGravatar Jens2019-12-05-1198/+3100
| | | | | | |\
| | | | | | * | Keeps access token alive, only revokes it on extension unload.Gravatar Jens2019-12-05-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hard-coded version number to 1.0.0.
| | | | | | * | Fix linting errorGravatar Jens2019-10-26-0/+1
| | | | | | | |
| | | | | | * | Resolved merge conflicts.Gravatar Jens2019-10-26-1605/+2753
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add retry loop to token request. Revoke access token after usage.
| | | | | | * | | Add reddit environment variable, change User-Agent and fix lint problemGravatar Jens2019-10-22-2/+4
| | | | | | | | |
| | | | | | * | | Merge branch 'master' of https://github.com/python-discord/bot into ↵Gravatar Jens2019-10-16-92/+291
| | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reddit-api-oauth
| | | | | | * \ \ \ Resolve merge conflictGravatar Jens2019-10-15-4/+2
| | | | | | |\ \ \ \
| | | | | | | * | | | Add Reddit OAuth tasks and refactor codeGravatar Jens2019-10-09-6/+77
| | | | | | | | | | |
| | | | | | * | | | | Unload cog on auth error and fix linting warningsGravatar Jens2019-10-15-19/+16
| | | | | | | | | | |
| | | | | | * | | | | Add Reddit OAuth tasks and refactor codeGravatar Jens2019-10-14-6/+76
| | | | | | | | | | |
* | | | | | | | | | | Merge remote-tracking branch 'origin/master' into enhancement/690-clean-cmdGravatar MarkKoz2019-12-12-191/+250
|\| | | | | | | | | |
| * | | | | | | | | | Subclass Bot (#681)Gravatar scragly2019-12-12-185/+225
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Subclass Bot
| | * | | | | | | | | | Use the AsyncResolver for APIClient and discord.py sessions tooGravatar MarkKoz2019-12-08-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Active thread counts are observed to be lower with it in use.
| | * | | | | | | | | | Fix test failures for setup log messagesGravatar MarkKoz2019-12-08-24/+7
| | | | | | | | | | | |
| | * | | | | | | | | | Properly create and close aiohttp sessionsGravatar MarkKoz2019-12-08-10/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aiohttp throws a warning when a session is created outside of a running async event loop. In aiohttp 4.0 this actually changes to an error instead of merely a warning. Since discord.py manages the event loop with client.run(), some of the "internal" coroutines of the client were overwritten in the bot subclass to be able to hook into when the bot starts and stops. Sessions of both the bot and the API client can now potentially be None if accessed before the sessions have been created. However, if called, the API client's methods will wait for a session to be ready. It will attempt to create a session as soon as the event loop starts (i.e. the bot is running).
| | * | | | | | | | | | Fix name conflict with the Bot cogGravatar MarkKoz2019-12-08-3/+3
| | | | | | | | | | | |
| | * | | | | | | | | | Override add_cog to log loading of cogsGravatar MarkKoz2019-12-08-80/+34
| | | | | | | | | | | |
| | * | | | | | | | | | Change all Bot imports to use the subclassGravatar MarkKoz2019-12-07-52/+92
| | | | | | | | | | | |
| | * | | | | | | | | | Subclass BotGravatar MarkKoz2019-12-07-24/+32
| | | |_|_|_|_|_|_|_|/ | | |/| | | | | | | |
| * | | | | | | | | | Merge pull request #684 from python-discord/enhancement/644-mute-kicks-voiceGravatar Mark2019-12-12-6/+15
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Kick users from voice when they get muted
| | * \ \ \ \ \ \ \ \ \ Merge branch 'master' into enhancement/644-mute-kicks-voiceGravatar Matteo Bertucci2019-12-12-0/+10
| | |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | | | |
| * | | | | | | | | | | Fix tag fallback not respecting checks (#687)Gravatar scragly2019-12-12-0/+10
| |\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / / / | |/| | | | | | | | | | Fix tag fallback not respecting checks
| | * | | | | | | | | | ErrorHandler: fix #650 tag fallback not respecting checksGravatar MarkKoz2019-12-11-0/+10
| |/ / / / / / / / / /
| | * | | | | | | | | Infractions: kick user from voice after muting (#644)Gravatar MarkKoz2019-12-09-2/+7
| | | | | | | | | | |
| | * | | | | | | | | Moderation: catch HTTPException when applying an infractionGravatar MarkKoz2019-12-09-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a warning is logged if it's a Forbidden error. Otherwise, the whole exception is logged.
| | * | | | | | | | | Moderation: show HTTP status code in the log for deactivation failuresGravatar MarkKoz2019-12-09-1/+1
| |/ / / / / / / / /
* | | | | | | | | | Clean: reformat argumentsGravatar MarkKoz2019-12-11-8/+33
| | | | | | | | | |
* | | | | | | | | | Clean: allow amount argument to be skipped Gravatar Mark2019-12-11-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This make the channel specifiable without the amount. Co-Authored-By: scragly <[email protected]>
* | | | | | | | | | Clean: support specifying a channel different than the context'sGravatar MarkKoz2019-12-11-13/+18
| | | | | | | | | |
* | | | | | | | | | Clean: un-hide from help and add purge aliasGravatar MarkKoz2019-12-11-1/+1
|/ / / / / / / / /
* | | | | | | | | Merge pull request #682 from manusaurio/masterGravatar Shirayuki Nekomata2019-12-09-0/+3
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Ensure hidden_channels and bypass_roles use a list when not passed.
| * | | | | | | | Ensure hidden_channels and bypass_roles use a list when not passed.Gravatar Manuel Ignacio Pérez Alcolea2019-12-09-0/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The in_channel decorator raised 'NoneType' is not iterable when it wasn't passed, due to the default value being None but not checked against before iterating over it. This edit ensures the arguments are set to an empty list in cases where they have a value of None instead.
* | | / / / / / Added optional channel parameter to !echo:Gravatar Daniel Brown2019-12-05-4/+7
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added the option to specify a channel to have Python repeat what you said to it, as well as keeping the old functionality of having it repeat what you said in the current channel if no channel argument is given. Signed-off-by: Daniel Brown <[email protected]>
* | | | | | | Merge pull request #678 from python-discord/antimalware-paste-urlGravatar Mark2019-12-03-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Antimalware: fix paste service URL showing replacement field
| * | | | | | | Antimalware: fix paste service URL showing replacement fieldGravatar MarkKoz2019-12-03-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #672 from ↵Gravatar Mark2019-12-03-6/+28
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | python-discord/enhance-timedelta-for-infraction-expiration Enhance timedelta for infraction expiration
| * | | | | | | Renamed function and improved its docstring to better reflect its purposes.Gravatar Shirayuki Nekomata2019-12-04-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed from `get_duration_from_expiry` -> `format_infraction_with_duration`
| * | | | | | | Deleted `get_duration` and switched to using the already, nicely made ↵Gravatar Shirayuki Nekomata2019-12-03-48/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `humanize_delta`
| * | | | | | | Removed pytest, getting ready to migrate to unittest in another PRGravatar Shirayuki Nekomata2019-12-03-44/+0
| | | | | | | |
| * | | | | | | Updated test cases for `parts: Optional[int]`Gravatar Shirayuki Nekomata2019-11-27-23/+32
| | | | | | | |
| * | | | | | | Updated docstrings, allow passing `parts: Optional[int] = 2` to helper ↵Gravatar Shirayuki Nekomata2019-11-27-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions to return more than just 2 parts of the duration.
| * | | | | | | Updated test cases for `get_duration_from_expiry()`Gravatar Shirayuki Nekomata2019-11-27-8/+9
| | | | | | | |
| * | | | | | | Refactored `scheduler.py` to use the new `get_duration_from_expiry()`Gravatar Shirayuki Nekomata2019-11-27-10/+4
| | | | | | | |
| * | | | | | | Refactored `management.py` to use the new `get_duration_from_expiry()`Gravatar Shirayuki Nekomata2019-11-27-5/+4
| | | | | | | |
| * | | | | | | Changed `get_duration_from_expiry()` to return the `time (duration)` or a `''`Gravatar Shirayuki Nekomata2019-11-27-2/+11
| | | | | | | |
| * | | | | | | Added duration until expiration for infraction searching.Gravatar Shirayuki Nekomata2019-11-27-2/+5
| | | | | | | |
| * | | | | | | Fixed "14 minutes, 60 seconds" by rounding `.total_seconds()` in ↵Gravatar Shirayuki Nekomata2019-11-27-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `bot.utils.time.get_durations()`