impl basic help command

This commit is contained in:
Lee
2024-06-27 16:01:27 +01:00
parent 175c8eba9f
commit a7c3e2d745
15 changed files with 219 additions and 30 deletions

View File

@ -7,6 +7,7 @@ import lombok.NonNull;
import lombok.extern.log4j.Log4j2;
import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent;
import net.dv8tion.jda.api.events.guild.member.GuildMemberRemoveEvent;
import net.dv8tion.jda.api.events.interaction.component.StringSelectInteractionEvent;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull;
@ -89,4 +90,17 @@ public class EventService extends ListenerAdapter {
listener.onGuildMessageReceive(guild, user, event);
}
}
@Override
public void onStringSelectInteraction(StringSelectInteractionEvent event) {
if (event.getUser().isBot()) {
return;
}
BatGuild guild = event.getGuild() != null ? guildService.getGuild(event.getGuild().getId()) : null;
BatUser user = userService.getUser(event.getUser().getId());
for (EventListener listener : LISTENERS) {
listener.onStringSelectInteraction(guild, user, event);
}
}
}