简体   繁体   中英

How do you make a bot transfer it's ownership(of a discord server) to a user using the discord.py API?

Yes, the bot is the ownership account. I'm aware that in the discord.js documentation there are hints but I need it in discord.py

If anyone has an idea that would be great, thank you.

You can transfer ownership of a guild via the guild.edit() function. To set the new owner use

await guild.edit(owner = member)

where member is of type discord.Member and is supposed to be the new owner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM