Fr³oN || تم النقل الي {6h3h}
Fr³oN || تم النقل الي {6h3h}
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 6/2/2024 in #djs-questions
Get Guilds Members
how can i get the guilds member using accessToken
4 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 5/30/2024 in #djs-questions
How ??
No description
15 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 5/30/2024 in #djs-questions
screen share bot
how can i make bot can make screen share
33 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 1/25/2024 in #djs-questions
Not Work
module.exports = {
name: 'add_client',
description: 'Give client role to the member',
options: [
{
name: 'user',
type: 6,
description: 'The user you want give him client role',
required: true,
},
],
run: async (client, interaction) => {
try {
const user = await client.users.fetch(interaction.options.getMember('user'));
const member1 = await interaction.guild.members.fetch(user);

if (!interaction.member.roles.cache.has(interaction.guild.roles.cache.find(role => role.name === 'd'))) {
return interaction.reply({ content: 'انت لست مصمم لا يمكنك استخدام هذا الأمر', ephemeral: true });
} else{
let role1 = interaction.guild.roles.cache.find(role => role.id === '1200195571839930409')
member1.roles.add(role1)
}

} catch (error) {
console.error(error);
interaction.reply({ content: 'حدث خطأ أثناء معالجة الطلب.', ephemeral: true });
}
},
};
module.exports = {
name: 'add_client',
description: 'Give client role to the member',
options: [
{
name: 'user',
type: 6,
description: 'The user you want give him client role',
required: true,
},
],
run: async (client, interaction) => {
try {
const user = await client.users.fetch(interaction.options.getMember('user'));
const member1 = await interaction.guild.members.fetch(user);

if (!interaction.member.roles.cache.has(interaction.guild.roles.cache.find(role => role.name === 'd'))) {
return interaction.reply({ content: 'انت لست مصمم لا يمكنك استخدام هذا الأمر', ephemeral: true });
} else{
let role1 = interaction.guild.roles.cache.find(role => role.id === '1200195571839930409')
member1.roles.add(role1)
}

} catch (error) {
console.error(error);
interaction.reply({ content: 'حدث خطأ أثناء معالجة الطلب.', ephemeral: true });
}
},
};
43 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 1/20/2024 in #djs-questions
The reply to this interaction has not been sent or deferred. / Interaction has already been acknowle
2 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 1/20/2024 in #djs-questions
The reply to this interaction has not been sent or deferred. / Interaction has already been acknowle
js
js
11 replies
DIAdiscord.js - Imagine an app
Created by Fr³oN || تم النقل الي {6h3h} on 1/19/2024 in #djs-questions
Why Modal Isn't Open
const { MessageActionRow, MessageButton, Modal, TextInputComponent } = require('discord.js');

module.exports = {
name: 'panel',
description: 'Send Panel',
run: async (client, interaction) => {
try {
const button1 = new MessageButton()
.setCustomId('btn1')
.setLabel('Avatar')
.setStyle('PRIMARY');
const button2 = new MessageButton()
.setCustomId('btn2')
.setLabel('Banner')
.setStyle('PRIMARY');

const button3 = new MessageButton()
.setCustomId('btn3')
.setLabel('User')
.setStyle('PRIMARY');

const button4 = new MessageButton()
.setCustomId('btn4')
.setLabel('Download')
.setStyle('PRIMARY');

const row = new MessageActionRow().addComponents(button1, button2, button3, button4);

const embed = {
color: 0x00000,
title: '**لوحة التحكم**',
thumbnail: {
url: 'https://images-ext-1.discordapp.net/external/f94w4Kx7LEwxrt7Po7bYzflGr20B_til4p1WuxUHGsY/https/res.cloudinary.com/ferv/image/upload/v1698479059/icons/nhzok0alt9fhorojec0b.png?format=webp&quality=lossless&width=473&height=473',
},
description: 'للحصول على افتار شخص أو البنر أو لتحميل مقاطع الفيديو من التيك توك أو الإنستقرام أو اليوتيوب استخدم الأزرار',
};

await interaction.reply({ embeds: [embed], components: [row] });

const collector = interaction.channel.createMessageComponentCollector({
componentType: 'BUTTON',
});

collector.on('collect', async i => {
if (i.customId === 'btn1') {
const modal = new Modal()
.setCustomId('myModal')
.setTitle('My Modal');

const idform = new TextInputComponent()
.setCustomId('idd')
.setLabel("يرجى ادخال ايدي الشخص")


const firstActionRow = new MessageActionRow().addComponents(idform);

modal.addComponents(firstActionRow);
await i.reply({ content: " ", components: [modal] });
}
});
} catch (error) {
console.error(error);
await interaction.reply({ content: 'حدث خطأ أثناء معالجة الطلب.', ephemeral: true });
}
},
};
const { MessageActionRow, MessageButton, Modal, TextInputComponent } = require('discord.js');

module.exports = {
name: 'panel',
description: 'Send Panel',
run: async (client, interaction) => {
try {
const button1 = new MessageButton()
.setCustomId('btn1')
.setLabel('Avatar')
.setStyle('PRIMARY');
const button2 = new MessageButton()
.setCustomId('btn2')
.setLabel('Banner')
.setStyle('PRIMARY');

const button3 = new MessageButton()
.setCustomId('btn3')
.setLabel('User')
.setStyle('PRIMARY');

const button4 = new MessageButton()
.setCustomId('btn4')
.setLabel('Download')
.setStyle('PRIMARY');

const row = new MessageActionRow().addComponents(button1, button2, button3, button4);

const embed = {
color: 0x00000,
title: '**لوحة التحكم**',
thumbnail: {
url: 'https://images-ext-1.discordapp.net/external/f94w4Kx7LEwxrt7Po7bYzflGr20B_til4p1WuxUHGsY/https/res.cloudinary.com/ferv/image/upload/v1698479059/icons/nhzok0alt9fhorojec0b.png?format=webp&quality=lossless&width=473&height=473',
},
description: 'للحصول على افتار شخص أو البنر أو لتحميل مقاطع الفيديو من التيك توك أو الإنستقرام أو اليوتيوب استخدم الأزرار',
};

await interaction.reply({ embeds: [embed], components: [row] });

const collector = interaction.channel.createMessageComponentCollector({
componentType: 'BUTTON',
});

collector.on('collect', async i => {
if (i.customId === 'btn1') {
const modal = new Modal()
.setCustomId('myModal')
.setTitle('My Modal');

const idform = new TextInputComponent()
.setCustomId('idd')
.setLabel("يرجى ادخال ايدي الشخص")


const firstActionRow = new MessageActionRow().addComponents(idform);

modal.addComponents(firstActionRow);
await i.reply({ content: " ", components: [modal] });
}
});
} catch (error) {
console.error(error);
await interaction.reply({ content: 'حدث خطأ أثناء معالجة الطلب.', ephemeral: true });
}
},
};
21 replies