-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
105 additions
and
60 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
10 changes: 10 additions & 0 deletions
10
litecommands-jda/src/dev/rollczi/litecommands/jda/JDAContextTypeMapper.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,10 @@ | ||
package dev.rollczi.litecommands.jda; | ||
|
||
import dev.rollczi.litecommands.invocation.Invocation; | ||
import net.dv8tion.jda.api.interactions.commands.OptionMapping; | ||
|
||
public interface JDAContextTypeMapper<T> { | ||
|
||
T map(Invocation<?> invocation, OptionMapping option); | ||
|
||
} |
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
10 changes: 9 additions & 1 deletion
10
litecommands-jda/src/dev/rollczi/litecommands/jda/JDATypeMapper.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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
package dev.rollczi.litecommands.jda; | ||
|
||
import dev.rollczi.litecommands.invocation.Invocation; | ||
import net.dv8tion.jda.api.interactions.commands.OptionMapping; | ||
|
||
public interface JDATypeMapper<T> { | ||
public interface JDATypeMapper<T> extends JDAContextTypeMapper<T> { | ||
|
||
T map(OptionMapping option); | ||
|
||
@Override | ||
default T map(Invocation<?> event, OptionMapping option) { | ||
return map(option); | ||
} | ||
|
||
} |
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