Search in sources :

Example 1 with UserChangeNameEvent

use of org.javacord.api.event.user.UserChangeNameEvent in project Javacord by BtoBastian.

the class GuildMemberUpdateHandler method dispatchUserChangeNameEvent.

private void dispatchUserChangeNameEvent(User user, String newName, String oldName) {
    UserChangeNameEvent event = new UserChangeNameEventImpl(user, newName, oldName);
    api.getEventDispatcher().dispatchUserChangeNameEvent(api, user.getMutualServers(), Collections.singleton(user), event);
}
Also used : UserChangeNameEventImpl(org.javacord.core.event.user.UserChangeNameEventImpl) UserChangeNameEvent(org.javacord.api.event.user.UserChangeNameEvent)

Aggregations

UserChangeNameEvent (org.javacord.api.event.user.UserChangeNameEvent)1 UserChangeNameEventImpl (org.javacord.core.event.user.UserChangeNameEventImpl)1