Skip to content

welcome member message#178

Closed
csfiedor wants to merge 1 commit intodevfrom
memberWelcome-csfiedor
Closed

welcome member message#178
csfiedor wants to merge 1 commit intodevfrom
memberWelcome-csfiedor

Conversation

@csfiedor
Copy link

No description provided.

const BaseController = require('../baseController.js');
const Command = require('../baseCommand.js');

class MemberAddController extends BaseController {
Copy link
Owner

Choose a reason for hiding this comment

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

MemberAddController doesn't make semantic sense.


memberAddMsg() {
const { message } = this;
return `Welcome to ${message.member.guild}, ${message.member.user.username}! You joined our guild on ${message.member.joinedAt}.`;
Copy link
Owner

Choose a reason for hiding this comment

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

Redundant logic, see client.js

// Inform guild member a new member has joined the server on the general chat channel
member.guild.channels.find('name', 'general').send(`${member.user.username} has joined ${member.guild}. Make them feel welcome and say hello!`);
// Send a direct message to the new member upon joining the server
member.send(`Welcome to ${member.guild}, ${member.user.username}! You joined our guild on ${member.joinedAt}.`);
Copy link
Owner

Choose a reason for hiding this comment

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

Redundant logic, see memberAdd.js

});

// Listen for Guild Member Add event
client.on('guildMemberAdd', (member) => {
Copy link
Owner

Choose a reason for hiding this comment

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

Narrow logic that does not utilize the existing controller logic. This is a one time use feature while the rest of the framework uses controllers to handle client events.

const controller = this;
this.commands = [
new Command(
'!memberWelcome',
Copy link
Owner

Choose a reason for hiding this comment

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

"memberWelcome" doesn't really spell out what this command does. It can lead to ambiguity regarding its purpose.

Does this command welcome a new member?

@csfiedor csfiedor closed this Sep 25, 2018
@csfiedor csfiedor deleted the memberWelcome-csfiedor branch September 25, 2018 22:36
@reactivepixel reactivepixel restored the memberWelcome-csfiedor branch November 9, 2018 00:40
@reactivepixel reactivepixel deleted the memberWelcome-csfiedor branch August 21, 2019 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants