small fixes to hb

This commit is contained in:
hydrabolt
2015-08-15 21:06:19 +01:00
parent 73e9e9ec4c
commit 44a9844e0c
2 changed files with 12 additions and 3 deletions

View File

@@ -205,6 +205,8 @@ Commands[ "feedback" ] = {
bot.getChannelLogs( message.channel, amount, function( err, logs ) {
console.log(logs);
if ( err ) {
bot.reply( message, "an error occurred when grabbing the logs.", false, {
selfDestruct: 3000
@@ -215,7 +217,7 @@ Commands[ "feedback" ] = {
for ( msg of logs.contents ) {
if ( ~msg.content.indexOf( "[request" ) || ~msg.content.indexOf( "[feature" || ~msg.content.indexOf( "[suggestion") ) ) {
if(msg.content.length > 15){
if(msg.content.length > 10){
found.push( msg );
}
}
@@ -229,7 +231,9 @@ Commands[ "feedback" ] = {
} );
bot.reply( message, "I found " + found.length + " result(s) that matched this. I'll send it to you in a PM." );
bot.reply( message, "I found " + found.length + " result(s) that matched this. I'll send it to you in a PM.", false, {
selfDestruct : 3000
} );
function gothroughit() {
for ( msg of found ) {