Skip to content

v5.0.0-alpha.10

Compare
Choose a tag to compare
@DV8FromTheWorld DV8FromTheWorld released this 18 Apr 19:26
· 402 commits to master since this release
24b0553

Overview

UserSnowflake

We changed User.fromId to now return UserSnowflake instead of User. This is done to prevent users from attempting code such as User.fromId(123).openPrivateChannel() which would never work.

With this we also changed some methods to no longer accept raw IDs as long and String. Instead you can now use method(User.fromId(long/String)), ie. ban(User.fromId(1234)).

Removed Methods:

  • Guild#ban(long/String), Guild#ban(long/String, int), Guild#ban(long/String, int, String)
  • Guild#kick(long/String), Guild#kick(long/String, String)
  • Guild#unban(long/String)
  • Guild#retrieveBanById(long/String)
  • Guild#addMember(String, long/String)
  • Guild#timeoutForById(long/String, Duration)
  • Guild#timeoutUntilById(long/String, TemporalAccessor)
  • Guild#removeTimeoutById(long/String)
  • Guild#addRoleToMember(long/String, Role)
  • Guild#removeRoleFromMember(long/String, Role)
  • AuditLogPaginationAction#user(long/String)

New Features

Changes

Bug Fixes

  • Fix NPE when cloning guild role with null icon (v5) by @Tais993 in #2063
  • Build the User from data in the Interaction if the User was not cached. by @oliver276 in #2060
  • Fix possible ClassCastException when removing reactions in threads by @RoanH in #2069
  • Fix rate limiter not shutting down if there is an empty bucket at shutdown by @Vankka in #2080

Removed

  • Remove mentioning members with ! by @Tais993 in #2081
  • A variety of overloads that accepted string/long/User/Member. Refer to UserSnowflake details above.

Full Changelog: v5.0.0-alpha.9...v5.0.0-alpha.10

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-alpha.10")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.10</version> 
</dependency>