mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
added examples
This commit is contained in:
8
examples/presence.js
Normal file
8
examples/presence.js
Normal 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 + "!" );
|
||||
} );
|
||||
Reference in New Issue
Block a user