Cryingfreeman74
DIAdiscord.js - Imagine an app
•Created by Cryingfreeman74 on 1/5/2024 in #djs-questions
How to use a custom font in canvas
code:
the Montserrat-Black.ttf file is in the same directory as the project and is not corrputed or anything, I've tried several times but I can't manage to use the font I want.
4 replies
DIAdiscord.js - Imagine an app
•Created by Cryingfreeman74 on 12/25/2023 in #djs-voice
How to get access to player from different file
So I'm making a music bot and I wanted to have a slash command that makes the bot skip to the next song, but I'm having problems with getting access to the player object created in another file, what can I do?
My two slash commands where one is the function that searches for a song and then plays it and the other one is to skip are in the same directory and I tried foing this:
By doing this if I try to log the player in skip.js this will print undefined.
3 replies
DIAdiscord.js - Imagine an app
•Created by Cryingfreeman74 on 12/25/2023 in #djs-voice
How to remove event listener from player
code:
So I have this recursive function that uses a queue to play songs, but I noticed that when I add a second song to the queue and it switches to that song, the old listener is still active and makes it skip a song since it removes the top song in the queue. Is there a way to eliminate that listener before recalling the function?
3 replies
DIAdiscord.js - Imagine an app
•Created by Cryingfreeman74 on 12/8/2023 in #djs-voice
Bot doesn't stop playing if I try to change what it's playing
I use a slash command to obtain a keyword to search on youtube and it works, but if I try to use the command a second time it downloads the new audio but does not change to playing it immediatly, instead it continues playing the old track for around 10-20 seconds and then starts playing the new song.
Code:
5 replies