This commit is contained in:
Christopher Cookman 2026-06-14 12:29:24 -06:00
parent 330a769b88
commit 42bb858134

View file

@ -11,11 +11,6 @@ module.exports = (interaction, client, bvs) => {
return interaction.reply({ content: `You must be boosting the server to use this command.`, ephemeral: true }); return interaction.reply({ content: `You must be boosting the server to use this command.`, ephemeral: true });
} }
// Check that the member doesn't already have a number.
bvs.getPremiumDIDs().then(dids => {
const userDIDs = dids.filter(did => did.userId === interaction.user.id);
if (userDIDs.length === 0) {
const choice = interaction.options.getNumber('choice'); const choice = interaction.options.getNumber('choice');
if (!choice) { if (!choice) {
return interaction.reply({ content: `You must provide a choice from the latest run of \`/searchnumbers\`. Use \`/searchnumbers\` to see available DIDs and their corresponding choices.`, ephemeral: true }); return interaction.reply({ content: `You must provide a choice from the latest run of \`/searchnumbers\`. Use \`/searchnumbers\` to see available DIDs and their corresponding choices.`, ephemeral: true });
@ -60,6 +55,10 @@ module.exports = (interaction, client, bvs) => {
return interaction.reply({ content: `You must provide a choice from the latest run of \`/searchnumbers\`. Use \`/searchnumbers\` to see available DIDs and their corresponding choices.`, ephemeral: true }); return interaction.reply({ content: `You must provide a choice from the latest run of \`/searchnumbers\`. Use \`/searchnumbers\` to see available DIDs and their corresponding choices.`, ephemeral: true });
} }
// Check that the member doesn't already have a number.
bvs.getPremiumDIDs().then(dids => {
const userDIDs = dids.filter(did => did.userId === interaction.user.id);
if (userDIDs.length === 0) {
const dids = global.tempPurchasableDIDs[interaction.user.id]; const dids = global.tempPurchasableDIDs[interaction.user.id];
const index = parseInt(choice) - 1; const index = parseInt(choice) - 1;
if (isNaN(index) || index < 0 || index >= dids.length) { if (isNaN(index) || index < 0 || index >= dids.length) {