added examples

This commit is contained in:
hydrabolt
2015-08-12 11:51:08 +01:00
parent af3dce6122
commit ddf74b76d8
3 changed files with 34 additions and 0 deletions

8
examples/presence.js Normal file
View File

@@ -0,0 +1,8 @@
var Discord = require( "discord.js" );
var myBot = new Discord.Client();
myBot.login( "hello@example.com", "password1" );
myBot.on( "presence", function( user, status, server ) {
bot.sendMessage( server.getDefaultChannel(), user.mention() + " is " + status + "!" );
} );