Skip to content

Commit 0ca44b2

Browse files
authored
add support link to help message (#722)
1 parent 9c3c0b0 commit 0ca44b2

27 files changed

+249
-10
lines changed

bot/src/main/java/de/janno/discord/bot/command/customDice/CustomDiceCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public Optional<MessageConfigDTO> createMessageConfig(@NonNull UUID configUUID,
9393
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("custom_dice.help.example.field.value", userLocale), false))
9494
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
9595
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
96+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
9697
.build();
9798
}
9899

bot/src/main/java/de/janno/discord/bot/command/customParameter/CustomParameterCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ protected Optional<String> replyEphemeralMessage(@NonNull CustomParameterConfig
371371
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("custom_parameter.help.example.field.value", userLocale), false))
372372
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
373373
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
374+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
374375
.build();
375376
}
376377

bot/src/main/java/de/janno/discord/bot/command/directRoll/AliasRollCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ protected EmbedOrMessageDefinition getHelpMessage(Locale userLocale) {
8686
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("a.help.example.expression.value", userLocale), false))
8787
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
8888
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
89+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
8990
.build();
9091
}
9192
}

bot/src/main/java/de/janno/discord/bot/command/directRoll/DirectRollCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ protected EmbedOrMessageDefinition getHelpMessage(Locale userLocale) {
168168
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("r.help.example.value", userLocale), false))
169169
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
170170
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
171+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
171172
.build();
172173
}
173174

bot/src/main/java/de/janno/discord/bot/command/directRoll/HiddenDirectRollCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ protected EmbedOrMessageDefinition getHelpMessage(Locale userLocale) {
120120
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("h.help.example.value", userLocale), false))
121121
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
122122
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
123+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
123124
.build();
124125
}
125126
}

bot/src/main/java/de/janno/discord/bot/command/directRoll/ValidationCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ protected EmbedOrMessageDefinition getHelpMessage(Locale userLocale) {
8383
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("validation.help.example.value", userLocale), false))
8484
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
8585
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
86+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
8687
.build();
8788
}
8889
}

bot/src/main/java/de/janno/discord/bot/command/help/HelpCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class HelpCommand implements SlashCommand {
4444
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.command.field.name", userLocale), I18n.getMessage("help.command.field.value." + context, userLocale), false))
4545
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
4646
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
47+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
4748
.build(), true);
4849
}
4950
}

bot/src/main/java/de/janno/discord/bot/command/starter/StarterCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import lombok.extern.slf4j.Slf4j;
3333
import reactor.core.publisher.Mono;
3434

35-
3635
import java.util.*;
3736
import java.util.function.Supplier;
3837
import java.util.stream.Collectors;
@@ -409,6 +408,7 @@ private StarterConfig createStartConfigFromCreateOption(CommandInteractionOption
409408
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("starter.help.example.field.value", userLocale), false))
410409
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
411410
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
411+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
412412
.build();
413413
}
414414

bot/src/main/java/de/janno/discord/bot/command/sumCustomSet/SumCustomSetCommand.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import lombok.NonNull;
2525
import lombok.extern.slf4j.Slf4j;
2626

