@@ -112,9 +112,13 @@ def __getitem__(self, name):
112
112
return super ().__getattribute__ (name )
113
113
114
114
@property
115
- def requester (self ):
115
+ def requester (self ) -> int :
116
116
return self .extra ['requester' ]
117
117
118
+ @requester .setter
119
+ def requester (self , requester ) -> int :
120
+ self .extra ['requester' ] = requester
121
+
118
122
def __repr__ (self ):
119
123
return '<AudioTrack title={0.title} identifier={0.identifier}>' .format (self )
120
124
@@ -359,8 +363,8 @@ async def play_track(self, track: str, start_time: Optional[int] = None, end_tim
359
363
options ['startTime' ] = start_time
360
364
361
365
if end_time is not None :
362
- if not isinstance (end_time , int ) or end_time <= 0 :
363
- raise ValueError ('end_time must be an int with a value greater than 0' )
366
+ if not isinstance (end_time , int ) or not end_time <= 0 :
367
+ raise ValueError ('end_time must be an int with a value equal to, or greater than 0' )
364
368
365
369
if end_time > 0 :
366
370
options ['endTime' ] = end_time
@@ -696,12 +700,12 @@ async def play(self, track: Optional[Union[AudioTrack, DeferredAudioTrack, Dict]
696
700
track = self .queue .pop (pop_at )
697
701
698
702
if start_time is not None :
699
- if not isinstance (start_time , int ) or 0 <= start_time < track .duration :
703
+ if not isinstance (start_time , int ) or not 0 <= start_time < track .duration :
700
704
raise ValueError ('start_time must be an int with a value equal to, or greater than 0, and less than the track duration' )
701
705
702
706
if end_time is not None :
703
- if not isinstance (end_time , int ) or 0 < end_time <= track .duration :
704
- raise ValueError ('end_time must be an int with a value greater than 0, and less than, or equal to the track duration' )
707
+ if not isinstance (end_time , int ) or not 0 <= end_time <= track .duration :
708
+ raise ValueError ('end_time must be an int with a value equal to, or greater than 0, and less than, or equal to the track duration' )
705
709
706
710
self .current = track
707
711
playable_track = track .track
0 commit comments