title: Warning system, getting the reason(includes discord.js, quick.db)
body: <p>I want to know how I can get the reason and when I do .warnings @user it says the amount of warnings and reason. I have the amount of warnings clear, but not the reason. When I run this code it says &quot;Foot has 4 warning the reasons is [object Object]&quot; Foot is my account btw.</p>
  <p>I've tried db.fetch()
  I've tried db.add()
  I've tried db.get(<code>reason_${message.guild.id}_${user.id}_${reason}</code>;</p>
  <p>To be honest I don't know what I am doing wrong. It would be great if you guys helped :)</p>
  <pre><code>// This file is called warnings.js
  const Discord = require('discord.js');
  const db = require('quick.db');
  
      
  module.exports = {
      name: &quot;warnings&quot;,
      description: &quot;Check a users warnings&quot;,
  
      async run (client, message, args){
          const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author;
          const prefix = '.'
  
          let warnings = await db.get(`warnings_${message.guild.id}_${user.id}`);
          
  
  
          let reason = require('./warn') 
          if(warnings === null) warnings = 0;
          
          
          db.get(`reason_${message.guild.id}_${user.id}`, reason);
          message.channel.send(`**${user.username}** has *${warnings}* warning the reasons is ${reason}`);
  
  
          
          
  
  
          
      }
  }
  
  // This is my warn.js file 
  
  const Discord = require('discord.js');
  
  const db = require('quick.db');
  
  module.exports = {
      name: &quot;warn&quot;,
      description: &quot;Warn a member&quot;,
  
      async run (client, message, args) {
          if(!message.member.roles.cache.has('766359629672087603')) return;
  
          const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]);
  
          if(!user) return message.channel.send('Please specify a user, via mention or ID');
  
          if(user.bot) return message.channel.send('You can\'t warn bots');
  
  
      const prefix = &quot;.&quot;
  
          var reason = args.slice(1).join(&quot; &quot;);
  
          if(!reason) reason = 'Unspecified';
  
          var warnings = db.get(`warnings_${message.guild.id}_${user.id}`);
  
  
  
  
          const warnedEmbed = new Discord.MessageEmbed()
          .setColor('#00FF00')
          .setDescription(`${user.username} has been warned`) 
          .setFooter(&quot;read rules&quot;)
  
          if(warnings === null) {
              db.set(`warnings_${message.guild.id}_${user.id}`, 1);
              user.send(warnedEmbed)
              await message.channel.send()
          }
  
          if(warnings !== null){
              db.add(`warnings_${message.guild.id}_${user.id}`, 1)
              db.set(`reason_${message.guild.id}_${user.id}`, reason);
              user.send(`You were warned in ${message.guild.name} for the following reason: \`${reason}\``)
              await message.channel.send(warnedEmbed)
          }
  
  
  
     
         
  
          
      }
  }
  </code></pre>