//require('dotenv').config(); const app = require('./commands/utility/ButtonManageApp') const deployment = require('./Deployment') const db = require('./config/db.config') const TicketDB = require('./config/models/Tickets.model') const gettersDB = require('./config/models/getters.model') // Discord.js versions ^13.0 require us to explicitly define client intents const { Client, GatewayIntentBits, ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder, Events, ModalBuilder, TextInputBuilder, TextInputStyle, EmbedBuilder, ChannelType, GuildDefaultMessageNotifications, PermissionsBitField } = require('discord.js'); const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers ] }) client.on('ready', async () => { /*const guild = await client.guilds.cache.get('1060487682557497414'); await guild.leave();*/ console.log('Command') new SlashCommandBuilder() .setName('manage') .setDescription('Provides information about the user.') console.log(`Logged in as ${client.user.tag}!`); }); /*function managing_application(channel_id) { const channelTicket = client.channels.cache.get("1179486079552856275") client.on(Events.InteractionCreate, async interaction => { //if(interaction.options.data !== '!manageModal') return; console.log(interaction) const confirm = new ButtonBuilder() .setCustomId('Submit') .setLabel('تقديم') .setStyle(ButtonStyle.Danger); /*const cancel = new ButtonBuilder() .setCustomId('cancel') .setLabel('Cancel') .setStyle(ButtonStyle.Secondary);*//* const row = new ActionRowBuilder() .addComponents(cancel, confirm); const response = await channel.send({ content: `للتقديم للادارة اضغط الزر ادناه:`, components: [row], }); ///const collectorFilter = i => i.user.id === interaction.user.id; try { const confirmation = await response.awaitMessageComponent({ time: 60_000 }); // filter: console.log(confirmation) if (confirmation.customId === 'Submit') { const modal = new ModalBuilder() .setCustomId('ManagingModal') .setTitle('التقديم للإدارة'); // Add components to modal // Create the text input components const Name = new TextInputBuilder() .setCustomId('YourName') // The label is the prompt the user sees for this input .setLabel("اسمك الكريم:") // Short means only a single line of text .setStyle(TextInputStyle.Short); const Age = new TextInputBuilder() .setCustomId('YourAge') // The label is the prompt the user sees for this input .setLabel("عمرك:") // Short means only a single line of text .setStyle(TextInputStyle.Short); const InteractionHours = new TextInputBuilder() .setCustomId('interactionHouts') .setLabel("كم ساعة تقدر تتفاعل/تنظم في اليوم؟") // Paragraph means multiple lines of text. .setStyle(TextInputStyle.Short); // There is also a paragraph option instead of Short If you want one like "