2424# fmt: off
2525class TrackEndReason (enum .StrEnum ):
2626 """:class:`enum.StrEnum` representing the Track End Reason received by Lavalink.
27-
27+
2828 Attributes
2929 ----------
3030 finished: str
@@ -38,16 +38,19 @@ class TrackEndReason(enum.StrEnum):
3838 cleanup: str
3939 The track was cleaned up. Cannot start the next track.
4040 """
41- finished = "finished" # The track finished playing. Can start next: True
42- load_failed = "loadFailed" # The track failed to load. Can start next: True
43- stopped = "stopped" # The track was stopped. Can start next: False
44- replaced = "replaced" # The track was replaced. Can start next: False
45- cleanup = "cleanup" # The track was cleaned up. Can start next: False
41+ finished = "finished" # The track finished playing. Can start next: True
42+ load_failed = "loadFailed" # The track failed to load. Can start next: True
43+ stopped = "stopped" # The track was stopped. Can start next: False
44+ replaced = "replaced" # The track was replaced. Can start next: False
45+ cleanup = "cleanup" # The track was cleaned up. Can start next: False
46+
47+ def may_start_next (self ) -> bool :
48+ return self in ("finished" , "loadFailed" )
4649
4750
4851class LoadResult (enum .StrEnum ):
4952 """:class:`enum.StrEnum` representing the load result from the /loadtracks endpoint.
50-
53+
5154 Attributes
5255 ----------
5356 track: str
@@ -70,7 +73,7 @@ class LoadResult(enum.StrEnum):
7073
7174class Source (enum .StrEnum ):
7275 """:class:`enum.StrEnum` representing a music source to search from. E.g. Youtube or Spotify.
73-
76+
7477 Attributes
7578 ----------
7679 youtube: Literal["ytsearch"]
@@ -100,7 +103,7 @@ class AutoPlay(enum.Enum):
100103
101104class EventType (enum .StrEnum ):
102105 """:class:`enum.StrEnum` representing the event types dispatched via the Websocket.
103-
106+
104107 Attributes
105108 ----------
106109 TrackStart: Literal["track_start"]
0 commit comments