package moe.oko.Kiafumi.listener; import moe.oko.Kiafumi.Kiafumi; import net.dv8tion.jda.api.events.guild.GuildJoinEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import static moe.oko.Kiafumi.Kiafumi.info; /** * Main Listener * Used for all utility garbage like guild handling and persistence. (Also LOL prevention). */ public class MainListener extends ListenerAdapter { /** * GuildJoin event listener, that ensures that a discord has a profile created for it. * @param event - event to be handled... */ @Override public void onGuildJoin(GuildJoinEvent event) { //Automatically create our default information for the server if we don't have it already. info("Joined a new guild, NAME: " + event.getGuild().getName() + " ID: " + event.getGuild().getId()); Kiafumi.instance.getDatabase().createServerInformation(event.getGuild()); } }