Skip to content

Comments

Added captions to quote, did some refactoring.#4

Open
Fibii wants to merge 1 commit intoDoppeey:masterfrom
Fibii:master
Open

Added captions to quote, did some refactoring.#4
Fibii wants to merge 1 commit intoDoppeey:masterfrom
Fibii:master

Conversation

@Fibii
Copy link

@Fibii Fibii commented May 5, 2019

added captions, removed the ability to quote quotes or meaningless messages (like those messages with no characters at all)

Copy link
Contributor

@RicardoMonteiroSimoes RicardoMonteiroSimoes left a comment

Choose a reason for hiding this comment

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

I'd suggest trying to fix that nested try/catch. Maybe even try to get rid of all try catch.
Also, no idea why the hell github want's me to review this. Well, here I am ~F4nt0M

+ "\nQuoted by " + commandEvent.getMember().getAsMention() + " with the caption:\n" + caption);
}

try {
Copy link
Contributor

Choose a reason for hiding this comment

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

nested try/catch? I'd suggest you use the isEmpty() functionality to check if it has anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

~F4nt0M

Copy link
Author

Choose a reason for hiding this comment

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

if there's no image, x.getAttachments().get(0) will throw an exception, i tried to fix it before pushing but i couldn't because i'm not familiar with JDA.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll have to check it out at home. I think I fixed it in #5 using if(!yadda.yadda().isEmpty()){ and then using get get(0) command. I did not remove the try catch tho - that is merely due to the fact that I left it in in case I missed something.

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