SrGobi
SrGobi
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by SrGobi on 6/7/2024 in #djs-questions
@DiscordJs/Opus installation error for node v20
I have been investigating the errors when installing this package and it seems that @Discordjs/opus is not compatible with version 20 of Node.JS By carrying out several installation/uninstallation tests, I have come to that conclusion, trying different versions of PYTHON and Node.JS and it is always the same for version 20 of Node.Js This error indicates that there was a problem trying to install the @discordjs/opus package. The specific error Error: spawn EINVAL usually occurs when there is a problem with your environment configuration. The error also mentions node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help. node-pre-gyp is a tool used to compile native Node.js modules, and it seems there was an issue with it.
7 replies
RRailway
Created by SrGobi on 12/9/2023 in #✋|help
Problem with ffmpeg playback
I have been investigating but I can't find where the problem is located, I have made the following checks: - Creation of the nixpacks.toml file, to specify ffmpeg installation. nixpacks.toml
[phases.setup]
nixPkgs = ['...', 'ffmpeg']
[phases.setup]
nixPkgs = ['...', 'ffmpeg']
- Creation of the file railway.toml, to specify nixpacksVersion installation. railway.toml
[build]
nixpacksVersion = "1.18.0"
[build]
nixpacksVersion = "1.18.0"
- Update of all package.json packages - Specify engines node and npm All this I have tested it starting in local and if it works as it should, when I run in local it plays the music but when I upload it to railway what it does is to jump from song to song in loop because it doesn't seem to play any sound.
16 replies
RRailway
Created by SrGobi on 8/27/2023 in #✋|help
Change Heroku to Railway
I need more info because I have a problem with Heroku with my hosted proyect there WebSocket doesnt load and doesnt work, If i host my proyect here that problem would be solved?
43 replies
DIAdiscord.js - Imagine an app
Created by SrGobi on 7/19/2022 in #djs-questions
Fix Connect Timeout Error
everyone who has updated to discord.js V14 and on console get this: (It's an error about connection time, it seems that it takes time to connect, I don't know what but they should fix it soon)
ConnectTimeoutError: Connect Timeout Error
code: 'UND_ERR_CONNECT_TIMEOUT'
ConnectTimeoutError: Connect Timeout Error
code: 'UND_ERR_CONNECT_TIMEOUT'
You can solve it with the following
import { Client } from 'discord.js'
import { Agent } from 'undici'

const client = new Client({ ... })
const agent = new Agent({
connect: {
timeout: 30000
}
})

client.rest.setAgent(agent)

await client.login('...')
import { Client } from 'discord.js'
import { Agent } from 'undici'

const client = new Client({ ... })
const agent = new Agent({
connect: {
timeout: 30000
}
})

client.rest.setAgent(agent)

await client.login('...')
29 replies