Added username changing

This commit is contained in:
hydrabolt
2015-08-20 18:31:20 +01:00
parent 6ade919bc3
commit c2607997dc
5 changed files with 73 additions and 25 deletions

View File

@@ -250,6 +250,20 @@ Commands[ "avatar" ] = {
}
}
Commands["setusername"] = {
oplevel : 2,
fn : function( bot, params, message ){
var name = getKey( params, "name", "Boris Johnson" );
bot.setUsername(name, function(err){
if(err)
bot.reply(message, err);
})
}
}
Commands[ "icon" ] = {
oplevel: 0,
fn: function( bot, params, message ) {

View File

@@ -31,9 +31,6 @@ hydrabot.on("debug", function(m){
console.time("hydrabotbenchmark");
hydrabot.login( BotConfig.email, BotConfig.password );
console.log( "Starting up..." );
var time = Date.now();
// When the bot is ready to go, output to the console