Skip to main content

No project description provided

Project description

A collection of useful audio scripts for NAFF

pip install naff_audio

NAFF YTAudio

A NAFF audio object for playing audio from YT_DLP.

from naff_audio import YTAudio

audio = await YTAudio.from_url("https://www.youtube.com/watch?v=ldyqHK0tbSc")
await voice_state.play(audio)

NAFF Queue

A basic queue system.

import os
from naff_audio import NaffQueue
from naff import AudioVolume

vc = await channel.connect()
queue = NaffQueue(vc)

# enqueue all songs in a given folder
path = r"some_dir_of_music/"
for song in os.listdir(path):
    queue.put(AudioVolume(f"{path}/{song}"))

queue.start() 
# start playing through the queue

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naff-audio-1.2.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

naff_audio-1.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page