Skip to content
Prev Previous commit
Next Next commit
removed consts changed with welcomeMsg()
  • Loading branch information
BHess2653 authored and BHess2653 committed May 9, 2018
commit ce06c13bfcd2c00b391503bc34b9e601086f0d92
4 changes: 1 addition & 3 deletions bot/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ client.on('message', (message) => {
client.on('guildMemberAdd', (member) => {
// Channel to send messages at
const channel = member.guild.channels.find('name', 'general');
// Direct message to member
const dmMsg = welcomeMsg(member.user.id);
// Channel Announcement Message
const chanMsg = `Welcome to the Full Sail Armada ${member}!`;
// Send welcome message to members who join
member.send(dmMsg);
member.send(welcomeMsg(member.user.id));
util.log('Direct message sent to new member', 0);
// Check for channel
if (channel) {
Expand Down
4 changes: 2 additions & 2 deletions bot/controllers/welcome.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const BaseController = require('../baseController.js');
const Command = require('../baseCommand.js');
const { welcomeMsg } = require('../botUtils.js');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add in the default comments found across the controllers to your welcome.js file.

class WelcomeController extends BaseController {
constructor(message) {
Expand All @@ -25,8 +26,7 @@ class WelcomeController extends BaseController {
// Send direct message to user
welcomeAction() {
const { message } = this;
const directMsg = `<@${message.author.id}>, Welcome to the Full Sail Armada! These are the terms of service...`;
return directMsg;
return welcomeMsg(message.author.id);
}
}
module.exports = WelcomeController;