client.on('interactionCreate', async (interaction) => { try { const RestrictedUsers = await Restricted.findOne({ where: { user: interaction.user.id } }) console.log(RestrictedUsers.user) if (RestrictedUsers.user == interaction.user.id) return interaction.reply('no'); } catch {}; const command = client.commands.get(interaction.commandName); if (!command) return; try { await command.execute(interaction); } catch (error) { console.error(error); await interaction.reply({ embeds: [errorEmbed], ephemeral: true }); } }); client.on(Events.InteractionCreate, interaction => { if (!interaction.isButton()) return; }); if (interaction.isModalSubmit()) { if (interaction.customId === 'PatrolLog') { const StartTimeInput = interaction.fields.fields.getTextInputValue(StartTime); const EndTimeInput = interaction.fields.fields.getTextInputValue(EndTime); const StartProofInput = interaction.fields.fields.getTextInputValue(StartProof); const EndProofInput = interaction.fields.fields.getTextInputValue(EndProof); const TotalTimeInput = interaction.fields.fields.getTextInputValue(TotalTime); const PendingEmbed = new EmbedBuilder() .setColor(0x0099FF) .setTitle('Patrol Log Submission') .setDescription(`${StartTimeInput}`) .setThumbnail('https://cdn.discordapp.com/attachments/925850735697068042/1039891607568273428/USAF.png') .setTimestamp() .setFooter({ text: 'Bot made by AmNobCop' }); interaction.followUp(`${interaction.user.tag}, your patrol log has been submitted. You will get a notice in your Direct Messages on the status of your log.`) ApproveChl.send({ embeds: [PendingEmbed] }) }} client.login(token);