Version 1.1.0 - Refactor + Intergration Backend
This commit is contained in:
1 parent
a59d7a66db
commit
98cdae97c0
58 files changed
+244
-70
No files matched your search
@@ -0,0 +1,25 @@
|
||||
const {createAudioResource, VoiceConnectionStatus, createAudioPlayer, StreamType} = require('@discordjs/voice');
|
||||
const {LogType} = require('loguix')
|
||||
const clog = new LogType("Soundcloud-Stream")
|
||||
const {Soundcloud} = require('soundcloud.ts')
|
||||
const ffmpeg = require('fluent-ffmpeg')
|
||||
|
||||
const soundcloud = new Soundcloud();
|
||||
|
||||
async function getStream(song) {
|
||||
try {
|
||||
|
||||
var stream = await soundcloud.util.streamTrack(song.url)
|
||||
return stream
|
||||
|
||||
|
||||
|
||||
} catch(e) {
|
||||
clog.error("Erreur lors de la récupération du stream : " + song.title)
|
||||
clog.error(e)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports = {getStream}
|
||||
Reference in new issue
Block a user