Permalink
Browse files

upgrading ttapi and some bug fixes. fixes #17

  • Loading branch information...
1 parent 58f85c2 commit 483a6809081f477d519ead35a947c05e41800490 Mac Angell committed Mar 3, 2013
Showing with 20 additions and 19 deletions.
  1. +2 −3 lib/DjQueueAddOn.js
  2. +9 −0 lib/LastFmAddOn.js
  3. +1 −0 lib/domain/AchievementsTracker.js
  4. +7 −13 npm-shrinkwrap.json
  5. +1 −3 package.json
View
@@ -2,8 +2,7 @@
module.exports = function DjQueueAddOn(bot) {
- var clone = require('clone'),
- self = this,
+ var self = this,
currentDjs = {},
nextDjIndex = 0,
djQueue = [],
@@ -265,7 +264,7 @@ module.exports = function DjQueueAddOn(bot) {
},
connectHandler = function(data) {
var djs = bot.getCurrentDjsInRoom();
- currentDjs = clone(djs);
+ currentDjs = JSON.parse(JSON.stringify(djs));
isQueueActive = (djs.length >= self.options.djLimit.value);
if (isQueueActive) {
bot.speak('The DJ queue has been activated. Type /aq to add yourself to the queue.');
View
@@ -29,6 +29,9 @@ module.exports = function LastFmAddOn(bot) {
}
});
}
+ else {
+ replyFunc('There is no song playing at the moment.');
+ }
},
getSimilarArtist = function(msgData, issuerId, replyFunc) {
var currentSong = bot.getCurrentSong();
@@ -48,6 +51,9 @@ module.exports = function LastFmAddOn(bot) {
}
});
}
+ else {
+ replyFunc('There is no song playing at the moment.');
+ }
},
getSimilarSong = function(msgData, issuerId, replyFunc) {
var currentSong = bot.getCurrentSong();
@@ -69,6 +75,9 @@ module.exports = function LastFmAddOn(bot) {
}
});
}
+ else {
+ replyFunc('There is no song playing at the moment.');
+ }
};
this.name = 'lasfm';
@@ -59,6 +59,7 @@ var AchievementsTracker = function(dbConnectionString) {
});
}
var names = [];
+ doc.achievements = doc.achievements || [];
doc.achievements.forEach(function(ach) {
names.push(ach.name);
});
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -7,15 +7,13 @@
"version": "0.1.0",
"dependencies": {
"opter": "0.x.x",
- "ttapi": "1.x.x",
- "file-store": "0.x.x",
+ "ttapi": "2.x.x",
"twss": "0.x.x",
"express": "2.5.x",
"mongoose": "3.5.x",
"underscore": "1.x.x",
"moment": "1.x.x",
"eidetic": "0.1.x",
- "clone": "0.1.x",
"lastfm": "0.8.x"
},
"devDependencies": {

0 comments on commit 483a680

Please sign in to comment.