Skip to content

Commit

Permalink
api-guild-member-role-list
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 6, 2025
1 parent ca183fd commit 75e214f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion en-US/resources/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Triggered when a button of type `action` is clicked. Required resource: [`button

### interaction/command

Triggered when a slash command is invoked. At least one of the resources [`argv`](#def-argv) or `message` must be included.
Triggered when a slash command is invoked. At least one of the resources [`argv`](#def-argv) or [`message`](./message.md#def-message) must be included.

::: tip
Many platforms support slash commands, but their implementations vary. If the platform’s slash commands are only provided on the frontend and the bot cannot directly determine whether an event is a slash command invocation, it can be treated as a regular message event.
Expand Down
23 changes: 23 additions & 0 deletions en-US/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@ Set a role for a user in the guild.

Remove a role from a user in the guild.

### List Guild Member Roles {#api-guild-member-role-list}

> <badge>POST</badge> `/guild.member.role.list` {.route}
| FIELD | TYPE | DESCRIPTION |
| --- | --- | --- |
| guild_id | string | guild id |
| user_id | string | user id |
| next | string? | pagination token |

Get all roles for a user in a guild. Returns a [paginated list](../protocol/api.md#list) of [GuildRole](#def-guild-role) objects.

### Get Guild Role {#api-guild-role-get}

> <badge>POST</badge> `/guild.role.get` {.route}
| FIELD | TYPE | DESCRIPTION |
| --- | --- | --- |
| guild_id | string | guild id |
| role_id | string | role id |

Get a guild role. Returns a [GuildRole](#def-guild-role) object.

### Get Guild Role List {#api-guild-role-list}

> <badge>POST</badge> `/guild.role.list` {.route}
Expand Down
23 changes: 23 additions & 0 deletions zh-CN/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@

取消群组内用户的角色。

### 获取群组成员角色列表 {#api-guild-member-role-list}

> <badge>POST</badge> `/guild.member.role.list` {.route}
| 字段 | 类型 | 描述 |
| --- | --- | --- |
| guild_id | string | 群组 ID |
| user_id | string | 用户 ID |
| next | string? | 分页令牌 |

获取群组内用户的角色列表。返回一个 [GuildRole](#def-guild-role)[分页列表](../protocol/api.md#list)

### 获取群组角色 {#api-guild-role-get}

> <badge>POST</badge> `/guild.role.get` {.route}
| 字段 | 类型 | 描述 |
| --- | --- | --- |
| guild_id | string | 群组 ID |
| role_id | string | 角色 ID |

获取群组角色。返回一个 [GuildRole](#def-guild-role) 对象。

### 获取群组角色列表 {#api-guild-role-list}

> <badge>POST</badge> `/guild.role.list` {.route}
Expand Down

0 comments on commit 75e214f

Please sign in to comment.