forked from Fascinated/Bat
add role create, delete, rename and update permissions logs
This commit is contained in:
@ -31,6 +31,10 @@ import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
|
||||
import net.dv8tion.jda.api.events.interaction.component.StringSelectInteractionEvent;
|
||||
import net.dv8tion.jda.api.events.message.MessageDeleteEvent;
|
||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||
import net.dv8tion.jda.api.events.role.RoleCreateEvent;
|
||||
import net.dv8tion.jda.api.events.role.RoleDeleteEvent;
|
||||
import net.dv8tion.jda.api.events.role.update.RoleUpdateNameEvent;
|
||||
import net.dv8tion.jda.api.events.role.update.RoleUpdatePermissionsEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateAvatarEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateGlobalNameEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateNameEvent;
|
||||
@ -401,4 +405,40 @@ public class EventService extends ListenerAdapter {
|
||||
listener.onPermissionOverride(guild, event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoleUpdatePermissions(@NotNull RoleUpdatePermissionsEvent event) {
|
||||
BatGuild guild = guildService.getGuild(event.getGuild().getId());
|
||||
|
||||
for (EventListener listener : LISTENERS) {
|
||||
listener.onRoleUpdatePermissions(guild, event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoleCreate(@NotNull RoleCreateEvent event) {
|
||||
BatGuild guild = guildService.getGuild(event.getGuild().getId());
|
||||
|
||||
for (EventListener listener : LISTENERS) {
|
||||
listener.onRoleCreate(guild, event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoleDelete(@NotNull RoleDeleteEvent event) {
|
||||
BatGuild guild = guildService.getGuild(event.getGuild().getId());
|
||||
|
||||
for (EventListener listener : LISTENERS) {
|
||||
listener.onRoleDelete(guild, event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRoleUpdateName(@NotNull RoleUpdateNameEvent event) {
|
||||
BatGuild guild = guildService.getGuild(event.getGuild().getId());
|
||||
|
||||
for (EventListener listener : LISTENERS) {
|
||||
listener.onRoleUpdateName(guild, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user