Repository navigation
Conversation
|
Made a few mistakes causing the merge commit, I'll squash |
857ab95 to
7382386
Compare
I-Al-Istannen
left a comment
There was a problem hiding this comment.
I'd prefer qualifying the javadoc link and not the code itself.
|
Just a suggestion, but maybe you should learn Java @Tais993 |
28515f8
| new ErrorHandler().handle(ErrorResponse.MISSING_ACCESS, errorResponseException -> { | ||
| // * Hard to read, there's no other accurate way to get a channel you've the write | ||
| // * permission in. | ||
| guild.getTextChannelCache().stream().filter(textChannel -> { |
There was a problem hiding this comment.
This can be a utility method Optional<TextChannel> getTextChannelWithWritePermissions(Guild) to aid readability
There was a problem hiding this comment.
Creating something like
ChannelUtil#getChannelsWithPermissions(Guild, Permissions) seems fair
But this should be done within another PR
There was a problem hiding this comment.
Ok. I have already created one JDAUtils. I will move it in my PR instead.
There was a problem hiding this comment.
Don't remember JDAUtils having anything relating, and JDAUtils is extremely outdated
There was a problem hiding this comment.
🤦 thats something I have written and will pull out your piece.
There was a problem hiding this comment.
Ah, thought you were talking about JDA utlities
| }).findFirst().ifPresent(textChannel -> { | ||
| textChannel | ||
| .sendMessage("This bot needs the commands scope, please invite it correctly!\n" | ||
| + "You can join https://discord.gg/UJBwS2Hvcx for more info, I'll leave now.") |
There was a problem hiding this comment.
What is this url? May be a constant
There was a problem hiding this comment.
Together Java Discord, should be a constant in the main/application/whatever the main is called in that case imo
There was a problem hiding this comment.
Should also be moved out into the "config system" #100
There was a problem hiding this comment.
See PR #142 which will add a discordGuildInvite property for this.
| "Amount of times the user will be pinged, default 1") | ||
| .addChoices(new Command.Choice("Once", "1"), | ||
| new Command.Choice("Twice", "2")) | ||
| .addChoices( |
There was a problem hiding this comment.
Not sure if this is formatter related but the deleted lines look more readable to me.
There was a problem hiding this comment.
I'd assume formatter since I don't remember it myself
marko-radosavljevic
left a comment
There was a problem hiding this comment.
spotlessApply ^^
|
Since requested, requires some time to develop a proper permission system. |
This branch contains quite some useful improvements to the command system. If the permission thing needs more time, why not split this into two PRs and get this finally merged? |
|
Sure, will look at this later today. |
0424e3f to
4e2b591
Compare
|
Sorry, I messed up the rebase. Ill rescue it, gimme a minute |
Moved AbstractCommand to the Commands package instead of the example package, this was an accident.
Improved docs:
And optimized imports