Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02234305c | ||
|
|
c677392f6d | ||
|
|
de9817e576 | ||
|
|
1a19ca954d |
|
|
@ -33,6 +33,13 @@ module.exports.execute = async (interaction) => {
|
||||||
emoji: "🔄",
|
emoji: "🔄",
|
||||||
style: Discord.ButtonStyle.Danger,
|
style: Discord.ButtonStyle.Danger,
|
||||||
custom_id: "resetPassword"
|
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;
|
return;
|
||||||
}
|
}
|
||||||
const extData = await fpbx.getExtension(lookup.extension); // Verify extension exists
|
const extData = await fpbx.getExtension(lookup.extension); // Verify extension exists
|
||||||
console.log(extData)
|
|
||||||
await interaction.deferReply({ ephemeral: true });
|
await interaction.deferReply({ ephemeral: true });
|
||||||
// console.log(JSON.stringify(interaction, null, 2));
|
// console.log(JSON.stringify(interaction, null, 2));
|
||||||
const newPassword = interaction.fields.getTextInputValue('newPassword');
|
const newPassword = interaction.fields.getTextInputValue('newPassword');
|
||||||
|
|
@ -26,7 +26,7 @@ module.exports.execute = async (interaction) => {
|
||||||
try {
|
try {
|
||||||
const updated = await fpbx.updateExtPassword(lookup.extension, oldName, passwordToSet);
|
const updated = await fpbx.updateExtPassword(lookup.extension, oldName, passwordToSet);
|
||||||
//const updated = await fpbx.updateExtName(lookup.extension, 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 });
|
await interaction.editReply({ content: `Your extension password has been reset successfully! Your new password is: ||\`${passwordToSet}\`||`, ephemeral: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(error);
|
log.error(error);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue