@@ -372,7 +372,6 @@ def __init__(self, *, state, channel, data):
372372 :type: List[]:class:`~Button` | :class:`~LinkButton` | :class:`SelectMenu`]
373373 """
374374 self .suppressed = False
375-
376375 self ._update_components (data )
377376
378377 # region attributes
@@ -528,7 +527,7 @@ def action_rows(self):
528527 rows .append (c_row )
529528 return rows
530529
531- async def wait_for (self , event_name : typing .Literal ["select" , "button" ], client , custom_id = MISSING , by = None , check = lambda component : True , timeout = None ) -> typing .Union [PressedButton , SelectedMenu ]:
530+ async def wait_for (self , event_name : typing .Literal ["select" , "button" ], client , custom_id = MISSING , by = MISSING , check = lambda component : True , timeout = None ) -> typing .Union [PressedButton , SelectedMenu ]:
532531 """Waits for a message component to be invoked in this message
533532
534533 Parameters
@@ -566,11 +565,11 @@ async def wait_for(self, event_name: typing.Literal["select", "button"], client,
566565 def _check (com ):
567566 if com .message .id == self .id :
568567 statements = []
569- if custom_id is not MISSING :
568+ if custom_id not in [ MISSING , None ] :
570569 statements .append (com .custom_id == custom_id )
571- if by is not MISSING :
570+ if by not in [ MISSING , None ] :
572571 statements .append (com .member .id == (by .id if hasattr (by , "id" ) else int (by )))
573- if check is not MISSING :
572+ if check not in [ MISSING , None ] :
574573 statements .append (check (com ))
575574 return all (statements )
576575 return False
0 commit comments