Skip to content

Commit 8bba689

Browse files
committed
bugfix duplicate component id
1 parent f8e27bb commit 8bba689

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

application/src/main/java/org/togetherjava/tjbot/features/moderation/ThisIsScamCommand.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ private MessageCreateAction reportToMods(Message message, TextChannel auditChann
175175

176176
long guildId = message.getGuild().getIdLong();
177177
long authorId = author.getIdLong();
178-
String componentId = generateComponentId(String.valueOf(guildId), String.valueOf(authorId));
178+
String[] args = {String.valueOf(guildId), String.valueOf(authorId)};
179179

180180
return auditChannel.sendMessageEmbeds(reportEmbed)
181-
.addActionRow(Button.success(componentId, "Yes"), Button.danger(componentId, "No"));
181+
.addActionRow(Button.success(generateComponentId(args), "Yes"),
182+
Button.danger(generateComponentId(args), "No"));
182183
}
183184

184185
private static String createDescription(Message target) {

0 commit comments

Comments
 (0)