docs: using deprecated version of find

This commit is contained in:
Lewdcario
2018-05-13 04:41:58 -05:00
parent b2d1cb6a3d
commit 6070b22382

View File

@@ -19,7 +19,7 @@ client.on('ready', () => {
// Create an event listener for new guild members
client.on('guildMemberAdd', member => {
// Send the message to a designated channel on a server:
const channel = member.guild.channels.find('name', 'member-log');
const channel = member.guild.channels.find(ch => ch.name === 'member-log');
// Do nothing if the channel wasn't found on this server
if (!channel) return;
// Send the message, mentioning the member