Skip to content

Commit

Permalink
docs: add clarification to executable param (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis authored Feb 23, 2024
1 parent 4702223 commit cc1776a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/1158.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding some clarifying documentation around the executable parameters of audio classes based off of internal discussions.
16 changes: 16 additions & 0 deletions disnake/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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``.
Expand Down Expand Up @@ -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``.
Expand Down

0 comments on commit cc1776a

Please sign in to comment.