title: Discord.js - TypeError: client.on is not a function
body: <p>I am making a chatbot but I keep getting this error:</p>
  <pre class="lang-js prettyprint-override"><code>TypeError: client.on is not a function
  </code></pre>
  <p><strong>The event code:</strong></p>
  <pre class="lang-js prettyprint-override"><code>const { chatBot } = require('reconlx');
  const client = require('../app');
  const Schema = require('../database/models/chatbot-channel');
  
  client.on(&quot;message&quot;, async (message) =&gt;{
      if(!message.guild || message.author.bot) return;
      Schema.findOne({ Guild: message.guild.id }, async(err, data) =&gt; {
          if(!data) return;
          if(message.channel.id !== data.Channel) return;
          chatBot(message, message.content, message.author.id);
      });
  });
  </code></pre>
  <p><strong>The model I am using:</strong></p>
  <pre class="lang-js prettyprint-override"><code>const { Schema, model } = require('mongoose');
  
  model.models = model(
      &quot;chatbot&quot;, 
      new Schema({
          Guild: String,
          Channel: String,
      })
  );
  </code></pre>
  <p><strong>The set channel command:</strong></p>
  <pre class="lang-js prettyprint-override"><code>const mongoose = require('mongoose');
  const { Client, Message, MessageEmbed } = require('discord.js');
  const Schema = require('../database/models/chatbot-channel');
  
  module.exports = {
      name: 'set-chatbot',
      description: 'sets a channel for a chatbot!',
      devOnly: true,
      async execute(message, args, client) {
          const channel = message.mentions.channels.first() || message.channel;
          Schema.findOne({ Guild: message.guild.id }, async(err, data) =&gt; {
              if(data) data.delete();
              new Schema({
                  Guild: message.guild.id,
                  Channel: channel.id,
              }).save();
              message.channel.send(`Saved Chatbot Channel To ${channel}`);
          });
      },
  };
  </code></pre>
  <p>Does anyone know what I did wrong? I don't see the mistake.</p>