Chiko0401
DIAdiscord.js - Imagine an app
•Created by Chiko0401 on 6/2/2024 in #djs-voice
The operation was aborted
My bot successfully connects to channels, then tries to await entersState(connection, VoiceConnectionStatus.Ready, 15e3); but for some channels it enters to the Ready state successfully while for others the following error is got:
AbortError: The operation was aborted
at EventTarget.abortListener (node:events:993:14)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)
at EventTarget.dispatchEvent (node:internal/event_target:683:26)
at abortSignal (node:internal/abort_controller:368:10)
at AbortController.abort (node:internal/abort_controller:402:5)
at Timeout.<anonymous> (/home/cmp-name/my-app/node_modules/@discordjs/voice/dist/index.js:2504:39)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
My code:
export async function join(channel: VoiceBasedChannel) {
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
selfDeaf: false,
selfMute: true,
adapterCreator: channel.guild.voiceAdapterCreator as unknown as DiscordGatewayAdapterCreator,
debug: true
});
connection.setMaxListeners(100);
connection.on('debug', (message) => {
log.debug(
throw error; } } discord.js: 14.11.0 discordjs/voice: 0.16.0 node: 18.17.0
Debug message for the ${channel.guild.id} guild: ${message}
);
});
connection.on('error', (error) => {
log.error(Error for the ${channel.guild.id} guild: ${error}
);
});
log.debug(Connection to the ${channel.guild.id}[${channel.id}] voice channel was created successfully
);
try {
await entersState(connection, VoiceConnectionStatus.Ready, 15e3);
return true;
} catch (error: any) {throw error; } } discord.js: 14.11.0 discordjs/voice: 0.16.0 node: 18.17.0
15 replies
DIAdiscord.js - Imagine an app
•Created by Chiko0401 on 4/14/2024 in #djs-voice
Record users with high input sensitivity
8 replies