Clean up code

This commit is contained in:
Dragon Fire
2024-03-22 13:45:40 -04:00
parent 1a167bd3bc
commit 1b3c1c8909
+1 -5
View File
@@ -116,7 +116,7 @@ module.exports = class GuessSongCommand extends Command {
const result = {
id,
name: body.name,
shortName: await this.shortTrackName(body.name),
shortName: body.name.replace(demaster, ''),
artist: list(body.artists.map(artist => artist.name)),
preview: previewURL
};
@@ -131,10 +131,6 @@ module.exports = class GuessSongCommand extends Command {
return body.props.pageProps.state.data.entity.audioPreview.url;
}
shortTrackName(longName) {
return longName.replace(demaster, '');
}
async fetchToken() {
const { body } = await request
.post('https://accounts.spotify.com/api/token')