Prepare examples for v12 (#1382)

This commit is contained in:
Gus Caplan
2017-04-15 18:50:37 -05:00
committed by Amish Shah
parent 4aa82b4fdf
commit 15723ece1f
3 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ client.on('guildMemberAdd', member => {
const channel = client.channels.get(channelID);
// send the message, mentioning the member
channel.sendMessage(`Welcome to the server, ${member}!`);
channel.send(`Welcome to the server, ${member}!`);
});
// log our bot in

View File

@@ -22,7 +22,7 @@ client.on('message', message => {
// if the message is "ping",
if (message.content === 'ping') {
// send "pong" to the same channel.
message.channel.sendMessage('pong');
message.channel.send('pong');
}
});

View File

@@ -9,4 +9,4 @@ const Discord = require('discord.js');
const hook = new Discord.WebhookClient('webhook id', 'webhook token');
// send a message using the webhook
hook.sendMessage('I am now alive!');
hook.send('I am now alive!');