lem*_*tea 0 python permissions discord discord.py
我正在 discord.py 库中寻找一种方法来返回已部署机器人的服务器的所有者。现在我只是对其进行了硬编码(即
if message.content == '!owner':
await message.channel.send('ownername#1234')
Run Code Online (Sandbox Code Playgroud)
),但是当所有者更改他们的名字时,我必须更改它,这似乎很麻烦。我已经查看了 discord.py 的权限系统,但它似乎没有这样做。有什么可以做到这一点吗?
您正在寻找 Guild.owner
await message.channel.send(str(message.guild.owner))
Run Code Online (Sandbox Code Playgroud)