Discord.py user.block/user.send_friend_request: Error 403/Forbidden 如何授予机器人发送好友请求和阻止用户的权限?

Discord.py user.block/user.send_friend_request: Error 403/Forbidden How do I give the bot permission to send friend requests and block users?

我目前正在尝试创建一个阻止用户并发送朋友请求命令。但是,我碰壁了。该机器人似乎没有对我的帐户的许可或授权,因此它无法发送好友请求或阻止用户。我如何给它权限?或者也许根本不可能?请告诉我,我将不胜感激:>

我当前的命令代码如下:

    @client.command()
    async def unfriend(ctx, *, user: discord.User):
        await user.remove_friend()
        await ctx.send('Friend has been removed')
    
    @client.command()
    async def sendrequest(ctx, *, user: discord.User):
        await user.send_friend_request()
        await ctx.author.send('Request sent')
@client.command()
async def block(ctx, *, user: discord.User):
    await user.block()
    await ctx.send(f'{member.mention} has been blocked by {ctx.author}')

@client.command()
async def unblock(ctx, *, user: discord.User):
    await user.unblock()
    await ctx.send(f"{member.mention} has been unblocked by {ctx.author}")

遗憾的是,Discord 不允许机器人用户添加、阻止或删除好友。您只能通过普通 Discord 用户执行这些操作,如果您通过该程序执行此操作,那将是自我机器人,这违反了 Discord 的服务条款。

在此处了解此 send_friend_request() 方法:

https://discordpy.readthedocs.io/en/latest/api.html?highlight=add%20friend#discord.User.send_friend_request

Discord 对自我机器人的立场:

https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-