Skip to content

Commit

Permalink
refactor(/Fide) remove unsupported FIDE API integration with cache Fi…
Browse files Browse the repository at this point in the history
…de top10 as top10 does not change often
  • Loading branch information
jalpp authored May 8, 2024
1 parent fafba97 commit 1d17996
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 166 deletions.
14 changes: 12 additions & 2 deletions src/main/java/Discord/HelperModules/ToolContextModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import Chesscom.DailyCommandCC;
import Chesscom.puzzle;
import Discord.MainHandler.AntiSpam;
import Fide.FideClient;
import Lichess.*;
import chariot.Client;
import net.dv8tion.jda.api.EmbedBuilder;
Expand Down Expand Up @@ -170,7 +169,18 @@ public void sendTop10FideEmbed(SlashCommandInteractionEvent slashEvent){
EmbedBuilder builder = new EmbedBuilder();
builder.setTitle("FIDE Top10 Players");
builder.setThumbnail("https://upload.wikimedia.org/wikipedia/en/thumb/5/5b/Fidelogo.svg/1200px-Fidelogo.svg.png");
builder.setDescription(FideClient.getTopNInString("standard", 10));
builder.setDescription("""
1) GM Carlsen, Magnus, standard: (2830)
2) GM Kasparov, Garry, standard: (2812)
3) GM Caruana, Fabiano, standard: (2805)
4) GM Nakamura, Hikaru, standard: (2794)
5) GM Nepomniachtchi, Ian, standard: (2770)
6) GM Abdusattorov, Nodirbek, standard: (2765)
7) GM Gukesh D, standard: (2763)
8) GM Ding, Liren, standard: (2762)
9) GM Erigaisi Arjun, standard: (2761)
10) GM So, Wesley, standard: (2757)
""");
builder.setColor(Color.WHITE);
slashEvent.replyEmbeds(builder.build()).queue();
}
Expand Down
164 changes: 0 additions & 164 deletions src/main/java/Fide/FideClient.java

This file was deleted.

0 comments on commit 1d17996

Please sign in to comment.