Test fix list-orphans
This commit is contained in:
parent
3bea94bee0
commit
d13a814bb6
|
@ -122,7 +122,7 @@ module.exports.execute = async (interaction) => {
|
||||||
break;
|
break;
|
||||||
case "list-orphans": // List all orphaned extensions (extensions without a Discord user linked)
|
case "list-orphans": // List all orphaned extensions (extensions without a Discord user linked)
|
||||||
await interaction.deferReply({ ephemeral: true });
|
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) {
|
if (orphans.length === 0) {
|
||||||
await interaction.editReply({ content: 'No orphaned extensions found!', ephemeral: true });
|
await interaction.editReply({ content: 'No orphaned extensions found!', ephemeral: true });
|
||||||
return;
|
return;
|
||||||
|
@ -133,7 +133,7 @@ module.exports.execute = async (interaction) => {
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
await interaction.reply({ content: 'Unknown subcommand!', ephemeral: true });
|
await interaction.reply({ content: 'Unknown subcommand!', ephemeral: true });
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue