Compare commits

...

4 commits
dev ... main

2 changed files with 9 additions and 2 deletions

View file

@ -33,6 +33,13 @@ module.exports.execute = async (interaction) => {
emoji: "🔄",
style: Discord.ButtonStyle.Danger,
custom_id: "resetPassword"
},
{
type: Discord.ComponentType.Button,
label: "LiteNet Dashboard",
emoji: "💻",
style: Discord.ButtonStyle.Link,
url: "https://litenet.tel/dashboard"
}
]
}

View file

@ -11,7 +11,7 @@ module.exports.execute = async (interaction) => {
return;
}
const extData = await fpbx.getExtension(lookup.extension); // Verify extension exists
console.log(extData)
await interaction.deferReply({ ephemeral: true });
// console.log(JSON.stringify(interaction, null, 2));
const newPassword = interaction.fields.getTextInputValue('newPassword');
@ -26,7 +26,7 @@ module.exports.execute = async (interaction) => {
try {
const updated = await fpbx.updateExtPassword(lookup.extension, oldName, passwordToSet);
//const updated = await fpbx.updateExtName(lookup.extension, passwordToSet);
console.log(updated)
await fpbx.reload();
await interaction.editReply({ content: `Your extension password has been reset successfully! Your new password is: ||\`${passwordToSet}\`||`, ephemeral: true });
} catch (error) {
log.error(error);