0

我最近将我的不和谐机器人转移到了基于 unbuntu 的 VPS。问题是它不会播放任何类型的音乐。它开始处理它,然后它说下面的错误。

(node:5252) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
    at RequestHandler.execute (/home/lanthonylal/EA-BOT/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async RequestHandler.push (/home/lanthonylal/EA-BOT/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:5252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by re
jecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see http
s://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5252) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proces
s with a non-zero exit code.

我的 Play.js 文件:

module.exports = {
    name: `play`,
    description: `Play A Song`,
    hidden: false,
    aliases: [`p`],
    usage: `(song)`,

async execute(client, message, args, Discord, errorlog, botlog, msglog, profileData, guildProfile){
    const music = args.join(' ');
    if (!message.member.voice.channel) return message.channel.send(`Uh Oh - You're not in a voice channel !`);

        if (message.guild.me.voice.channel && message.member.voice.channel.id !== message.guild.me.voice.channel.id) return message.channel.send(` You Are Not In The Same Voice Channel The Bot Is Currently In!`);

        if (!args[0]) return message.channel.send(`Uh Oh - Please indicate the title of a song !`);
    client.distube.play(message, args.join(' '))
}
}

我可以确认这在我使用 windows powershell 时有效。你认为这可能是因为它是 unbuntu 还是 distube 不支持这个?

4

0 回答 0