19 lines
589 B
JavaScript
19 lines
589 B
JavaScript
const pool = global.pool
|
|
const fpbx = global.fpbx
|
|
const client = global.client
|
|
const log = global.log
|
|
|
|
module.exports = {};
|
|
|
|
module.exports.execute = async (interaction) => {
|
|
const findExt = interaction.options.getInteger('extension');
|
|
const [lookup] = await pool.query('SELECT * FROM discord_users WHERE extension = ?', [findExt]);
|
|
|
|
if (!lookup) {
|
|
await interaction.reply({ content: `No linked Discord account found for extension ${findExt}`, ephemeral: true });
|
|
return;
|
|
}
|
|
|
|
await interaction.reply({ content: `${findExt} belongs to <@${lookup.discordId}>`, ephemeral: true });
|
|
|
|
} |