27-
2827
import java.util.*;
2928
import java.util.function.Supplier;
3029
import java.util.regex.Pattern;
@@ -34,6 +33,7 @@
3433
@Slf4j
3534
public class SumCustomSetCommand extends AbstractCommand<SumCustomSetConfig, SumCustomSetStateDataV2> {
3635
public static final String COMMAND_NAME = "sum_custom_set";
36+
public static final String CONFIG_TYPE_ID = "SumCustomSetConfig";
3737
static final String BUTTONS_COMMAND_OPTIONS_NAME = "buttons";
3838
static final String ALWAYS_SUM_RESULTS_COMMAND_OPTIONS_NAME = "always_sum_result";
3939
static final String HIDE_EXPRESSION_IN_ANSWER_OPTIONS_NAME = "hide_expression_in_answer";
@@ -43,8 +43,6 @@ public class SumCustomSetCommand extends AbstractCommand<SumCustomSetConfig, Sum
4343
private static final String NO_ACTION = "no action";
4444
private static final String CLEAR_BUTTON_ID = "clear";
4545
private static final String BACK_BUTTON_ID = "back";
46-
47-
public static final String CONFIG_TYPE_ID = "SumCustomSetConfig";
4846
private static final String STATE_DATA_TYPE_ID = "SumCustomSetStateDataV2";
4947
private static final String STATE_DATA_TYPE_LEGACY_ID = "SumCustomSetStateData";
5048
private final static Pattern ENDS_WITH_DOUBLE_SEMICOLUMN_PATTERN = Pattern.compile(".*;\\s*;\\s*$", Pattern.DOTALL);
@@ -139,6 +137,7 @@ public Optional<MessageConfigDTO> createMessageConfig(@NonNull UUID configUUID,
139137
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.example.field.name", userLocale), I18n.getMessage("sum_custom_set.help.example.field.value", userLocale), false))
140138
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.documentation.field.name", userLocale), I18n.getMessage("help.documentation.field.value", userLocale), false))
141139
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.server.field.name", userLocale), I18n.getMessage("help.discord.server.field.value", userLocale), false))
140+
.field(new EmbedOrMessageDefinition.Field(I18n.getMessage("help.discord.support.field.name", userLocale), I18n.getMessage("help.discord.support.field.value", userLocale), false))
142141
.build();
143142
}
144143

bot/src/main/resources/botMessages.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ help.quickstart.field.name=Quickstart
77
help.command.field.name=Command help
88
help.documentation.field.name=Full documentation
99
help.discord.server.field.name=Discord Server for News, Help and Feature Requests
10+
help.discord.support.field.name=Buy me a coffee
1011
#https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
1112
#embed field value 1024 characters
1213
custom_dice.help.example.field.value=`/custom_dice start buttons:3d6;10d10;3d20`
@@ -18,6 +19,7 @@ help.quickstart.field.value.userInstall=Write `/r expression: d20` to roll a twe
1819
help.command.field.value.userInstall=Add `help` after a command to get specific help for it, e.g. `/r expression: help`
1920
help.documentation.field.value=https://github.com/twonirwana/DiscordDiceBot
2021
help.discord.server.field.value=https://discord.gg/e43BsqKpFr
22+
help.discord.support.field.value=https://ko-fi.com/2nirwana
2123
r.help.example.value=`/r expression: 1d6@Damage`
2224
h.help.example.value=`/h expression: 1d6@Damage`
2325
a.help.example.expression.value=`/a alias_or_expression: 1d6`

bot/src/main/resources/botMessages_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ help.quickstart.field.name=Quickstart
77
help.command.field.name=Hilfe zum Befehlt
88
help.documentation.field.name=Vollständige Dokumentation
99
help.discord.server.field.name=Discord Server für Hilfe und Neuigkeiten
10+
help.discord.support.field.name=Spendiere mir einen Kaffee
1011
#https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
1112
#embed field value 1024 characters
1213
custom_dice.help.example.field.value=`/custom_dice start buttons:3d6;10d10;3d20`

bot/src/main/resources/botMessages_fr.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ help.quickstart.field.name=Démarrage rapide
77
help.command.field.name=Aide sur les commandes
88
help.documentation.field.name=Documentation complète
99
help.discord.server.field.name=Serveur Discord pour l'aide et les nouvelles
10+
help.discord.support.field.name=Offre-moi un café
1011
#https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
1112
#embed field value 1024 characters
1213
custom_dice.help.example.field.value=`/custom_dice démarrer boutons:3d6;10d10;3d20`

bot/src/main/resources/botMessages_pt_BR.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ help.quickstart.field.name=Início Rápido
88
help.command.field.name=Comando Ajuda
99
help.documentation.field.name=Documentação completa
1010
help.discord.server.field.name=Servidor do Discord Server para ajuda e notícias (inglês)
11+
help.discord.support.field.name=Me paga um café
1112
#https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
1213
#embed field value 1024 characters
1314
custom_dice.help.example.field.value=`/custom_dice iniciar botoes:3d6;10d10;3d20`

bot/src/test/java/de/janno/discord/bot/command/customDice/CustomDiceCommandTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ void handleSlashCommandEvent_help() {
302302
.field(new EmbedOrMessageDefinition.Field("Example", "`/custom_dice start buttons:3d6;10d10;3d20`", false))
303303
.field(new EmbedOrMessageDefinition.Field("Full documentation", "https://github.com/twonirwana/DiscordDiceBot", false))
304304
.field(new EmbedOrMessageDefinition.Field("Discord Server for News, Help and Feature Requests", "https://discord.gg/e43BsqKpFr", false))
305+
.field(new EmbedOrMessageDefinition.Field("Buy me a coffee", "https://ko-fi.com/2nirwana", false))
305306
.build(), true);
306307

307308
}

