|
16 | 16 | import net.dv8tion.jda.api.interactions.components.ActionComponent; |
17 | 17 | import net.dv8tion.jda.api.interactions.components.ActionRow; |
18 | 18 | import net.dv8tion.jda.api.interactions.components.buttons.Button; |
19 | | -import net.dv8tion.jda.api.utils.messages.MessageCreateBuilder; |
20 | 19 | import net.javadiscord.javabot.annotations.AutoDetectableComponentHandler; |
21 | 20 | import net.javadiscord.javabot.data.config.BotConfig; |
22 | 21 | import net.javadiscord.javabot.data.config.guild.HelpConfig; |
23 | 22 | import net.javadiscord.javabot.data.h2db.DbActions; |
24 | 23 | import net.javadiscord.javabot.systems.help.dao.HelpAccountRepository; |
25 | 24 | import net.javadiscord.javabot.systems.help.dao.HelpTransactionRepository; |
26 | 25 | import net.javadiscord.javabot.util.ExceptionLogger; |
| 26 | +import net.javadiscord.javabot.util.InteractionUtils; |
27 | 27 | import net.javadiscord.javabot.util.Responses; |
28 | 28 | import org.jetbrains.annotations.NotNull; |
29 | 29 | import org.springframework.dao.DataAccessException; |
@@ -112,15 +112,14 @@ private void replyCloseSuggestionIfPatternMatches(Message msg) { |
112 | 112 | if(msg.getChannel().asThreadChannel().getOwnerIdLong() == msg.getAuthor().getIdLong()) { |
113 | 113 | for (String[] detector : closeSuggestionDetectors) { |
114 | 114 | if (doesMatchDetector(content, detector)) { |
115 | | - msg.reply(new MessageCreateBuilder() |
116 | | - .addContent(""" |
117 | | - If you are finished with your post, please close your post. |
118 | | - If you are not, please ignore this message. |
119 | | - Note that you will not be able to send further messages after this post have been closed. |
120 | | - """) |
121 | | - .addActionRow(createCloseSuggestionButton(msg.getChannel().asThreadChannel())) |
122 | | - .build()) |
123 | | - .queue(); |
| 115 | + msg.reply(""" |
| 116 | + If you are finished with your post, please close your post. |
| 117 | + If you are not, please ignore this message. |
| 118 | + Note that you will not be able to send further messages after this post have been closed. |
| 119 | + """) |
| 120 | + .addActionRow(createCloseSuggestionButton(msg.getChannel().asThreadChannel()), |
| 121 | + Button.secondary(InteractionUtils.DELETE_ORIGINAL_TEMPLATE, "\uD83D\uDDD1️")) |
| 122 | + .queue(); |
124 | 123 | } |
125 | 124 | } |
126 | 125 | } |
|
0 commit comments