mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
11 lines
259 B
JavaScript
11 lines
259 B
JavaScript
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" );
|
|
}
|
|
} );
|