Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions interactions/models/discord/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ def from_object(cls, obj: DiscordObject) -> "SelectDefaultValues":
"""Create a default value from a discord object."""
match obj:
case d_models.User():
return cls(id=obj.id, type="user")
return cls(client=obj._client, id=obj.id, type="user")
case d_models.Member():
return cls(id=obj.id, type="user")
return cls(client=obj._client, id=obj.id, type="user")
case d_models.BaseChannel():
return cls(id=obj.id, type="channel")
return cls(client=obj._client, id=obj.id, type="channel")
case d_models.Role():
return cls(id=obj.id, type="role")
return cls(client=obj._client, id=obj.id, type="role")
case _:
raise TypeError(
f"Cannot convert {obj} of type {type(obj)} to a SelectDefaultValues - Expected User, Channel, Member, or Role"
Expand Down