Skip to content

Commit ca3aeed

Browse files
Merge pull request #475 from danthe1st/fix-delete-button
use correct componentId element on delete button
2 parents 09db6df + f91cfc3 commit ca3aeed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/discordjug/javabot/util/InteractionUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ private InteractionCallbackAction<?> delete(@NotNull ButtonInteraction interacti
9898

9999
String authorId = "";
100100

101-
if (componentId.length>1) {
102-
authorId = componentId[1];
101+
if (componentId.length > 2) {
102+
authorId = componentId[2];
103103
}
104104

105105
if (authorId.equals(member.getUser().getId()) ||

0 commit comments

Comments
 (0)