I Am Tring to Code a Discord bot in java but the Code Aint Working Can Someone Explain What I Am Doing Wrong https://lunus.xyz/7z1i4m.png?

import net.dv8tion.jda.core.accounttype; import net.dv8tion.jda.core.JDABuilder; import javax.security.auth.login.LoginException; import jdk.nashorn.api.scripting.JSObject; import jdk.nashorn.internal.objects.Global; import jdk.nashorn.internal.runtime.ListAdapter; public class main extends ListAdapter { ... show more import net.dv8tion.jda.core.accounttype;
import net.dv8tion.jda.core.JDABuilder;

import javax.security.auth.login.LoginException...

import jdk.nashorn.api.scripting.JSObject;
import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.ListAdapter...

public class main extends ListAdapter {
main(JSObject obj, Global global) {
super(global);
// TODO Auto-generated constructor stub
}

public static void main(string[] args) throws LoginException {
JDABuilder builder = new JDABuilder(accounttype.bot) ;
String token = "NTg5NzA2OTEwOTcwODA2Mjcy.XQauZg.Xy1OAHl... ;
Builder.SetToken(token);
Builder.addeventlistener(new main());
builder.buildAsync();
}


@Override
public void onMessageReceived(MessageReceivedEvent event) {
system.out.printin("We Recived Message From " +
event.getauthor().getname() + ": " +
event.getMessage().getContentDisplay()
);
if(event.getMessage().getContentraw().eq... {
event.getchannel().sendmessage( "pong!").queue();
}
}
}
1 answer 1