bot/src/test/java/de/janno/discord/bot/command/customParameter/CustomParameterCommandTest.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@ de.janno.discord.bot.command.customParameter.CustomParameterCommandTest.getHelpM
502502
"name": "Discord Server for News, Help and Feature Requests",
503503
"value": "https://discord.gg/e43BsqKpFr",
504504
"inline": false
505+
},
506+
{
507+
"name": "Buy me a coffee",
508+
"value": "https://ko-fi.com/2nirwana",
509+
"inline": false
505510
}
506511
],
507512
"componentRowDefinitions": [ ],

bot/src/test/java/de/janno/discord/bot/command/directRoll/AliasRollCommandTest.snap

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ de.janno.discord.bot.command.directRoll.AliasRollCommandTest.testHelp[de]=[
7474
"name": "Discord Server für Hilfe und Neuigkeiten",
7575
"value": "https://discord.gg/e43BsqKpFr",
7676
"inline": false
77+
},
78+
{
79+
"name": "Spendiere mir einen Kaffee",
80+
"value": "https://ko-fi.com/2nirwana",
81+
"inline": false
7782
}
7883
],
7984
"componentRowDefinitions": [ ],
@@ -106,6 +111,11 @@ de.janno.discord.bot.command.directRoll.AliasRollCommandTest.testHelp[en]=[
106111
"name": "Discord Server for News, Help and Feature Requests",
107112
"value": "https://discord.gg/e43BsqKpFr",
108113
"inline": false
114+
},
115+
{
116+
"name": "Buy me a coffee",
117+
"value": "https://ko-fi.com/2nirwana",
118+
"inline": false
109119
}
110120
],
111121
"componentRowDefinitions": [ ],
@@ -138,6 +148,11 @@ de.janno.discord.bot.command.directRoll.AliasRollCommandTest.testHelp[fr]=[
138148
"name": "Serveur Discord pour l'aide et les nouvelles",
139149
"value": "https://discord.gg/e43BsqKpFr",
140150
"inline": false
151+
},
152+
{
153+
"name": "Offre-moi un café",
154+
"value": "https://ko-fi.com/2nirwana",
155+
"inline": false
141156
}
142157
],
143158
"componentRowDefinitions": [ ],
@@ -170,6 +185,11 @@ de.janno.discord.bot.command.directRoll.AliasRollCommandTest.testHelp[pt_BR]=[
170185
"name": "Servidor do Discord Server para ajuda e notícias (inglês)",
171186
"value": "https://discord.gg/e43BsqKpFr",
172187
"inline": false
188+
},
189+
{
190+
"name": "Me paga um café",
191+
"value": "https://ko-fi.com/2nirwana",
192+
"inline": false
173193
}
174194
],
175195
"componentRowDefinitions": [ ],

0 commit comments

Comments
 (0)