Commands fail to load / refresh if I require client
I'm messing around with discord.js and trying to build a music bot that plays songs off deezer. Though, I've run into an issue while trying to implement a queue system in my eplay function.
If I leave the line:
const client = require('../../src/index.js');...
Receiving Channel Audio
Hey Guys, I would love to receive channel audio.
But i dont find anything working for me.
Regards...
Bot connect but doesnt play anything
These are my dependences:
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5...
Bot does not play any music, with no error message at all
it just shows application did not respond on discord, but no error message in terminal
``
export async function execute(interaction) {
const query = interaction.options.getString("query");
const songPath =
audio/${query}`; ...Audio from websites other than a file
I'm new to the discord.js voice section, and I was wondering how to make the bot play music from other websites for example Youtube or Youtube Music, I got it playing music files that are saved on my pc, but currently I'm trying to make it play music from websites, for example I do
!play url
and it plays the url
which is the music video link.Detect Move
How to detect if a member moved from a voice to another i tried using:
but if someone selfmute or selfdeaf them selfs it will count as a move...
if(oldState.channelId !== null && newState.channelId !== null) {}
if(oldState.channelId !== null && newState.channelId !== null) {}
not playing
```js
const voiceChannel = interaction.member?.voice.channel;
const connection = joinVoiceChannel({
channelId: voiceChannel.id,...
Getting poll results.
Hi there,
I am trying to make a bot that makes a poll and then responds with the winning answer to the poll, How do i do this?
Thanks...
Player state changes to "playing" when resource ends
Whenever I play a resource, I need to be able to detect when said resource stops playing in the player I play it with.
However, whenever the resource ends, the player rattles off "playing" status....
encryption does not work
I am using the latest discord.js/voice 0.18.0 and [email protected] but unfortunately when the bot joins the voice channel the connection is degraded from encrypted end to end to secure only.
Bot don't join VC (err: TypeError: Cannot read properties of undefined (reading 'set') )
When i try to do this ```js
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,...
Typescript complains about adapterCreator after upgrading to v0.17.0
i updated
@discordjs/voice
from 0.16.1
to 0.17.0
and discord.js
from 14.14.1
to 14.16.3
, and now this snippet makes typescript complains about
```
Type 'InternalDiscordGatewayAdapterCreator' is not assignable to type 'DiscordGatewayAdapterCreator'.
Types of parameters 'methods' and 'methods' are incompatible.
......The bot says it's playing the audio but I can't hear anything on discord.
```ts
import {
createAudioPlayer,
createAudioResource,...
@discordjs/opus: make: g++: Command not found
@discordjs/opus doesnt install via NPM,
Gives error: make: g++: Command not found
Im using a oracle linux cloud VM, I have GCC installed with version 8.5
Full error log is given in file...
bot leave voice channel after a while
My bot leaves voice channel after a while so i let him join the vc every 30m but it works only on one server it doesn't work on all servers
im going to send my ready.js file because it has the joining vc code
```javascript
const color = require('chalk')...
Play audio problem
Hello, I have a problem with the "@discordjs/voice" package, and the problem is in playing the sound. Well, to understand the problem, let's assume that there are two servers, the first is called Server 1 and the second is called Server 2. When I play songs on Server 1, the same song will play on Server 2. What is the solution to this problem?