-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from discord-jar/feature/user-apps
[Feature] User Apps
- Loading branch information
Showing
10 changed files
with
194 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/seailz/discordjar/model/interaction/IntegrationType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.seailz.discordjar.model.interaction; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum IntegrationType { | ||
|
||
GUILD_INSTALL(0), | ||
USER_INSTALL(1), | ||
UNKNOWN(-1); | ||
|
||
private final int code; | ||
|
||
public static IntegrationType fromCode(int code) { | ||
for (IntegrationType type : values()) { | ||
if (type.code == code) { | ||
return type; | ||
} | ||
} | ||
return UNKNOWN; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/seailz/discordjar/model/interaction/InteractionContextType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.seailz.discordjar.model.interaction; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum InteractionContextType { | ||
|
||
GUILD(0), | ||
BOT_DM(1), | ||
PRIVATE_CHANNEL(2), | ||
UNKNOWN(-1); | ||
|
||
private final int code; | ||
|
||
public static InteractionContextType fromCode(int code) { | ||
for (InteractionContextType type : values()) { | ||
if (type.code == code) { | ||
return type; | ||
} | ||
} | ||
return UNKNOWN; | ||
} | ||
|
||
} |
Oops, something went wrong.