【发布时间】:2020-05-31 06:30:56
【问题描述】:
我无法安装 node-opus,因为它给出了错误代码。
我的代码:
const Discord = require('discord.js');
const client = new Discord.Client();
client.login('my token :)');
client.on('message', message => {
if (!message.guild) return;
if (message.content === '/join') {
if (message.member.voiceChannel) {
message.member.voiceChannel.join()
.then(connection => {
const dispatcher = connection.playFile('./musik/taisonin.mp3');
dispatcher.resume()
dispatcher.on("end", end => {message.memver.voiceChannel.leave()});
});
} else {
message.reply('-');
}
}
});
在尝试开始播放我的 mp3 文件之前,一切似乎都运行良好。 -> “错误:找不到 Opus 引擎。”
部门:
"@discordjs/opus": "^0.1.0",
"discord.js": "github:discordjs/discord.js#master",
"discord.js-commando": "github:discordjs/Commando",
"ffmpeg-static": "^4.0.1",
"opusscript": "0.0.7"
【问题讨论】:
标签: javascript mp3 npm-install discord.js opus