Add conversion routine for SelectMenu to ui.Select

This commit is contained in:
Rapptz 2021-06-30 02:55:03 -04:00
parent 62dad0f7bf
commit 157caaec7c

View File

@ -33,12 +33,12 @@ import sys
import time
import os
from .item import Item, ItemCallbackType
from ..enums import ComponentType
from ..components import (
Component,
ActionRow as ActionRowComponent,
_component_factory,
Button as ButtonComponent,
SelectMenu as SelectComponent,
)
__all__ = (
@ -65,6 +65,10 @@ def _component_to_item(component: Component) -> Item:
from .button import Button
return Button.from_component(component)
if isinstance(component, SelectComponent):
from .select import Select
return Select.from_component(component)
return Item.from_component(component)