Temporarily disable the fmtt command
This commit is contained in:
parent
797c2b0118
commit
5f6949bc2e
2 changed files with 4 additions and 18 deletions
|
@ -26,7 +26,8 @@ module.exports = {
|
||||||
case "toptracks":
|
case "toptracks":
|
||||||
case "tt":
|
case "tt":
|
||||||
args.shift();
|
args.shift();
|
||||||
sendText.text = await getTopTracks(message.author.id, args);
|
//sendText.text = await getTopTracks(message.author.id, args);
|
||||||
|
sendText.text = "This command is currently being rewritten, come back later."
|
||||||
break;
|
break;
|
||||||
case "cover":
|
case "cover":
|
||||||
sendText = await getCurrentCover(message.author.id, message.guild);
|
sendText = await getCurrentCover(message.author.id, message.guild);
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
// http://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=username&api_key=YOUR_API_KEY&format=json
|
// http://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=username&api_key=YOUR_API_KEY&format=json
|
||||||
const Discord = require('discord.js');
|
|
||||||
const getFmUsername = require("./getFmUsername")
|
|
||||||
|
|
||||||
module.exports = async function (userID, option) {
|
module.exports = async function (lastfmUsername, option) {
|
||||||
let lastfmUsername = await getFmUsername(userID);
|
|
||||||
let sendText = {text: "", embed: null};
|
|
||||||
let tracks = [];
|
let tracks = [];
|
||||||
const options = {
|
const options = {
|
||||||
"alltime": "overall",
|
"alltime": "overall",
|
||||||
|
@ -65,17 +61,6 @@ module.exports = async function (userID, option) {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
let author = `Top ${duration} tracks for ${lastfmUsername}:\n`;
|
|
||||||
let toptracks = "";
|
|
||||||
for(let i = 0; i < tracks.length; i++){
|
|
||||||
sendText += `${i}. ${tracks[i].artist} - ${tracks[i].song} (${tracks[i].playcount} plays)\n`;
|
|
||||||
}
|
}
|
||||||
const embed = new Discord.MessageEmbed()
|
return tracks;
|
||||||
.setAuthor(`Now playing - ${nickname}`, user.user.avatarURL({ dynamic: true, size: 4096 }))
|
|
||||||
.setColor(15780145)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
sendText.text = "You haven't set your last.fm username yet. Use `fm set <lastfm_username>` to set it.";
|
|
||||||
}
|
|
||||||
return sendText;
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue