19 lines
638 B
Java
19 lines
638 B
Java
|
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;
|
||
|
|
||
|
public class MainListener extends ListenerAdapter {
|
||
|
|
||
|
@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());
|
||
|
}
|
||
|
|
||
|
}
|