Skip to content

Commit 9f62f37

Browse files
Fix bug causing animated avatars to break /rank
1 parent 313c323 commit 9f62f37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/technobot/commands/levels/RankCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ private BufferedImage getAvatar(User user) throws IOException {
230230
return scaleOp.filter(addon, after);
231231

232232
} catch (MalformedURLException e) {
233-
URL url = new URL(user.getEffectiveAvatarUrl());
233+
String avatar = user.getEffectiveAvatarUrl().replace(".gif", ".png");
234+
URL url = new URL(avatar);
234235
BufferedImage addon = ImageIO.read(url);
235236

236237
int w = addon.getWidth() - 45;

0 commit comments

Comments
 (0)