Make fetch_x methods cache when applicable #87

Open
Gnome-py wants to merge 1 commits from Gnome-py/fetch-cache into 2.0
Gnome-py commented 2021-10-02 19:24:21 +00:00 (Migrated from github.com)

Summary

For methods that can/make sense to, will add to cache so get_x works (and try_x uses less api calls), also adds a new flag (fetched) to MemberCacheFlags in order to be able to disable this behavior for fetch_member and fetch_members

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
<!-- Pull requests that do not fill this information in will likely be closed --> ## Summary <!-- What is this pull request for? Does it fix any issues? --> For methods that can/make sense to, will add to cache so `get_x` works (and `try_x` uses less api calls), also adds a new flag (`fetched`) to `MemberCacheFlags` in order to be able to disable this behavior for `fetch_member` and `fetch_members` ## Checklist <!-- Put an x inside [ ] to check it, like so: [x] --> - [x] If code changes were made then they have been tested. - [x] I have updated the documentation to reflect the changes. - [ ] This PR fixes an issue. - [ ] This PR adds something new (e.g. new method or parameters). - [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed) - [ ] This PR is **not** a code change (e.g. documentation, README, ...)
This pull request has changes conflicting with the target branch.
  • discord/ext/commands/core.py
  • discord/ext/commands/errors.py

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin Gnome-py/fetch-cache:Gnome-py/fetch-cache
git checkout Gnome-py/fetch-cache
Sign in to join this conversation.
No description provided.