diff --git a/changelog/1158.doc.rst b/changelog/1158.doc.rst new file mode 100644 index 0000000000..3a79ab60be --- /dev/null +++ b/changelog/1158.doc.rst @@ -0,0 +1 @@ +Adding some clarifying documentation around the executable parameters of audio classes based off of internal discussions. diff --git a/disnake/player.py b/disnake/player.py index 3ff094d4d6..45c666f7f7 100644 --- a/disnake/player.py +++ b/disnake/player.py @@ -126,6 +126,12 @@ class FFmpegAudio(AudioSource): :class:`FFmpegOpusAudio` work should subclass this. .. versionadded:: 1.3 + + .. danger:: + + As this wraps a subprocess call, ensure that + arguments such as ``executable`` are not + set from direct user input. """ def __init__( @@ -240,6 +246,11 @@ class FFmpegPCMAudio(FFmpegAudio): passed to the stdin of ffmpeg. executable: :class:`str` The executable name (and path) to use. Defaults to ``ffmpeg``. + + .. danger:: + + As this wraps a subprocess call, ensure that + this argument is not set from direct user input. pipe: :class:`bool` If ``True``, denotes that ``source`` parameter will be passed to the stdin of ffmpeg. Defaults to ``False``. @@ -342,6 +353,11 @@ class FFmpegOpusAudio(FFmpegAudio): executable: :class:`str` The executable name (and path) to use. Defaults to ``ffmpeg``. + + .. danger:: + + As this wraps a subprocess call, ensure that + this argument is not set from direct user input. pipe: :class:`bool` If ``True``, denotes that ``source`` parameter will be passed to the stdin of ffmpeg. Defaults to ``False``.