07-06-2022, 02:36 AM
İzmox Theme
Alıntı:Kod:Main
client.on('messageCreate', async message => {
if (message.content === '!destek') {
let kisi = message.member
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('success')
.setLabel('destek')
.setStyle('SUCCESS'),
);
await message.reply({ content: 'rolünü seç bakalım!', components: [row] });
const collector = message.channel.createMessageComponentCollector({ time: 15000 });
collector.on('collect', async i => {
if (i.customId === 'success') {
await i.update({ content: 'butona tıkla', components: [] });
let channelName = message.author.username
let rol = "destek ekibi"
message.guild.channels.create(channelName, {
type: "GUILD_TEXT",
permissionOverwrites: [
{
id: message.guild.roles.everyone,
deny: ["VIEW_CHANNEL"],
},
{
id: message.author.id,
allow: ["VIEW_CHANNEL"],
},
{
id: rol,
allow: ["VIEW_CHANNEL"],
},
],
}); }
});
}
});
07-06-2022, 05:49 AM
İzmox Theme
Görüntüleyenler: 2 Ziyaretçi