Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #424 from BigBotNetwork/greg-dev
Browse files Browse the repository at this point in the history
v1.3.3
  • Loading branch information
greg6775 authored Mar 30, 2020
2 parents a0db6e8 + 042dc8c commit b6c4664
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>Hadder</groupId>
<artifactId>Hadder</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<name>Hadder</name>
<inceptionYear>2019</inceptionYear>
<description>Hadder is a multi-purpose Discord bot.</description>
Expand Down Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>4.1.1_124</version>
<version>4.1.1_127</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
Expand Down Expand Up @@ -96,7 +96,7 @@
<dependency>
<groupId>com.sedmelluq</groupId>
<artifactId>lavaplayer</artifactId>
<version>1.3.38</version>
<version>1.3.40</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/bbn/hadder/commands/misc/CoronaCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public class CoronaCommand implements Command {
@Override
public void executed(String[] args, CommandEvent e) {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url("https://api.covid.stream/latest/numbers").build();
Request request = new Request.Builder().url("https://corona.lmao.ninja/all").build();

try {
Response response = client.newCall(request).execute();
JSONObject json = new JSONObject(response.body().string()).getJSONObject("data");
JSONObject json = new JSONObject(response.body().string());
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("`Confirmed cases:` **").append(json.get("totalConfirmedNumbers")).append("**\n").append("`Deaths:` **").append(json.get("totalDeathNumbers")).append("** \n").append("`Recovered:` **").append(json.get("totalRecoveredNumbers")).append("** \n");
stringBuilder.append("`Confirmed cases:` **").append(json.get("cases")).append("**\n").append("`Deaths:` **").append(json.get("deaths")).append("** \n").append("`Recovered:` **").append(json.get("recovered")).append("** \n").append("`Active cases:` **").append(json.get("active")).append("**");
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO).setDescription(stringBuilder).build()).queue();
} catch (IOException ex) {
e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR)
Expand Down

0 comments on commit b6c4664

Please sign in to comment.