Skip to content

Commit

Permalink
feat(user Installed support): Chesslise breaks free into users friend…
Browse files Browse the repository at this point in the history
…s DMs, Group chats, with chessdb cn support
  • Loading branch information
jalpp committed Nov 22, 2024
1 parent 84e6d4b commit 36831ea
Show file tree
Hide file tree
Showing 43 changed files with 476 additions and 596 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.idea/

*.class

*.jar

.env

target/
build/
bin/
out/
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# How to add Chesslise to your Discord server
# How to add Chesslise to your discord server
- Head over to [App Directory](https://discord.com/application-directory/930544707300393021)
- Click on "Add to Server"
- If you are not logged in to Discord you might have to log in
- If you are not logged in to discord you might have to log in
- You would have to get a server selection list that you own, pick the server you want to install Lise in
- View Lise's permission and click "Authorize"
- To check if Lise has joined, go to the server where you installed Lise and run /help or /play and see if the LISEBOT selection menu opens up
- You're done! Please read the command information below you can also run /help to view it in Discord.
- You're done! Please read the command information below you can also run /help to view it in discord.

# How to set up lise locally?

- To set up lise you need to have Java 21, IntelliJ, and Maven
- git clone the project
- use any IDE (IntelliJ recommended)
- configure ``` DISCORD_TOKEN ``` for your own bots' Discord token
- configure ``` LICHESS_TOKEN ``` if you also want to run lise on Lichess
- configure ``` DISCORD_TOKEN ``` for your own bots' discord token
- configure ``` LICHESS_TOKEN ``` if you also want to run lise on lichess
- you are ready to run the bot with ``` mvn clean ```
- finally, compile the code ``` mvn compile ```
- Please note you need to follow the same steps as adding Chesslise for your own local bot
- build the project ``` mvn package ```
- run the application ``` java -jar /target/Chesslise-14.3-SNAPSHOT-jar-with-dependencies.jar ```
- run the application ``` java -jar /target/Chesslise-15.0-SNAPSHOT-jar-with-dependencies.jar ```


# API

1. [Lichess API](https://lichess.org/api)
1. [lichess API](https://lichess.org/api)
2. [Chess.com API](https://github.com/sornerol/chess-com-pubapi-java-wrapper)
3. [JDA 5 Discord API](https://github.com/DV8FromTheWorld/JDA)
3. [JDA 5 discord API](https://github.com/DV8FromTheWorld/JDA)
4. [StockFish API](https://stockfish.online/)
5. [Fide API](https://github.com/lenguyenthanh/fide?tab=readme-ov-file)
5. [Chessdb cn](https://chessdb.cn/cloudbookc_info_en.html)

# Libraries

1. [Lichess Java Client](https://github.com/tors42/chariot)
1. [lichess Java Client](https://github.com/tors42/chariot)
2. [Tors42 JBang-chariot Java Client Examples](https://github.com/tors42/jbang-chariot)
3. [Chess.com Java Wrapper](https://github.com/sornerol/chess-com-pubapi-java-wrapper)
4. [Java Chess Lib](https://github.com/bhlangonijr/chesslib)

# Engines

- [Lise Chess Engine](https://github.com/jalpp/LiseChessEngine)
- [Lise Chess engine](https://github.com/jalpp/LiseChessEngine)
- [Stockfish](https://stockfishchess.org/)

# Image Generation
- [Lichess Gifs](https://github.com/lichess-org/lila-gif)
- [lichess Gifs](https://github.com/lichess-org/lila-gif)

# Chesslise High-level Design
![Lisev10B drawio](https://github.com/jalpp/LichessSearchEngineBot/assets/92553013/ab1aa349-135b-4f57-a592-bba4e6faf733)
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: runner.Main

34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,57 @@
![GitHub License](https://img.shields.io/github/license/jalpp/Chesslise)


Chesslise is open source Chess based Discord application, which allows users to play, learn, and watch chess on their Discord server
<p align="center">
<img src="https://raw.githubusercontent.com/jalpp/DojoIcons/dd7365ea7d768fe17056d9b14ee6740c2bf4e261/oldIcons/Black%20Blue%20White%20Tactical%20eSports%20Discord%20Logo.png" alt="ChessLise" width=20% height=20% />
</p>

Chesslise is community driven open source Chess based Discord application, which allows users to play, learn, and watch chess on their discord server, install it on their Discord accounts to
play chess in Group DMs/friend chat rooms. Chesslise is 3rd best chess Discord bot in Discord's offical App directory, being used in more than 1k servers.

# Sources

# API

1. [Lichess API](https://lichess.org/api)
1. [lichess API](https://lichess.org/api)
2. [Chess.com API](https://github.com/sornerol/chess-com-pubapi-java-wrapper)
3. [JDA 5 Discord API](https://github.com/DV8FromTheWorld/JDA)
3. [JDA 5 discord API](https://github.com/DV8FromTheWorld/JDA)
4. [StockFish API](https://stockfish.online/)
5. [Chessdb cn](https://chessdb.cn/cloudbookc_info_en.html)

# Tech Stack
1. Java 21, Maven, AWS
Java 21, Maven, AWS

# Libraries

1. [Lichess Java Client](https://github.com/tors42/chariot)
1. [lichess Java Client](https://github.com/tors42/chariot)
2. [Tors42 JBang-chariot Java Client Examples](https://github.com/tors42/jbang-chariot)
3. [Chess.com Java Wrapper](https://github.com/sornerol/chess-com-pubapi-java-wrapper)
4. [Java Chess Lib](https://github.com/bhlangonijr/chesslib)

# Engines

- [Lise Chess Engine](https://github.com/jalpp/LiseChessEngine)
- [Lise Chess engine](https://github.com/jalpp/LiseChessEngine)
- [Stockfish](https://stockfishchess.org/)

# Image Generation
- [Lichess Gifs](https://github.com/lichess-org/lila-gif)
- [lichess Gifs](https://github.com/lichess-org/lila-gif)

# Contribution
read more in `CONTRIBUTING.md` on how to setup lise on Discord and server to run it locally


# Popular Commands
| Commands | Description |
| ----------- | ----------- |
| /puzzle | Do Lichess/Chess.com puzzles |
| /solve | solve chess puzzles in Discord |
| /play | create live chess games in Discord |
| /puzzle | Do lichess/Chess.com puzzles |
| /solve | solve chess puzzles in discord |
| /play | create live chess games in discord |

see more commands in `commands.md`

## App Directory
[View More](https://discord.com/application-directory/930544707300393021)

## Discord Support Server
[Join](https://discord.gg/uncmhknmYg)

## Version number: 14



Expand Down
15 changes: 7 additions & 8 deletions commands.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Commands:
| Lichess Commands | Description |
| lichess Commands | Description |
|----------------------------| ----------- |
| /help | To see command information for the LISEBOT |
| /profile | To see Lichess profiles for given username |
| /puzzle | See the daily Lichess Chesscom puzzle and try to solve it! |
| /play | Create an open-ended challenge for Discord users to play with, select time control[1+0,3+0,3+2,5+0,etc] and mode [casual/rated] |
| /watch | View the last Lichess game played by a user |
| /profile | To see lichess profiles for given username |
| /puzzle | See the daily lichess chesscom puzzle and try to solve it! |
| /play | Create an open-ended challenge for discord users to play with, select time control[1+0,3+0,3+2,5+0,etc] and mode [casual/rated] |
| /watch | View the last lichess game played by a user |
| /puzzle | Do Daily/Random Chess.com puzzles |
| /profilecc | View Chess.com user profile |
| /move | Play Stockfish engine in Discord |
| /puzzlesolve | Pass in FEN to trigger a puzzle solver module |
| /solve | solve live puzzles using chess moves |
| /move | Play Stockfish engine in discord |
| /chessdb | Analyze chess positions via chessdb cn |
| /learnchess | learn basic chess rules |
14 changes: 9 additions & 5 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>org.example</groupId>
<artifactId>ChessLise</artifactId>
<version>14.3-SNAPSHOT</version>
<version>15.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
Expand All @@ -28,7 +28,7 @@
</descriptorRefs>
<archive>
<manifest>
<mainClass>Runner.Main</mainClass>
<mainClass>runner.Main</mainClass>
</manifest>
</archive>
</configuration>
Expand Down Expand Up @@ -56,11 +56,15 @@
</repositories>
<dependencies>
<dependency>
<groupId>net.dv8tion</groupId>
<groupId>com.github.freya022</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.24</version>
<version>7c7d09bf4dee12088fabd4d5c9b88380f75a289b</version>
</dependency>
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
Expand Down
129 changes: 0 additions & 129 deletions src/main/java/Discord/HelperModules/PuzzleSolverContextModule.java

This file was deleted.

Loading

0 comments on commit 36831ea

Please sign in to comment.