createAudioResource()
Im not sure to i should ask this here or in help channel but im going there.
In docs it takes
string
as resource input that is a file location, but i want to ask what else we can use to create a resource or directly a resource something like a Buffer
or anything else
For further explanation i want to store them in mongoose database and use them in future but im not sure how i can store a audio file in mongoose or i can use it or not...Stuck in 'Signaling'
I'm having an issue that started a few months ago, and I can't seem to figure out why.
Very long story short, after exactly 1 minute of being in a voice chat, the bot's voice chat status goes into "signaling". It worked fine initially (worked for months with no issues), and then this started. I'm not finding much about it in the DJS docs, and the Discord api docs mention it's part of the heartbeat stuff ... Any direction on what I need to look at in order to get this fixed? Not having our bot is starting to suck. Thanks!
There's not really any code to show, but here's the log output: It's always EXACTLY 1 minute after Ready....
Joining the user's current voice channel
On discord.js@14.12.1 & node v18.12
I've been trying to create a command that joins whichever channel the user is in.
I keep running into an issue where it doesn't read the user's current voice, instead it thinks "currVoiceChannel" is false.
```// Todo: ejoin makes bot join user when called...
Playing a soundfile
I'm trying to use discord.js voice to play a sound file. Is my thinking in how to get this to work in the right direction here or am I missing important parts here?
```js
...
const resource = createAudioResource(soundfilePath);...
Bot join voice but not playing anything? discord.js 12.5.3 node 14.17.1
<rejected> Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
play-dl stops playing from youtube after a while
I have a simple music player in discordjs 14 using the play-dl library. The bot joins to the voice channel and starts playing the selected music from youtube, but after ~50-60sec it suddenly stops. The bot stays in the voice channel and there's no any error message at all. Do you have any ideas why?
Audio Not Playing
Discord JS Ver 14.13.0, Voice ver 0.16.0, Node 16.14.0
The bot joins the channel that I am in, however it doesn't play any audio and doesn't give any errors, I don't understand why?...
Tips on creating a transcription bot
Basically I want the bot to listen to each user and transcribe their voice into text. Then send that as a file when the call has ended. I know how to record and store the raw audio data but how would I go about transcribing it?
how to make echobot
I want to write code that, using
connection.receiver
, will listen to what the user with id 633223783204782090 says and immediately repeat it.Player loop for blackjack game
Hi everyone! I'm currently implementing a game of blackjack in my bot, using an embed and buttons for the game information and functions. It is two-player, with the command to start the game having an option to mention the other player, with player 1 being the command initiator.
My issue is in how to make the game loop back and forth between both players then break when someone wins.
The code specifically for the game itself is below:...
Bot isn't playing any Sound
Hey! I'm working for a games company and got tasked to create a discord bot that plays our ambient music in a voice channel. I'm using discord.js 14.12.1 and the bot itself works correctly and also joins the voice channel as it should.
But it somehow doesn't play any audio. We're using local .mp3 files.
Here's the code part for the AudioPlayer
```js...
record and play audio
I am trying to do https://github.com/discordjs/voice-examples/blob/main/recorder/src/createListeningStream.ts in v14
with this code:
```js
function createListeningStream(receiver, userId, user) {
const opusStream = receiver.subscribe(userId, {...
musique in loop
```
let stream = ytdl(args[0], {
filter: "audioonly",
quality: 'highestaudio',
seek: 0...
using commands not working
I created a bot and have been using -join to join voice channels. I wanted to work on making it using a /join command. I got the command to work to join it to a voice channel but I can't get it to play music when it's in there. Do I need to send back some sort of info to get the bot to play music from my index.js. thanks for any help.
<VoiceState>.speaking feature
How can I get user speaking info in discord.js V14? I just wanna know if user speaking or not thats it but I don't want to put the bot in the voice channel. Is there a way to do this?
Bot doesnt recognise the voice channel
im trying to make a bot command to join a voicechannel but when i execute the command and specify a voice channel it tells the its not a valid voice channel
could anyone help me find out whats wrong with my code?...
Audio not playing
ok so i am trying to transmit a audio file into the voice channel but the bot only is able to join the channel and is not transmitting anything
heres the pastebin of code:
https://pastebin.com/Rdg2Qut5...