39 lines
959 B
JavaScript
39 lines
959 B
JavaScript
const pool = global.pool
|
|
const fpbx = global.fpbx
|
|
const client = global.client
|
|
const log = global.log
|
|
|
|
module.exports = {};
|
|
|
|
module.exports.execute = async (interaction) => {
|
|
const [lookup] = await pool.query('SELECT * FROM discord_users WHERE discordId = ?', [interaction.user.id]);
|
|
if (!lookup) {
|
|
await interaction.reply({ content: `We're sorry, It doesn't look like you have an extension!`, ephemeral: true });
|
|
return;
|
|
}
|
|
interaction.showModal({
|
|
title: 'Reset Extension Password',
|
|
customId: 'resetPasswordModal',
|
|
label: 'Reset Extension Password',
|
|
components: [
|
|
{
|
|
type: 1, // Action Row
|
|
components: [
|
|
{
|
|
type: 18, // Label
|
|
label: "New Password. Leave blank for random.",
|
|
components: [ {
|
|
type: 4, // Text Input
|
|
customId: 'newPassword',
|
|
style: 1,
|
|
min_length: 6,
|
|
max_length: 64,
|
|
placeholder: 'New Password',
|
|
required: false
|
|
} ]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
});
|
|
} |