Skip to content

sillyfrog/discord.js-listenexample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord.js-listenexample

An example script to show discord.js listening to audio

You will need to create an auth.json file for your bot, it should contain:

{
    "token": "<TOKEN>",
    "name": "<BOT_NAME>"
}

Then build the Dockerfile:

docker build . -t listendemo

Then run and connect to the container:

docker run -ti listendemo bash

And now run the demo:

node demo.js ./auth.json <your channel id>

The script will output what is happening, including start and stop speaking events.

A .pcm file will also be generated for each speaker each time they speak. I have included a convertpcmtowav.py python script to convert the generated .pcm files to .wav files. See the header for more information.

About

An example script to show discord.js listening to audio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published