我正在尝试为 java discord bot 的不和谐消息的反应创建一个事件侦听器。我还没有找到任何与此相关的文档,而且我的尝试是徒劳的,我的想法是对消息做出反应的用户订阅了邮件列表。
public class accept extends ListenerAdapter {
public void onreactionAdded(MessageReactionAddEvent event) {
MessageReaction reaction = event.getReaction();
ReactionEmote emote = reaction.getReactionEmote();
MessageChannel channel = event.getChannel();
System.out.println("test");
channel.sendMessage("Commands:\n !notify - notifies users who have subscribed to mailing list").queue();
}
}