just basically trying to log the title, artist and track duration but getting the following log in console:
Error in script: TypeError: Cannot access member 'title' of undefined
And here is the code:
Code:
registerPlugin({
name: 'Testing',
version: '1.0',
description: 'Testing',
author: 'Alw3ys <[email protected]>',
vars: {},
autorun: true
}, function(sinusbot, config) {
var event = require('event');
event.on('track', function(trackEvent) {
var engine = require('engine');
var track = trackEvent.track;
engine.log(track.title() + '\n' + track.artist() + '\n' + String.valueOf(track.duration()));
});
});
I'm pretty sure artist and trackduration will use return me the following error but is unreachable at the moment.
I just wanna know what do I should istead of trackEvent.track.title() to get the track title.