forked from Fascinated/Bat
impl member avatar update logging
This commit is contained in:
@ -21,6 +21,7 @@ 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.user.update.UserUpdateAvatarEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateGlobalNameEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateNameEvent;
|
||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||
@ -277,4 +278,16 @@ public class EventService extends ListenerAdapter {
|
||||
listener.onUserUpdateName(user, event.getOldName(), event.getNewName(), event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserUpdateAvatar(@NotNull UserUpdateAvatarEvent event) {
|
||||
if (event.getUser().isBot()) {
|
||||
return;
|
||||
}
|
||||
BatUser user = userService.getUser(event.getUser().getId());
|
||||
|
||||
for (EventListener listener : LISTENERS) {
|
||||
listener.onUserUpdateAvatar(user, event.getOldAvatarUrl(), event.getNewAvatarUrl(), event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user