-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add common interface for interactions with a custom ID
- Loading branch information
1 parent
53131b7
commit 09f68fb
Showing
3 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/main/java/net/dv8tion/jda/api/interactions/CustomIdInteraction.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,29 @@ | ||
package net.dv8tion.jda.api.interactions; | ||
|
||
import net.dv8tion.jda.api.interactions.components.ComponentInteraction; | ||
import net.dv8tion.jda.api.interactions.modals.ModalInteraction; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* Interactions which have a custom ID, namely {@link ComponentInteraction} and {@link ModalInteraction}. | ||
* | ||
* <br>This id does not have to be numerical. | ||
* | ||
*/ | ||
public interface CustomIdInteraction | ||
{ | ||
/** | ||
* The custom ID provided to the component or modal when it was originally created. | ||
* <br>This value should be used to determine what action to take in regard to this interaction. | ||
* | ||
* <br>This id does not have to be numerical. | ||
* | ||
* @return The custom ID | ||
* | ||
* @see ComponentInteraction#getComponentId() | ||
* @see ModalInteraction#getModalId() | ||
*/ | ||
@Nonnull | ||
String getCustomId(); | ||
} |
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