Python
Python
DIAdiscord.js - Imagine an app
Created by Python on 10/12/2024 in #djs-questions
Detecting the double server boost
I am listening to the messageCreate event and, when the message.type equals 8, Sends a message to the channel. However, I want to avoid sending a message when a member boosts the server for the first time. because to handle this, I listen to the guildMemberUpdate event to detect the automatic Nitro boost. Essentially, I only want the messageCreate event to trigger for a member's second boost onwards.
I would appreciate it if someone could guide me!
11 replies
DIAdiscord.js - Imagine an app
Created by Python on 8/9/2024 in #djs-voice
Checking the is bot already joined the voice channel
Hello is has any way to achieve this without using GuildVoiceStates intent? And also i want to know does the JoinVoiceChannel function creates a new connection even if bot has already joined to specific voice channel?
3 replies
DIAdiscord.js - Imagine an app
Created by Python on 5/13/2024 in #djs-voice
Audio Player and Voice Connection
Hello, Does the player.stop() removes and deletes the created audio player and it's resource And i wanna know does the connection.destory() removes the created audio player and it's resource as well?
13 replies
DIAdiscord.js - Imagine an app
Created by Python on 5/9/2024 in #djs-voice
Stop playing audio without voiceStatesUpdate event
Hello Is there have any way to stop playing the audio without voiceStatesUpdate event when the member left the voice ?
3 replies
DIAdiscord.js - Imagine an app
Created by Python on 5/9/2024 in #djs-voice
On start playing audio event
Hello here is my code:
const connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: voiceChannel.guild.id,
adapterCreator: voiceChannel.guild.voiceAdapterCreator,
})
const player = createAudioPlayer();
const resource = createAudioResource(
"MP3 URL",
{
metadata: {
title: "A good song", // Optional object
},
}
);

player.play(resource);
connection.subscribe(player);
player.on(AudioPlayerStatus.Playing, () => {
console.log("Start Playing")

});
const connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: voiceChannel.guild.id,
adapterCreator: voiceChannel.guild.voiceAdapterCreator,
})
const player = createAudioPlayer();
const resource = createAudioResource(
"MP3 URL",
{
metadata: {
title: "A good song", // Optional object
},
}
);

player.play(resource);
connection.subscribe(player);
player.on(AudioPlayerStatus.Playing, () => {
console.log("Start Playing")

});
but the playing audio event, Logs this messages twice and when the second logging was sent into the console the bot start playing the audio
7 replies