From f39d6b0c95e026f02ab813f056e4017d04dbf810 Mon Sep 17 00:00:00 2001 From: Tais993 Date: Sun, 6 Feb 2022 23:20:44 +0100 Subject: [PATCH 1/3] Removed VC activities that didn't work Closes #362 --- .../commands/basic/VcActivityCommand.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java index 09e008e39c..91c3f32b5e 100644 --- a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java @@ -49,12 +49,9 @@ public final class VcActivityCommand extends SlashCommandAdapter { private static final long MAX_AGE_DAYS_LIMIT = 7; private static final long MAX_USES_LIMIT = 100; - public static final String YOUTUBE_TOGETHER_NAME = "YouTube Together"; public static final String POKER_NAME = "Poker"; public static final String BETRAYAL_IO_NAME = "Betrayal.io"; public static final String FISHINGTON_IO_NAME = "Fishington.io"; - public static final String CHESS_CG_2_DEV = "Chess / CG 2 Dev"; - public static final String AWKWORD_NAME = "Awkword"; public static final String SPELLCAST_NAME = "Spellcast"; public static final String DOODLECREW_NAME = "Doodlecrew"; public static final String WORDSNACK_NAME = "Wordsnack"; @@ -62,12 +59,9 @@ public final class VcActivityCommand extends SlashCommandAdapter { private static final List VC_APPLICATIONS = - List.of(new Command.Choice(YOUTUBE_TOGETHER_NAME, YOUTUBE_TOGETHER_NAME), - new Command.Choice(POKER_NAME, POKER_NAME), + List.of(new Command.Choice(POKER_NAME, POKER_NAME), new Command.Choice(BETRAYAL_IO_NAME, BETRAYAL_IO_NAME), new Command.Choice(FISHINGTON_IO_NAME, FISHINGTON_IO_NAME), - new Command.Choice(CHESS_CG_2_DEV, CHESS_CG_2_DEV), - new Command.Choice(AWKWORD_NAME, AWKWORD_NAME), new Command.Choice(SPELLCAST_NAME, SPELLCAST_NAME), new Command.Choice(DOODLECREW_NAME, DOODLECREW_NAME), new Command.Choice(WORDSNACK_NAME, WORDSNACK_NAME), @@ -78,10 +72,8 @@ public final class VcActivityCommand extends SlashCommandAdapter { * invite targets" PR on JDA. There is no official list from Discord themselves, so this is * our best bet. */ - private static final Map VC_APPLICATION_TO_ID = Map.of(YOUTUBE_TOGETHER_NAME, - "755600276941176913", POKER_NAME, "755827207812677713", BETRAYAL_IO_NAME, - "773336526917861400", FISHINGTON_IO_NAME, "814288819477020702", CHESS_CG_2_DEV, - "832012586023256104", AWKWORD_NAME, "879863881349087252", SPELLCAST_NAME, + private static final Map VC_APPLICATION_TO_ID = Map.of(POKER_NAME, "755827207812677713", BETRAYAL_IO_NAME, + "773336526917861400", FISHINGTON_IO_NAME, "814288819477020702",SPELLCAST_NAME, "852509694341283871", DOODLECREW_NAME, "878067389634314250", WORDSNACK_NAME, "879863976006127627", LETTERTILE_NAME, "879863686565621790"); @@ -217,7 +209,7 @@ private static void handleErrors(@NotNull SlashCommandEvent event, /** * Interprets the given option as integer. Throws if the option is not an integer. - * + * * @param option the option that contains the integer to extract, or null if not present * @return the extracted integer if present, null otherwise **/ @@ -227,4 +219,4 @@ private static void handleErrors(@NotNull SlashCommandEvent event, return option == null ? null : Math.toIntExact(option.getAsLong()); } -} +} \ No newline at end of file From 2c4c592295ca5f00783c8d003e8a2f21eb2ceb2b Mon Sep 17 00:00:00 2001 From: Tais993 <49957334+Tais993@users.noreply.github.com> Date: Sun, 6 Feb 2022 23:53:35 +0100 Subject: [PATCH 2/3] Added empty line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marko Radosavljević --- .../togetherjava/tjbot/commands/basic/VcActivityCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java index 91c3f32b5e..bfd75ba451 100644 --- a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java @@ -219,4 +219,4 @@ private static void handleErrors(@NotNull SlashCommandEvent event, return option == null ? null : Math.toIntExact(option.getAsLong()); } -} \ No newline at end of file +} From be12da190a751c0004bc68e692ca073d391c658d Mon Sep 17 00:00:00 2001 From: Tais993 Date: Mon, 7 Feb 2022 17:00:34 +0100 Subject: [PATCH 3/3] Good night spotless, I hope you sleep well --- .../tjbot/commands/basic/VcActivityCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java index bfd75ba451..6c575e43af 100644 --- a/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java @@ -72,10 +72,11 @@ public final class VcActivityCommand extends SlashCommandAdapter { * invite targets" PR on JDA. There is no official list from Discord themselves, so this is * our best bet. */ - private static final Map VC_APPLICATION_TO_ID = Map.of(POKER_NAME, "755827207812677713", BETRAYAL_IO_NAME, - "773336526917861400", FISHINGTON_IO_NAME, "814288819477020702",SPELLCAST_NAME, - "852509694341283871", DOODLECREW_NAME, "878067389634314250", WORDSNACK_NAME, - "879863976006127627", LETTERTILE_NAME, "879863686565621790"); + private static final Map VC_APPLICATION_TO_ID = + Map.of(POKER_NAME, "755827207812677713", BETRAYAL_IO_NAME, "773336526917861400", + FISHINGTON_IO_NAME, "814288819477020702", SPELLCAST_NAME, "852509694341283871", + DOODLECREW_NAME, "878067389634314250", WORDSNACK_NAME, "879863976006127627", + LETTERTILE_NAME, "879863686565621790"); private static final List inviteOptions = List.of(new OptionData(OptionType.INTEGER, MAX_USES_OPTION,