Skip to content

Commit 5e6feec

Browse files
authored
fixes all broken images (#33)
1 parent 306b807 commit 5e6feec

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
build
44
.DS_Store
55
.env
6+
bin

src/main/java/org/meteordev/meteorbot/command/commands/silly/CatCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public SlashCommandData build(SlashCommandData data) {
1717

1818
@Override
1919
public void run(SlashCommandInteractionEvent event) {
20-
Unirest.get("https://aws.random.cat/meow").asJsonAsync(response -> {
21-
event.reply(response.getBody().getObject().getString("file")).queue();
20+
Unirest.get("https://some-random-api.com/img/cat").asJsonAsync(response -> {
21+
event.reply(response.getBody().getObject().getString("link")).queue();
2222
});
2323
}
2424
}

src/main/java/org/meteordev/meteorbot/command/commands/silly/DogCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public SlashCommandData build(SlashCommandData data) {
1717

1818
@Override
1919
public void run(SlashCommandInteractionEvent event) {
20-
Unirest.get("https://some-random-api.ml/animal/dog").asJsonAsync(response -> {
21-
event.reply(response.getBody().getObject().getString("image")).queue();
20+
Unirest.get("https://some-random-api.com/img/dog").asJsonAsync(response -> {
21+
event.reply(response.getBody().getObject().getString("link")).queue();
2222
});
2323
}
2424
}

src/main/java/org/meteordev/meteorbot/command/commands/silly/PandaCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public SlashCommandData build(SlashCommandData data) {
2121
public void run(SlashCommandInteractionEvent event) {
2222
String animal = ThreadLocalRandom.current().nextBoolean() ? "red_panda" : "panda";
2323

24-
Unirest.get("https://some-random-api.ml/animal/" + animal).asJsonAsync(response -> {
25-
event.reply(response.getBody().getObject().getString("image")).queue();
24+
Unirest.get("https://some-random-api.com/animal/" + animal).asJsonAsync(response -> {
25+
event.reply(response.getBody().getObject().getString("link")).queue();
2626
});
2727
}
2828
}

0 commit comments

Comments
 (0)