Maybe Ange
Maybe Ange
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-questions
Ping Bot
Mhm, I see
7 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-questions
Ping Bot
In this code, the bot gets stuck on the phrase that you probably won't understand since it's French, but it gets stuck on the phrase "await interaction.reply", how can I patch that? The bot works from time to time when I restart, we would say approximately that it works one time in 5 https://starb.in/qxsArp.js
7 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-questions
Ping Bot
Hum, dude, i've problem
7 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
I see what I can do, thx
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
A setTimeout, but it will check constantly, it's not good!
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
But what are you telling me? It is not the goal !! I only want to delete the room after 20 seconds if no one joins it after creation.
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
@Qjuh
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-questions
Ping Bot
Thx
7 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
But one question, I would like to make it so that if no one joins the voice channel within 20 seconds of creating it, it also deletes the channel.
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
ALL DONE
client.on('voiceStateUpdate', async (oldState, newState) => {
console.log('Voice state updated.');

const channel = newState.channel || oldState.channel;

if (channel) {
const members = channel.members;
const numberOfMembers = members.size;

console.log(`Number of members in the voice channel: ${numberOfMembers}`);

if (numberOfMembers === 0) {
try {
await channel.delete();

console.log(`Voice channel ${channel.name} deleted because it was empty.`);

const commandTextChannel = client.channels.cache.get(newState.guild.systemChannelId);

if (commandTextChannel) {
const emptyChannelEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Salon vocal vide supprimé :x:')
.setDescription(`Le salon vocal ${channel.name} a été supprimé car il était vide.`);

await commandTextChannel.send({ embeds: [emptyChannelEmbed] });
} else {
console.error('Command text channel not found.');
}
} catch (error) {
console.error(`Error deleting voice channel : ${error}`);
}
}
}
});
client.on('voiceStateUpdate', async (oldState, newState) => {
console.log('Voice state updated.');

const channel = newState.channel || oldState.channel;

if (channel) {
const members = channel.members;
const numberOfMembers = members.size;

console.log(`Number of members in the voice channel: ${numberOfMembers}`);

if (numberOfMembers === 0) {
try {
await channel.delete();

console.log(`Voice channel ${channel.name} deleted because it was empty.`);

const commandTextChannel = client.channels.cache.get(newState.guild.systemChannelId);

if (commandTextChannel) {
const emptyChannelEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Salon vocal vide supprimé :x:')
.setDescription(`Le salon vocal ${channel.name} a été supprimé car il était vide.`);

await commandTextChannel.send({ embeds: [emptyChannelEmbed] });
} else {
console.error('Command text channel not found.');
}
} catch (error) {
console.error(`Error deleting voice channel : ${error}`);
}
}
}
});
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
True
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
No description
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
I succeeded but I can't send the integration to the channel where the command was executed, why? https://starb.in/R6iRqH.js
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
index.js https://starb.in/sgChW2.js commands/unility/create-channel.js https://starb.in/Y7T6qn.js
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
Dude wtf
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
Mhm, wait
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
sry
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
The code looks like this now, but doesn't delete the channel as soon as I exit
36 replies
DIAdiscord.js - Imagine an app
Created by Maybe Ange on 3/4/2024 in #djs-voice
Delete voice channel if 0 user
I put it in but still nothing happens or maybe I'm crazy
36 replies