Aviv
DIAdiscord.js - Imagine an app
•Created by Aviv on 6/17/2023 in #djs-voice
Listen to user vocal input using connection
hey, i couldn't find any reliable form of making the client listen to vocal input when its connected.
can i have some guidance about it?
16 replies
DIAdiscord.js - Imagine an app
•Created by Aviv on 6/16/2023 in #djs-voice
im getting the classic AudioPlayerError: aborted.
Error:
the code is just creating a resource out of stream from ytdl and player playing that resource.
16 replies
DIAdiscord.js - Imagine an app
•Created by Aviv on 6/15/2023 in #djs-voice
Weirdest bug i've encountered, probably need a discordjs/voice contributor help here.
Hello, i made a discord player for playing music and tts messages.
the youtube way:
get stream from ytdl with filter audioonly, and inserting to queue the AudioResource using createAudioResource(stream).
then to play (in short) i basically do connection.connect(player), and player.play(resource).
the tts way:
im generating a tts mp3 file by query using google tts api, im getting the url from the api and then i fetch it using axios.get and requesting it to be responseType: 'stream'.
then i define a write stream assigning my audio file path, using pipeline to insert my data into the path and creating a mp3 file. then i make an AudioResource of it using
createAudioResource('-audiofilepath-') and pushing it into queue.
then its the same play function as the music one only its targeting the tts queue (which works fine).
my problem is for some reason when i run a music command and (after a while after its back to idle) a tts command the player just buffers it for an infinite amount of time while i can play the other way around and use tts and then music without a problem.
i can also play music and then music as well with no problem. only when its tts and after it music (after idle) it just buffers endlessly.
any help would do, open to ideas and would really love if we could go over this on voice chat as we could run through it.
thanks in advance!
5 replies
DIAdiscord.js - Imagine an app
•Created by Aviv on 6/12/2023 in #djs-voice
Destroy player when session is finished.
Hello, i wanted to know if there's a way for the player to stop playing completely once i've finished with my session manually (like removing the bot from the conversation). i cleared the queue and added player.stop() alongside with prehamptive connection.destroy() but it seems its still 'playing'. any helpers? 🙂
5 replies
DIAdiscord.js - Imagine an app
•Created by Aviv on 8/24/2022 in #djs-questions
Discord.js v13.10.2, Handling with forums.
From what i understood, a forum channel is a thread so i need to use threadCreate event to notice when one is created. problem is it doesn't emit, probably because im missing an intent (most likely). would love some guidence regarding this matter or maybe the specific intent to add (full object name, for example: Intents.FLAGS.GUILDS).
thanks in advance!
15 replies