From 224656de03d90c66f6e9bf8b71bb79ce05be8646 Mon Sep 17 00:00:00 2001 From: TheMonDon <11539895+TheMonDon@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:20:52 -0600 Subject: [PATCH] Add version 2 to required node-fetch's --- actions/get_stats_from_dbl_MOD.js | 2 +- actions/send_json_to_webapi_MOD.js | 2 +- actions/send_stats_to_botlist.me_MOD.js | 2 +- actions/send_stats_to_dbl_MOD.js | 2 +- actions/store_html_from_webpage_MOD.js | 2 +- actions/store_json_from_webapi_MOD.js | 2 +- actions/store_twitch_info_MOD.js | 2 +- actions/twitch_authentication_MOD.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/actions/get_stats_from_dbl_MOD.js b/actions/get_stats_from_dbl_MOD.js index b8f2a0eb..f8f0cea1 100644 --- a/actions/get_stats_from_dbl_MOD.js +++ b/actions/get_stats_from_dbl_MOD.js @@ -170,7 +170,7 @@ module.exports = { if (!topggToken) return console.log('Missing TopGG Token in Get Bot Stats From TopGG'); const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); fetch(`https://top.gg/api/bots/${botID}`, { method: 'GET', diff --git a/actions/send_json_to_webapi_MOD.js b/actions/send_json_to_webapi_MOD.js index a1ff4795..bf6465d8 100644 --- a/actions/send_json_to_webapi_MOD.js +++ b/actions/send_json_to_webapi_MOD.js @@ -164,7 +164,7 @@ module.exports = { const { Actions } = this.getDBM(); const Mods = this.getMods(); - const fetch = require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); let url = this.evalMessage(data.postUrl, cache); const method = this.evalMessage(data.method, cache); diff --git a/actions/send_stats_to_botlist.me_MOD.js b/actions/send_stats_to_botlist.me_MOD.js index a1063e36..c22cbae4 100644 --- a/actions/send_stats_to_botlist.me_MOD.js +++ b/actions/send_stats_to_botlist.me_MOD.js @@ -44,7 +44,7 @@ module.exports = { const token = this.evalMessage(data.token, cache); const info = parseInt(data.info, 10); const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const client = this.getDBM().Bot.bot; const body = { server_count: client.guilds.cache.size }; diff --git a/actions/send_stats_to_dbl_MOD.js b/actions/send_stats_to_dbl_MOD.js index 35c5a439..8993bf5c 100644 --- a/actions/send_stats_to_dbl_MOD.js +++ b/actions/send_stats_to_dbl_MOD.js @@ -48,7 +48,7 @@ module.exports = { const token = this.evalMessage(data.dblToken, cache); const info = parseInt(data.info, 10); const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const client = this.getDBM().Bot.bot; const body = [ diff --git a/actions/store_html_from_webpage_MOD.js b/actions/store_html_from_webpage_MOD.js index 9bee101c..815191f3 100644 --- a/actions/store_html_from_webpage_MOD.js +++ b/actions/store_html_from_webpage_MOD.js @@ -39,7 +39,7 @@ module.exports = { async action(cache) { const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const data = cache.actions[cache.index]; diff --git a/actions/store_json_from_webapi_MOD.js b/actions/store_json_from_webapi_MOD.js index d802cb72..107e5cb7 100644 --- a/actions/store_json_from_webapi_MOD.js +++ b/actions/store_json_from_webapi_MOD.js @@ -141,7 +141,7 @@ module.exports = { const data = cache.actions[cache.index]; const { Actions } = this.getDBM(); const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const debugMode = parseInt(data.debugMode, 10); const storage = parseInt(data.storage, 10); const varName = this.evalMessage(data.varName, cache); diff --git a/actions/store_twitch_info_MOD.js b/actions/store_twitch_info_MOD.js index 1796c453..7ba4ff1a 100644 --- a/actions/store_twitch_info_MOD.js +++ b/actions/store_twitch_info_MOD.js @@ -669,7 +669,7 @@ module.exports = { async action(cache) { const data = cache.actions[cache.index]; const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const input = this.evalMessage(data.input, cache); const clientID = this.evalMessage(data.clientid, cache); diff --git a/actions/twitch_authentication_MOD.js b/actions/twitch_authentication_MOD.js index 81e9f84d..7304f432 100644 --- a/actions/twitch_authentication_MOD.js +++ b/actions/twitch_authentication_MOD.js @@ -69,7 +69,7 @@ module.exports = { async action(cache) { const data = cache.actions[cache.index]; const Mods = this.getMods(); - const fetch = Mods.require('node-fetch'); + const fetch = Mods.require('node-fetch', '2'); const clientID = this.evalMessage(data.client_id, cache); const clientSecret = this.evalMessage(data.client_secret, cache); const info = parseInt(data.info, 10);