UBrain
UBrain

Reputation: 33

Change a server's owner

I want to change the server's owner for my private bot.
I tried guild.setOwner() but it did not work...

Upvotes: 1

Views: 2585

Answers (1)

André
André

Reputation: 4497

You can't.
To change the owner of a server, you must be the owner. And as far as I know, bots can't have ownership of servers.

When I say that you must be the owner, I mean the account that is running the function. If you are the owner, and you're trying to change the owner with the bot, you won't be able, because the bot is not the owner.


EDIT: Aparently bots can have ownership of a Discord Server, but the bot must create the server. To change the ownership of the server (if the bot has it) you do <guild>.setOwner(<GuildMemberResolvable>)

https://discord.js.org/#/docs/main/stable/typedef/GuildMemberResolvable

Upvotes: 3

Related Questions