Send linkTrack errors to interaction channel

This commit is contained in:
2024-04-08 23:01:34 +02:00
committed by GitHub
parent e957444000
commit f55bd3d98a

View File

@@ -50,6 +50,7 @@ module.exports = {
clientSecret: spotify.clientSecret,
}),
async execute(interaction) {
try {
let token = await this.spotifyAPI.clientCredentialsGrant().then(
function(data) {
return data.body['access_token'];
@@ -185,6 +186,10 @@ module.exports = {
let response = await interaction.reply({content: 'done', ephemeral: true});
await response.delete();
} catch (error) {
await interaction.reply(`# FUCK \n ${JSON.stringify(error)}`.substring(0,200));
}
},
numToHumanReadable: function(num) {
if (num > 1000000 ) {