Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add clarification to executable param #1158

Merged
merged 2 commits into from Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/1158.doc.rst
@@ -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
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