Skip to content

Commit

Permalink
Lise update V9
Browse files Browse the repository at this point in the history
  • Loading branch information
jalpp authored Dec 5, 2023
1 parent 567ce1c commit 9dc598d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
3. [Chess.com Java Wrapper](https://github.com/sornerol/chess-com-pubapi-java-wrapper)
4. [Java Chess Lib](https://github.com/bhlangonijr/chesslib)


# Contribution details

To set up Lise you need the following

- Java 18
- Maven
- Chess.com app useragent details see more in Controller/CCProfile.java
- Discord Dev app
- Discord Dev Account
- Discord Dev app token (Note: select only Send Embeds, Send Msg, Embed links, Use Slash command permissions)
- JDA 18 knowledge, as Controller/CommandHandler.java is mostly JDA
- You don't need chess knowledge to contribute
- if your stuck join the discord server.

# Image Generation
1. [Chess Board Image](https://chessboardimage.com/)
2. [Lichess Gifs](https://github.com/lichess-org/lila-gif)
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
Expand Down Expand Up @@ -39,8 +38,9 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.2</version>
<version>5.0.0-beta.18</version>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
Expand All @@ -49,12 +49,12 @@
<dependency>
<groupId>io.github.tors42</groupId>
<artifactId>chariot</artifactId>
<version>0.0.67</version>
<version>0.0.77</version>
</dependency>
<dependency>
<groupId>io.github.sornerol</groupId>
<artifactId>chesscom-pubapi-wrapper</artifactId>
<version>1.2.0</version>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>com.github.bhlangonijr</groupId>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/Controller/CCProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ public EmbedBuilder getCCProfile(){


try {


this.playerClient = new PlayerClient();

playerClient.setUserAgent("your_app; username: your_username; contact: your_email");
this.embedBuilder = new EmbedBuilder();
String proSay = "";
String say = "";



PlayerStats player = playerClient.getStatsForPlayer(this.username);

proSay+= " ** Bullet**: " +
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Controller/DailyCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public String getSolution(){


if(split[1].contains("b")){
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=white&theme=blue&piece=cardinal";
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=white&theme=brown&piece=kosal";
}else{
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=black&theme=blue&piece=cardinal";
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=black&theme=brown&piece=kosal";
}

return coordImg;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Controller/DailyCommandCC.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public String getPuzzle() {
}
this.solLink += "https://lichess.org/analysis/standard/" + fen.replace(" ", "_");

return "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&theme=blue&piece=alpha";
return "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&theme=brown&piece=kosal";

} catch (IOException | ChessComPubApiException e) {
throw new RuntimeException(e);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Controller/puzzle.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public String getPuzzle() {


if(split[1].contains("w")){
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=white&theme=blue&piece=cardinal";
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=white&theme=brown&piece=kosal";
}else{
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=black&theme=blue&piece=cardinal";
coordImg = "https://lichess1.org/export/fen.gif?fen=" + split[0] + "&color=black&theme=brown&piece=kosal";
}


Expand Down

0 comments on commit 9dc598d

Please sign in to comment.