Browse Source

Rename duation to duration

pull/10230/head
blord0 1 month ago
parent
commit
3dd7f8fefb
  1. 10
      discord/file.py

10
discord/file.py

@ -120,7 +120,7 @@ class File:
self.spoiler: bool = spoiler self.spoiler: bool = spoiler
self.description: Optional[str] = description self.description: Optional[str] = description
self.duation = duration self.duration = duration
self._waveform = waveform self._waveform = waveform
@property @property
@ -133,7 +133,9 @@ class File:
@property @property
def waveform(self) -> str: def waveform(self) -> str:
""":class:`str`: The waveform data for the voice message.""" """:class:`str`: The waveform data for the voice message.
.. versionadded:: 2.6"""
if self._waveform is None: if self._waveform is None:
return base64.b64encode(os.urandom(256)).decode('utf-8') return base64.b64encode(os.urandom(256)).decode('utf-8')
return self._waveform return self._waveform
@ -168,8 +170,8 @@ class File:
if self.description is not None: if self.description is not None:
payload['description'] = self.description payload['description'] = self.description
if self.duation is not None: if self.duration is not None:
payload['duration_secs'] = self.duation payload['duration_secs'] = self.duration
payload['waveform'] = self.waveform payload['waveform'] = self.waveform
return payload return payload

Loading…
Cancel
Save