Temporary solution

This commit is contained in:
Christer Warén
2021-09-08 01:39:35 +03:00
parent 5cd3912ff5
commit ac323a5410
3 changed files with 28 additions and 26 deletions

View File

@ -1,5 +1,6 @@
import Discord from "discord.js";
import fetch from "node-fetch";
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
module.exports = {
name: 'maintenance',

View File

@ -1,5 +1,6 @@
import Datastore from "../datastore.js";
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
const _importDynamic = new Function('modulePath', 'return import(modulePath)');
const fetch = (...args) => _importDynamic('node-fetch').then(({default: fetch}) => fetch(...args));
module.exports = {
name: 'ready',