I am making a commission bot so people open a ticket and then choose what category it is for but then I want it to ask for a budget wait for a response then store that input budget to be used in an embed to post to freelancers.
I've already tried storing as a constant and then calling it later but it doesn't want to work as I'm storing it in a different function.
msg.channel.awaitMessages(filter, { time: 60000, maxMatches: 1, errors: ['time'] })
        .then(messages => {
            msg.channel.send(`You've entered: ${messages.first().content}`);
            const budget = messages.first().content;
        })
        .catch(() => {
            msg.channel.send('You did not enter any input!');
        });
});
    if (messageReaction.emoji.name === reactions.one) {
        let web = new Discord.RichEmbed()
        .setDescription("Press the check to claim the comission")
        .setColor("#15f153")
        .addField("Client", `${message.author} with ID: ${message.author.id}`)
        .addField("Budget", `${budget}`)
        .addField("Time", message.createdAt)
        .addField("Requested Freelancer",`<@&603466765594525716>`)
        let tickets = message.guild.channels.find('name', "tickets")
        if(!tickets) return message.channel.send(`${message.author} Can't find tickets channel.`)
I want it to post the budget in the .addField budget section but instead, it just says the budget is not defined
 
     
    