title: How to log user input to use in a later embed with discordjs
body: <p>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.</p>
  
  <p>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.</p>
  
  <pre><code>msg.channel.awaitMessages(filter, { time: 60000, maxMatches: 1, errors: ['time'] })
          .then(messages =&gt; {
              msg.channel.send(`You've entered: ${messages.first().content}`);
              const budget = messages.first().content;
          })
          .catch(() =&gt; {
              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",`&lt;@&amp;603466765594525716&gt;`)
  
          let tickets = message.guild.channels.find('name', "tickets")
          if(!tickets) return message.channel.send(`${message.author} Can't find tickets channel.`)
  </code></pre>
  
  <p>I want it to post the budget in the .addField budget section but instead, it just says the budget is not defined</p>