mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
added examples
This commit is contained in:
10
examples/pingpong.js
Normal file
10
examples/pingpong.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var Discord = require( "discord.js" );
|
||||
var myBot = new Discord.Client();
|
||||
|
||||
myBot.login( "hello@example.com", "password1" );
|
||||
|
||||
myBot.on( "message", function( message ) {
|
||||
if ( message.content === "ping" ) {
|
||||
this.sendMessage( message.channel, "pong" );
|
||||
}
|
||||
} );
|
||||
Reference in New Issue
Block a user