Skip to content

Commit

Permalink
Merge pull request #7 from EnvyWare/master
Browse files Browse the repository at this point in the history
Fix null pointer from default avatars
  • Loading branch information
Ryzeon authored Jul 10, 2024
2 parents 093abcf + fd0888a commit 670add5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<!--- JDA -->
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.22</version>
<version>5.0.0</version>
</dependency>
<!--- Jsoup -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public InputStream generateFromMessages(Collection<Message> messages) throws IOE
authorName.attr("title", Objects.requireNonNull(author.getGlobalName()));
authorName.text(author.getName());
authorName.attr("data-user-id", author.getId());
authorAvatar.attr("src", Objects.requireNonNull(author.getAvatarUrl()));
authorAvatar.attr("src", Objects.requireNonNull(author.getEffectiveAvatarUrl()));
} else {
// Handle the case when author is null (e.g., when the message is from a bot)
authorName.attr("title", "Bot");
Expand Down

0 comments on commit 670add5

Please sign in to comment.