Add missing db feilds

This commit is contained in:
Christopher Cookman 2026-06-14 12:45:28 -06:00
parent c9814cfdc0
commit 7f99c0ac29

View file

@ -41,7 +41,7 @@ module.exports = (interaction, client, bvs) => {
console.log(`Successfully purchased DID ${didToPurchase} for user ${interaction.user.id}`); console.log(`Successfully purchased DID ${didToPurchase} for user ${interaction.user.id}`);
const extension = results[0].extension; const extension = results[0].extension;
// insert into incoming, set extension = "+{did}", destination = from-did-direct,{extension},1, description = "NitroDID For {displayName} ({discordId})" // insert into incoming, set extension = "+{did}", destination = from-did-direct,{extension},1, description = "NitroDID For {displayName} ({discordId})"
global.db.query("INSERT INTO incoming (extension, destination, description) VALUES (?, ?, ?)", [`+${didToPurchase}`, `from-did-direct,${extension},1`, `NitroDID For ${interaction.user.displayName} (${interaction.user.id})`]).then(() => { global.db.query("INSERT INTO incoming (extension, destination, description, pricid, fanswer, cidnum, pmmaxretries, ringing, pmminlength, alertinfo, delay_answer, grppre, privacyman, reversal) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [`+1${didToPurchase}`, `from-did-direct,${extension},1`, `NitroDID For ${interaction.user.displayName} (${interaction.user.id})`, '', '', '', '3', '', '10', '', 0, '', 0, '']).then(() => {
interaction.editReply({ content: `Successfully purchased DID \`${bvs.formatPhoneNumber(didToPurchase)}\`. It may take a few minutes for the purchase to fully process. Please allow up to 5 hours for the number to become active. If you are having issues, please contact support!`, ephemeral: true }); interaction.editReply({ content: `Successfully purchased DID \`${bvs.formatPhoneNumber(didToPurchase)}\`. It may take a few minutes for the purchase to fully process. Please allow up to 5 hours for the number to become active. If you are having issues, please contact support!`, ephemeral: true });
// Run `fwconsole reload` on host // Run `fwconsole reload` on host
const { exec } = require("child_process"); const { exec } = require("child_process");