Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Conversation

@0ptk
Copy link

@0ptk 0ptk commented Jun 10, 2021

Pull Request

Pull Request Checklist

Please follow the following steps before opening this PR.

PRs that do not complete the checklist will be subject to denial for
missing information.

Pull Request Information

Check and fill in the blanks for all that apply:

  • My PR fixes a bug, error, or other issue with the library's codebase.
  • My PR is for the ______ module of the JDA-Utilities library.
  • My PR creates a new module for the JDA-Utilities library: ______.

Description

I updated jda version to latest and small fix codes

@nikii-me
Copy link

JDA-Utilities has been dead since quite a while, so I doubt this will be merged anytime soon. You might want to look into forks or even a different library.

@Sanduhr32
Copy link

You broke several core functionalities of "Builder" classes by returning void disallowing chaining. This PR will most likely not be merged unless you undo most changes breaking how JDA Utils is set up.

@Andre601
Copy link
Contributor

Andre601 commented Jun 10, 2021

As it was mentioned is this project abandoned.
You should consider using chew/JDA-Chewtils which is updated and maintsined.

Also, as sanduhr mentioned does your PR also break everything.

@Sanduhr32

This comment has been minimized.

@Andre601

This comment has been minimized.

@Sanduhr32

This comment has been minimized.

CooldownScope.USER.genKey(name, event.getAuthor().getIdLong());
case SHARD:
event.getJDA().getShardInfo();
return cooldownScope.genKey(name, event.getJDA().getShardInfo().getShardId());
Copy link
Member

Choose a reason for hiding this comment

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

This change makes no sense and breaks logic

return cooldownScope.genKey(name, event.getJDA().getShardInfo().getShardId());
case USER_SHARD:
event.getJDA().getShardInfo();
return cooldownScope.genKey(name,event.getAuthor().getIdLong(),event.getJDA().getShardInfo().getShardId());
Copy link
Member

Choose a reason for hiding this comment

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

This change makes no sense and breaks logic

* @return This CommandBuilder
*/
public CommandBuilder setName(String name)
public void setName(String name)
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change and makes the builder less useful as you remove the fluent interface pattern for no reason.

{
return event.getGuild() == null ? null : event.getGuild().getSelfMember();
event.getGuild();
return event.getGuild().getSelfMember();
Copy link
Member

Choose a reason for hiding this comment

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

Again this change makes no sense and breaks logic


jda.getShardInfo();
bodyBuilder.add("shard_id", Integer.toString(jda.getShardInfo().getShardId()))
.add("shard_count", Integer.toString(jda.getShardInfo().getShardTotal()));
Copy link
Member

Choose a reason for hiding this comment

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

Again, nonsense change.

{
LOG.info("Successfully sent information to discord.bots.gg");
try(Reader reader = response.body().charStream())
try(Reader reader = Objects.requireNonNull(response.body()).charStream())
Copy link
Member

Choose a reason for hiding this comment

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

requreNonNull is useless here

public static final String VERSION_MINOR = "@VERSION_MINOR@";
public static final String VERSION_REVISION = "@VERSION_REVISION@";
public static final String VERSION = VERSION_MAJOR.startsWith("@")? "DEV" : VERSION_MAJOR + "." + VERSION_MINOR + "." + VERSION_REVISION;
public static final String VERSION = "DEV";
Copy link
Member

Choose a reason for hiding this comment

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

This change breaks versions entirely

// currently being displayed.
if(!event.getMessageId().equals(m.getId()))
return false;
r.queue(v -> waiter.waitForEvent(MessageReactionAddEvent.class, event -> {
Copy link
Member

Choose a reason for hiding this comment

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

This change makes the code harder to read

return false;

return guild.getMember(user).getRoles().stream().anyMatch(roles::contains);
return Objects.requireNonNull(guild.getMember(user)).getRoles().stream().anyMatch(roles::contains);
Copy link
Member

Choose a reason for hiding this comment

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

Useless

}
catch(Throwable t)
{
} catch (Throwable t) {
Copy link
Member

Choose a reason for hiding this comment

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

You are changing code style for no reason

@MinnDevelopment
Copy link
Member

Closing since the majority of changes introduced by this PR are completely unrelated to updating JDA. They are mostly superfluous and in some cases outright breaking and even introduce bugs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants