- Vortex.#1675
- Katılım
- 20 Eyl 2021
- Mesajlar
- 14
- Tepkime puanı
- 9
JavaScript:
///Komut dosyası açılıp içine yazılacaklar
let { MessageEmbed } = require('discord.js');
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
let Embed = new MessageEmbed().setAuthor(message.author.username, message.author.avatarURL({ dynamic: true })).setFooter(`Vortex.`);
if(!message.member.voice.channel) return message.channel.send(`Bir ses kanalında olmalısın!`);
if(!args[0]) return message.channel.send(`Bir üye belirtmelisin!`);
if(!user) return message.channel.send(`Geçerli bir üye belirtmelisn!`);
if(user.id == message.author.id) return message.channel.send(`Bu işlemi kendine uygulayamazsın!`);
if(!user.voice.channel) return message.channel.send(`Belirttiğin kullanıcı bir ses kanalında değil!`);
if(user.voice.channel.id == message.member.voice.channel.id) return message.channel.send(`Belittiğin üye ile zaten aynı ses kanalındasın!`);
message.channel.send(`${user.toString()}`, Embed.setDescription(`${message.member.toString()} kullanıcısı bulunduğun ( \`${user.voice.channel.name}\` ) ses kanalına gelmek istiyor. Kabul ediyormusun?`)).then(async msg => {//Vortex.
let reactions = ['✅', '❌'];
for (let reaction of reactions) await msg.react(reaction);
const accept = msg.createReactionCollector((reaction, user) => reaction.emoji.name == "✅" && user.id == user.id, { time: 25000 });
const deny = msg.createReactionCollector((reaction, user) => reaction.emoji.name == "❌" && user.id == user.id, { time: 25000 });
accept.on("collect", async reaction => {
accept.stop();
deny.stop();
await msg.edit(``, Embed.setDescription(`${user.toString()} kullanıcısı \`${user.voice.channel.name}\` isimli ses kanalına gelme isteğini kabul etti!`));
return message.member.voice.setChannel(user.voice.channel.id);
});
deny.on("collect", async reaction => {
accept.stop();
deny.stop();
return await msg.edit(`${message.member.toString()}`, Embed.setDescription(`${user.toString()} kullanıcısı \`${user.voice.channel.name}\` isimli ses kanalına gelme isteğini redd etti!`));
});
accept.on("end", async reaction => {
accept.stop();
deny.stop();
return await msg.edit(`${message.member.toString()}`, Embed.setDescription(`${user.toString()} kullanıcısı yanıt vermediği için istek redd edildi!`));
});
});//Vortex.
Son düzenleme: