Closed
Conversation
| const BaseController = require('../baseController.js'); | ||
| const Command = require('../baseCommand.js'); | ||
|
|
||
| class MemberAddController extends BaseController { |
Owner
There was a problem hiding this comment.
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}.`; |
Owner
There was a problem hiding this comment.
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}.`); |
Owner
There was a problem hiding this comment.
Redundant logic, see memberAdd.js
| }); | ||
|
|
||
| // Listen for Guild Member Add event | ||
| client.on('guildMemberAdd', (member) => { |
Owner
There was a problem hiding this comment.
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', |
Owner
There was a problem hiding this comment.
"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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.