From f8268256e35fb5ab84b67772fb1393bc338419a7 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 12 Sep 2024 11:45:57 +0200 Subject: [PATCH] Add a compatibility mode for getTopTracks --- util/lastfm/getTopTracks.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/lastfm/getTopTracks.js b/util/lastfm/getTopTracks.js index 284c19a..d58dc64 100644 --- a/util/lastfm/getTopTracks.js +++ b/util/lastfm/getTopTracks.js @@ -5,7 +5,7 @@ const Discord = require('discord.js'); const getNickname = require('../getNickname') const parseMention = require('../parseMention') -module.exports = async function (userID, option, guild) { +module.exports = async function (userID, option, guild, compatibility=false) { let lastfmUsername = await getFmUsername(userID) let parse = parseMention(userID, guild) let user = guild.members.cache.get(parse); @@ -111,5 +111,9 @@ module.exports = async function (userID, option, guild) { name: ` `, value: `${tracksInfo}` },) sendText.embed = embed; - return sendText; + if(compatibility) + return tracks; + else + return sendText; + } \ No newline at end of file