Comments (1)
You can already solve this by combining generics:
public <T extends IReplyCallback & IModalCallback> void register(T event) {
if (registered(event.getUser().getIdLong()))
event.reply("You already registered!").setEphemeral(true).queue();
else
event.replyModal(Modal.create("register", "Register")./*Text input of accout name and password and other stuff*/.build()).queue();
}
from jda.
Related Issues (20)
- event.getTarget().getMember() returns null in onMessageContextInteraction HOT 2
- Audio WebsSocket Issue HOT 3
- FlatMapRestAction not checking the condition predicate when using RestAction#submit() HOT 1
- Discord JDA loading SlashCommands HOT 1
- event does not send response (GuildMemberJoinEvent)
- ClassCastException/Failed to parse JSON HOT 5
- Can't register Guild command HOT 1
- Modify Bot's Browser or Device HOT 2
- Polls HOT 6
- Make JDA bubble up websocket crashes as ExceptionEvent HOT 1
- add errorresponse 50178 The user account must first be verified HOT 2
- .
- Bot is unable to stream audio on stage in certain scenarios HOT 4
- Commands.slash name on russian HOT 2
- Exception in WS read thread: RSV1 bit of a frame is set unexpectedly HOT 12
- ErrorResponse USER_MUST_BE_VERIFIED Error HOT 3
- Manage role didn't work and also not throw any error HOT 4
- ClassNotFoundException: net.dv8tion.jda.api.entities.GuildChannel HOT 2
- Bot can't delete voice channel even with MANAGE_CHANNEL HOT 2
- RejectedExecutionException in SequentialRestRateLimiter HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jda.