Test fix list-orphans
This commit is contained in:
parent
3bea94bee0
commit
d13a814bb6
|
@ -122,7 +122,7 @@ module.exports.execute = async (interaction) => {
|
|||
break;
|
||||
case "list-orphans": // List all orphaned extensions (extensions without a Discord user linked)
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
const [orphans] = await pool.query('SELECT id,description FROM asterisk.devices WHERE id NOT IN (SELECT extension FROM asterisk.discord_users)');
|
||||
const orphans = await pool.query('SELECT id,description FROM asterisk.devices WHERE id NOT IN (SELECT extension FROM asterisk.discord_users)');
|
||||
if (orphans.length === 0) {
|
||||
await interaction.editReply({ content: 'No orphaned extensions found!', ephemeral: true });
|
||||
return;
|
||||
|
@ -133,7 +133,7 @@ module.exports.execute = async (interaction) => {
|
|||
ephemeral: true
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
await interaction.reply({ content: 'Unknown subcommand!', ephemeral: true });
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue