Skip to content

Commit

Permalink
Fix greeting channel
Browse files Browse the repository at this point in the history
Remove unused line
  • Loading branch information
marcmascarell authored and marcmascarell committed May 6, 2018
1 parent 2b14bea commit 7ef78be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build": "tsc",
"watch": "tsc --watch",
"dev": "cross-env NODE_ENV=development node dist/index.js",
"production": "cross-env NODE_ENV=production node dist/index.js",
"postinstall" : "npm build"
"production": "cross-env NODE_ENV=production node dist/index.js"
},
"author": "",
"license": "ISC",
Expand Down
3 changes: 2 additions & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const init = () => {
// 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.first();
const channel = member.guild.channels.find('name', 'general');

// Do nothing if the channel wasn't found on this server
if (!channel) return;
// Send the message, mentioning the member
Expand Down

0 comments on commit 7ef78be

Please sign in to comment.