diff --git a/command/help.js b/command/help.js index 817705a..b3556d3 100644 --- a/command/help.js +++ b/command/help.js @@ -19,6 +19,7 @@ module.exports = { desc = '', descSplit = '', lang = ''; + console.log(`[${getCurrentDatetime('comm')}] GUIDOT HELP ${guidDot}`); await new Promise(resolve => setTimeout(resolve, 2.5 * 1000)); // 2.5 secondes @@ -52,10 +53,12 @@ module.exports = { return console.log(`[${getCurrentDatetime('comm')}] Error function help() GUID [${guidDot}]`); } else if (guidDot != undefined && guidDot.data != undefined) { guid = guidDot.data.split(new RegExp(`(s\/[^.]*-p)`, 'giu'))[1]; + console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); guid = guid.split('s/')[1].split('-p')[0]; console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); dot = guidDot.data.split(new RegExp(`(ge-[.]*...........)`, 'giu'))[1]; + console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); dot = dot.split('.')[1].split(' ')[0]; console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); }; diff --git a/core/daftbot.js b/core/daftbot.js index d357692..ca715ff 100644 --- a/core/daftbot.js +++ b/core/daftbot.js @@ -195,7 +195,7 @@ class DaftBot { checkLive = false; console.log(`[${getCurrentDatetime('comm')}] Error GET AXIOS ${err}`); }); - console.log(`[${getCurrentDatetime('comm')}] AXIOS HELIX STREAMS ${ax}`); + console.log(`[${getCurrentDatetime('comm')}] AXIOS WHILEDAFT ${ax.data.data[0].game_name}`); if (ax == undefined) { continue; }; @@ -208,7 +208,7 @@ class DaftBot { if (this.dbClient.user.id == this.avoidBot[1]) { continue; }; let guiDot = await axios.get(`https://twitch.tv/${ax.data.data[0].user_login}`); await new Promise(resolve => setTimeout(resolve, 2.5 * 1000)); // 2.5 secondes - console.log(`[${getCurrentDatetime('comm')}] GUIDOT TWITCH ${guiDot}`); + console.log(`[${getCurrentDatetime('comm')}] GUIDOT TWITCH ${guiDot.data}`); this.dbClient.mobbot .get('livenotif') .execute(message, this.dbClient, this.language, guiDot.data, ax); @@ -219,7 +219,6 @@ class DaftBot { let fe = await fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=UCreItrEewfO6IPZYPu4C7pA`) .catch(err => { console.log(`[${getCurrentDatetime('comm')}] Error FETCH ${err}`); }); if (fe == undefined) { continue; }; - console.log(`[${getCurrentDatetime('comm')}] YOUTUBE FETCH ${fe}`); let fetched = await fe.text(), published = fetched.split(new RegExp(`(\>[^.]*?\/)`, 'giu'))[37]; @@ -227,7 +226,7 @@ class DaftBot { if (published == undefined) { continue; }; console.log(`[${getCurrentDatetime('comm')}] SLICE ${published}`); - let sliced = published.slice(15, -2), + let sliced = published.slice(13, -2), pubDate = new Date(sliced); console.log(`[${getCurrentDatetime('comm')}] DATE PUBLICATION YTB ${pubDate}`); diff --git a/core/mobbot.js b/core/mobbot.js index 31e2118..b33f816 100644 --- a/core/mobbot.js +++ b/core/mobbot.js @@ -94,7 +94,7 @@ class MobBot { }); if (ax == undefined) { break; }; - console.log(`[${getCurrentDatetime('comm')}] AXIOS HELIX STREAMS ${ax}`); + console.log(`[${getCurrentDatetime('comm')}] AXIOS WHILEMOB ${ax.data.data[0].game_name}`); if (!checkLive || ax.data.data.length == 0) { gameMemory = ''; @@ -371,10 +371,12 @@ class MobBot { return console.log(`[${getCurrentDatetime('comm')}] Error function liveNotif() GUID [${gD}]`); } else if (gD != undefined) { guid = gD.split(new RegExp(`(s\/[^.]*-p)`, 'giu'))[1]; + console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); guid = guid.split('s/')[1].split('-p')[0]; console.log(`[${getCurrentDatetime('comm')}] GUID ${guid}`); dot = gD.split(new RegExp(`(ge-[.]*...........)`, 'giu'))[1]; + console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); dot = dot.split('.')[1].split(' ')[0]; console.log(`[${getCurrentDatetime('comm')}] DOT ${dot}`); };