Skip to content
This repository was archived by the owner on Jun 23, 2021. It is now read-only.

Commit 73d0ed5

Browse files
authored
Merge pull request #18 from cerus/develop
Develop
2 parents 13bb08e + 54ad082 commit 73d0ed5

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ target/
44
.idea/
55
*.iml
66
dependency-reduced-pom.xml
7-
src/main/java/dev/cerus/jdasc/test.java
7+
src/main/java/dev/cerus/jdasc/test.java
8+
src/main/java/dev/cerus/jdasc/test.java.old

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Maven Central](https://img.shields.io/maven-central/v/dev.cerus/jda-slash-commands)](https://search.maven.org/artifact/dev.cerus/jda-slash-commands) ![GitHub](https://img.shields.io/github/license/cerus/jda-slash-commands) ![GitHub Sponsors](https://img.shields.io/github/sponsors/cerus)
2+
13
# jda-slash-commands
24

35
[Slash commands](https://discord.com/developers/docs/interactions/slash-commands) for [JDA](https://github.com/DV8FromTheWorld/JDA)
@@ -219,7 +221,7 @@ dependencies {
219221
<dependency>
220222
<groupId>dev.cerus</groupId>
221223
<artifactId>jda-slash-commands</artifactId>
222-
<version>1.2.2</version> <!-- Replace with latest version -->
224+
<version>1.3.1</version> <!-- Replace with latest version -->
223225
<scope>compile</scope>
224226
</dependency>
225227
</dependencies>
@@ -236,6 +238,6 @@ allprojects {
236238
}
237239
238240
dependencies {
239-
implementation 'dev.cerus:jda-slash-commands:1.2.2'
241+
implementation 'dev.cerus:jda-slash-commands:1.3.1'
240242
}
241243
```

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>dev.cerus</groupId>
88
<artifactId>jda-slash-commands</artifactId>
9-
<version>1.3.0</version>
9+
<version>1.3.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>${project.artifactId}</name>
@@ -75,7 +75,7 @@
7575
<dependency>
7676
<groupId>com.google.guava</groupId>
7777
<artifactId>guava</artifactId>
78-
<version>18.0</version>
78+
<version>30.1.1-jre</version>
7979
</dependency>
8080
<dependency>
8181
<groupId>co.aikar</groupId>

src/main/java/dev/cerus/jdasc/listener/InteractionListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
import net.dv8tion.jda.api.events.GenericEvent;
2727
import net.dv8tion.jda.api.events.RawGatewayEvent;
2828
import net.dv8tion.jda.api.hooks.ListenerAdapter;
29+
import net.dv8tion.jda.api.hooks.SubscribeEvent;
2930
import net.dv8tion.jda.api.utils.data.DataObject;
3031
import org.jetbrains.annotations.NotNull;
3132

3233
public class InteractionListener extends ListenerAdapter {
3334

3435
@Override
36+
@SubscribeEvent
3537
public void onRawGateway(@NotNull final RawGatewayEvent event) {
3638
if (event.getType().equals("INTERACTION_CREATE")) {
3739
final DataObject payload = event.getPayload();
@@ -195,6 +197,7 @@ private List<Component> parseComponents(final JsonArray componentsArray) {
195197
}
196198

197199
@Override
200+
@SubscribeEvent
198201
public void onGenericEvent(@NotNull final GenericEvent event) {
199202
if (!(event instanceof CommandInteractionEvent)) {
200203
return;

0 commit comments

Comments
 (0)