oopsie.
This commit is contained in:
parent
d6a737931a
commit
cd606aa6eb
|
@ -17,10 +17,8 @@ export default async bot => {
|
|||
const nick = e.args[0] || e.user.nick;
|
||||
|
||||
let res = await (await fetch(`${api}${nick}`)).json();
|
||||
if(res.error) return {
|
||||
err: true,
|
||||
msg: "User not found"
|
||||
};
|
||||
if(res.error)
|
||||
return e.reply("User not found");
|
||||
|
||||
res = res.recenttracks;
|
||||
const track = res.track[0];
|
||||
|
@ -30,14 +28,9 @@ export default async bot => {
|
|||
playing: track["@attr"] ? true : false
|
||||
};
|
||||
|
||||
return {
|
||||
err: false,
|
||||
mode: "normal",
|
||||
msg: info.playing ?
|
||||
`[b]${info.user}[/b] is listening to [b]${info.track}[/b]` :
|
||||
`[b]${info.user}[/b] is not listening to anything. They last listened to [b]${info.track}[/b]`
|
||||
};
|
||||
|
||||
return e.reply(info.playing ?
|
||||
`[b]${info.user}[/b] is listening to [b]${info.track}[/b]` :
|
||||
`[b]${info.user}[/b] is not listening to anything. They last listened to [b]${info.track}[/b]`);
|
||||
}
|
||||
}];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user