mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Clean up code
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user