Skip to content

Use fetch_member instead of get_member for auto-converting #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

hpenney2
Copy link
Contributor

Using get_member will return None if the bot doesn't have the server members intent or hasn't (fully) chunked the guild the member came from. fetch_member doesn't require intents, so it's a better choice. This also requires process_options to be async so it can call and get the return values of coroutines (in this case, just fetch_member). However, this shouldn't cause any issues.

@eunwoo1104
Copy link
Contributor

The problem with fetch things is that if bot fails fetching it will raise exception instead of returning None. However getting from cache gives None if it failed finding a user. But I'll reconsider before closing or merging.

@eunwoo1104 eunwoo1104 changed the base branch from master to fix-cache December 18, 2020 00:21
@eunwoo1104
Copy link
Contributor

Merging to new branch, thank you for contributing!

@eunwoo1104 eunwoo1104 merged commit e74fc60 into interactions-py:fix-cache Dec 18, 2020
eunwoo1104 added a commit that referenced this pull request Dec 18, 2020
@eunwoo1104 eunwoo1104 added bug Something isn't working enhancement New feature or request labels Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants