Send linkTrack errors to interaction channel
This commit is contained in:
@@ -50,6 +50,7 @@ module.exports = {
|
|||||||
clientSecret: spotify.clientSecret,
|
clientSecret: spotify.clientSecret,
|
||||||
}),
|
}),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
try {
|
||||||
let token = await this.spotifyAPI.clientCredentialsGrant().then(
|
let token = await this.spotifyAPI.clientCredentialsGrant().then(
|
||||||
function(data) {
|
function(data) {
|
||||||
return data.body['access_token'];
|
return data.body['access_token'];
|
||||||
@@ -185,6 +186,10 @@ module.exports = {
|
|||||||
|
|
||||||
let response = await interaction.reply({content: 'done', ephemeral: true});
|
let response = await interaction.reply({content: 'done', ephemeral: true});
|
||||||
await response.delete();
|
await response.delete();
|
||||||
|
} catch (error) {
|
||||||
|
await interaction.reply(`# FUCK \n ${JSON.stringify(error)}`.substring(0,200));
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
numToHumanReadable: function(num) {
|
numToHumanReadable: function(num) {
|
||||||
if (num > 1000000 ) {
|
if (num > 1000000 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user