Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02234305c | ||
|
|
c677392f6d | ||
|
|
de9817e576 | ||
|
|
1a19ca954d |
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue