Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add colour to list #149

Merged
merged 16 commits into from
Oct 30, 2020

Conversation

anontyro
Copy link
Contributor

Notable changes:

  • Added in colour styling using the code block method to most items
  • Poll is not included as it uses emojis and that will not work in code blocks
  • fixed bug with max items in poll, will now max to 5 and allow smaller lists to work as expected
  • fixed an issue when wanting to remove with no number was returning NaN but removing the first element changed to safely default to the first item instead
  • Added in node debugging via nodemon --inspect and attach config for it

Screenshot 2020-10-25 at 22 15 17
Screenshot 2020-10-24 at 00 15 09
Screenshot 2020-10-25 at 22 17 22
Screenshot 2020-10-25 at 22 17 09

@rgroves
Copy link
Collaborator

rgroves commented Oct 25, 2020

Hey @anontyro as mention in the Discord server a couple days ago, there was one other contributor working along the same lines as you, so there are conflicts in your branch. Please resolve these and then I'll review your changes. Thanks!

@RazCrimson
Copy link
Contributor

Maybe you can move the Styles module into Utils module as the current Utils module only has one embed generator and MessageStyle also seems to fit the context of utils.js.

Copy link
Collaborator

@rgroves rgroves left a comment

Choose a reason for hiding this comment

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

I left some notes for the current change set, but in addition conflicts will need resolving as well. Please sync your branch with the current state of the master branch, resolve conflicts, and address the requested changes so that we can move forward with integrating your work into the codebase. Thanks!

I also like the idea from @RazCrimson about incorporating the Styles into the utils, but don't want utils to be a generic catch all, so I think we could address this separately by making utils.js more specific (maybe renaming to something like messageUtils.js) and combining both into a message specific utility module.

.vscode/launch.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/commands/poll.js Outdated Show resolved Hide resolved
src/commands/remove.js Outdated Show resolved Hide resolved
@anontyro
Copy link
Contributor Author

Sure I'll update it with the suggestions

@rgroves
Copy link
Collaborator

rgroves commented Oct 26, 2020

Thanks! In terms of sorting out the merge conflicts let me know if you need any input there and I'll be glad to provide guidance.

Copy link
Collaborator

@rgroves rgroves left a comment

Choose a reason for hiding this comment

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

@anontyro just a few minor adjustments and this will be ready to be merged. Thanks!

.gitignore Outdated Show resolved Hide resolved
src/commands/add.js Show resolved Hide resolved
src/utils/utils.js Outdated Show resolved Hide resolved
src/commands/list.js Outdated Show resolved Hide resolved
src/commands/remove.js Show resolved Hide resolved
src/commands/random.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@rgroves rgroves left a comment

Choose a reason for hiding this comment

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

So close to getting this in, just two more minor adjustments and we'll be there.

@@ -2,11 +2,12 @@ const Discord = require('discord.js')

const Utils = {
embedMessage(title, author, color, description) {
console.log(author)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this diagnostic log message.

return new Discord.MessageEmbed()
.setTitle(title)
.setColor(color)
.setDescription(description)
.setFooter(author)
.setFooter(author.username, author.displayAvatarURL)
Copy link
Collaborator

Choose a reason for hiding this comment

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

displayAvatarURL is a function that must be called to get the avatar's URL. Please adjust this line to be:
.setFooter(author.username, author.displayAvatarURL())

@rgroves
Copy link
Collaborator

rgroves commented Oct 29, 2020

Hi @anontyro, if you're unavailable to make those last two changes, would you mind checking this option within your pull request screen to give me the ability to add commits to your branch. Then I'll make the changes, commit and push them to your branch and get this merged. Thanks!
image

@rgroves rgroves merged commit 098c651 into tomassirio:master Oct 30, 2020
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.

3 participants