/*
 * patron.js - The cleanest command framework for discord.js and eris.
 * Copyright (C) 2019  patron.js contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
import fs from "fs";
import path from "path";

const erisPath = path.join(import.meta.url, "../types/eris.d.ts");
const djsPath = path.join(import.meta.url, "../types/djs.d.ts");
const libPath = path.join(import.meta.url, "../types/lib.d.ts");

Promise.all([import("eris"), import("discord.js")]).catch(err => {
  if(err.message.includes("eris")) {
    fs.unlinkSync(djsPath);
    fs.renameSync(erisPath, libPath);
  }else{
    fs.unlinkSync(erisPath);
    fs.renameSync(djsPath, libPath);
  }
});

@@ -858,24 +858,27 @@
 ta.url, %22../
+../
 types/eris.d
@@ -927,24 +927,27 @@
 ta.url, %22../
+../
 types/djs.d.
@@ -999,16 +999,19 @@
 rl, %22../
+../
 types/li

correct postinstall folder