Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ public HelpSystemHelper(Config config, Database database, ChatGptService chatGpt
}

RestAction<Message> sendExplanationMessage(GuildMessageChannel threadChannel) {
return mentionGuildSlashCommand(threadChannel.getGuild(), HelpThreadCommand.COMMAND_NAME,
HelpThreadCommand.Subcommand.CLOSE.getCommandName())
.flatMap(closeCommandMention -> sendExplanationMessage(threadChannel,
closeCommandMention));
}

private RestAction<Message> sendExplanationMessage(GuildMessageChannel threadChannel,
String closeCommandMention) {
boolean useCodeSyntaxExampleImage = true;
InputStream codeSyntaxExampleData =
HelpSystemHelper.class.getResourceAsStream("/" + CODE_SYNTAX_EXAMPLE_PATH);
Expand All @@ -130,17 +122,11 @@ private RestAction<Message> sendExplanationMessage(GuildMessageChannel threadCha
"While you are waiting for getting help, here are some tips to improve your experience:";

List<MessageEmbed> embeds = List.of(HelpSystemHelper.embedWith(
"Code is much easier to read if posted with **syntax highlighting** and proper formatting.",
useCodeSyntaxExampleImage ? "attachment://" + CODE_SYNTAX_EXAMPLE_PATH : null),
HelpSystemHelper.embedWith(
"""
If nobody is calling back, that usually means that your question was **not well asked** and \
hence nobody feels confident enough answering. Try to use your time to elaborate, \
**provide details**, context, more code, examples and maybe some screenshots. \
With enough info, someone knows the answer for sure."""),
HelpSystemHelper.embedWith(
"Don't forget to close your thread using the command %s when your question has been answered, thanks."
.formatted(closeCommandMention)));
"""
If nobody is calling back, that usually means that your question was **not well asked** and \
hence nobody feels confident enough answering. Try to use your time to elaborate, \
**provide details**, context, more code, examples and maybe some screenshots. \
With enough info, someone knows the answer for sure."""));

MessageCreateAction action = threadChannel.sendMessage(message);
if (useCodeSyntaxExampleImage) {
Expand Down