mirror of
https://github.com/danbulant/discord.js
synced 2026-06-22 08:12:23 +00:00
Prepare examples for v12 (#1382)
This commit is contained in:
parent
4aa82b4fdf
commit
15723ece1f
3 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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!');
|
||||
|
|
|
|||
Loading…
Reference in a new issue