Distube (Unbuntu) - DiscordAPIERROR: Invalid Form Body Content: Must be 2000 or fewer in length

491 Views Asked by At

I recently transferred my discord bot to a VPS that is unbuntu based. The issue is that it will not play any sort of music. It starts to process it and then it says the error below.

(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.

My Play.js File:

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(' '))
}
}

I can confirm that this works when I use windows powershell. Do you think this can possibly be due to it being unbuntu or does distube have no support for this?

0

There are 0 best solutions below