const ClientDataManager = require('./ClientDataManagerExtension');
const RedisInterface = require('./RedisInterface');

module.exports = (options) => {
  const r = new RedisInterface(options);
  return (discordClient) => {
    // eslint-disable-next-line no-param-reassign
    discordClient.dataManager = new ClientDataManager(discordClient, r);
  };
};

@@ -113,16 +113,239 @@
 ace');%0A%0A
+function cleanObject(obj) %7B%0A  const out = %7B%7D;%0A  Object.keys(obj).forEach((key) =%3E %7B%0A    if (!(obj%5Bkey%5D instanceof Object) && obj%5Bkey%5D !== null && typeof obj%5Bkey%5D !== 'undefined') out%5Bkey%5D = obj%5Bkey%5D;%0A  %7D);%0A  return out;%0A%7D%0A%0A
 module.e
@@ -419,24 +419,17 @@
 return (
-discordC
+c
 lient) =
@@ -486,24 +486,17 @@
 ign%0A    
-discordC
+c
 lient.da
@@ -533,24 +533,423 @@
 ger(
-discordClient, r
+client, r);%0A    client.once('ready', () =%3E %7B%0A      const q = r.client.multi();%0A      client.users.map(u =%3E q.hmsetAsync(%60user:$%7Bu.id%7D%60, cleanObject(u)));%0A      client.channels.map(c =%3E q.hmsetAsync(%60channel:$%7Bc.id%7D%60, cleanObject(c)));%0A      client.guilds.map(g =%3E q.hmsetAsync(%60guild:$%7Bg.id%7D%60, cleanObject(g)));%0A      client.emojis.map(e =%3E q.hmsetAsync(%60emoji:$%7Be.id%7D%60, cleanObject(e)));%0A      q.execAsync();%0A    %7D
 );%0A 

fix stuff