Skip to content
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

Snowflake Object type #908

Open
Ferlern opened this issue Jan 8, 2023 · 0 comments · May be fixed by #909
Open

Snowflake Object type #908

Ferlern opened this issue Jan 8, 2023 · 0 comments · May be fixed by #909
Labels
feature request Request for a new feature

Comments

@Ferlern
Copy link

Ferlern commented Jan 8, 2023

Summary

Add a way to select Snowflake Object type

What is the feature request for?

The core library

The Problem

To use disnake.Object in await channel.edit(overwrites=...) we should know about snowflake type (it is a Role or a Member) otherwise it will be ignored.

By setting the disnake.Object type, we can create permission overrides for channels without getting the full role object from the cache.

The Ideal Solution

Add new kwarg for disnake.Object initializer

>>> import disnake
>>> disnake.Object(123123, type=disnake.Role) 
<Object id=123123 type=<class 'disnake.role.Role'>>

The Current Solution

We can get the role object from cache and use it.

Additional Context

No response

@Ferlern Ferlern added the feature request Request for a new feature label Jan 8, 2023
@shiftinv shiftinv linked a pull request Jan 9, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant