diff --git a/src/inc/trigger/lastfm.mjs b/src/inc/trigger/lastfm.mjs index 11ec634..fc631bc 100644 --- a/src/inc/trigger/lastfm.mjs +++ b/src/inc/trigger/lastfm.mjs @@ -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]`); } }]; };