Комментарии:
@Override
public void onMessageReceived(MessageReceivedEvent event) {
String message = event.getMessage().getContentRaw();
if (message.contains("ping")) {
event.getChannel().sendMessage("pong").queue();
}
}
This part didn't work for me. Did anyone figure this out? I've tried to change the version that this guy used but still didn't work.
Hey! How can I make the code to also say who removed the reactions?
Please help out:)
mine sendMessage is red
ОтветитьI get a error when I try to do the event.getGuild.getDefaultChannel it wont let me put in sendmessage
ОтветитьIf your code isn’t working for the events it might be because of the new gateway intents
Ответитьit gives this error String emoji = event.getreaction().getReactionEmote.getAsReactionCode() why?
ОтветитьIf you say something like PiNg then it wont say pong, but when I use .toLowerCase() the bot non stop spams messages into the chat. why does this happen?
ОтветитьgetContentDisplay() just doesn't seem to work. I have tried everything I could imagine but for some reason he does not get the content of the message. he realises that there is a message and where it is but not the content of it.
Ответитьthank you for these videos👍
ОтветитьGetting an override error when trying to have two overriden methods in the same class despite there method signatures being the same, anyone having this issue with the "onMessageRecieved" example?
ОтветитьIf you are getting an error when doing the "event.getGuild().getDefaultChannel().senMessage(message).queue();" It seemed to work for me when I did "event.getGuild().getDefaultChannel().asStandardGuildMessageChannel().sendMessage(message).queue();"
Ответитьim having an issue where when i get the message content like ```String message = event.getMessage().getContentRaw();``` the content is always noting
edit: nevermind that was just an issue with alpha.17 version i switched to alpha.12 and it works fine now :)
Why does my bot send "this guy used this reaction" messages in the rules?
Edit: What is a "default channel" and why would the rules be it?