# 删除频道身份组

删除频道身份组。

import botpy
from botpy.message import Message

class MyClient(botpy.Client):
    async def on_at_message_create(self, message: Message):
        await self.api.delete_guild_role(guild_id="xxxx", role_id="xxxx")

intents = botpy.Intents(public_guild_messages=True)
client = MyClient(intents=intents)
client.run(appid={appid}, token={token})
1
2
3
4
5
6
7
8
9
10

# 参数说明

参数 必填 类型 说明
guild_id string 频道 ID
role_id string 身份组 ID

# 返回说明

是否删除成功

# 返回示例

data

True
1
手机QQ扫码
开发者社区
加入官方频道开发者社区