-
-
Notifications
You must be signed in to change notification settings - Fork 482
feat: Implement better get_or_fetch #2776
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
feat from #1856 |
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
still not ready have some bug like : NameError: name 'VoiceChannel' is not defined |
@Lumabots You can import it inside of the function where you use it directly instead of importing it at the top |
Well ig the issue come from the definition for the typevar, so will that resolve it ? |
… get_or_fetch shortcut Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
should be ready for review |
just need to specify that this is breaking inside the changelog cos of modification of get_or_fetch and removal of get_or_fetch_user |
Maybe an unintended side-effect, Guild + AppEmoji is valid: emoji = await utils.get_or_fetch(<Guild>, discord.AppEmoji, <valid guild emoji id>)
print(type(emoji)) # discord.GuildEmoji |
Tested and works, outside of the 2 comments above. |
Co-authored-by: Soheab <33902984+Soheab@users.noreply.github.com> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
Summary
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.