const group = client.groups.cache.get('12345')
group.transferOwnershipTo('67890');
Apparently, the API only does change_owner requests in bulk for some reason. This is dumb, so the library will not reflect this bulk transfer operation. Instead, transfers will be done directly on Group instances and each call will only send one change_owner request, despite the API allowing for multiple to be sent at once.
Group#transferOwnershipTo(newOwner: string): Promise<Group>
Transfers ownership of a group to another user.
Usage:
Apparently, the API only does
change_owner
requests in bulk for some reason. This is dumb, so the library will not reflect this bulk transfer operation. Instead, transfers will be done directly onGroup
instances and each call will only send onechange_owner
request, despite the API allowing for multiple to be sent at once.