setUsername method

Future<void> setUsername(
  1. String value,
  2. String? reason
)

Change the member's username.

await member.setUsername('new-username', 'Testing');

Implementation

Future<void> setUsername(String value, String? reason) =>
    _memberMethods.updateMember(
        serverId: server.id,
        memberId: id,
        payload: {'username': value},
        reason: reason);