Skip to content

teamwire_api/roles

Role

class Role()

A directory role visible to the bot.

Attributes

  • id: unicode. The role id
  • name: unicode. The role name
  • visibility: unicode. Either "public" or "restricted"
  • organisation: Organisation object, if known
  • deleted: boolean. Whether the role has been deleted

get_members

async def get_members() -> list

Get role members as visible SDK User objects.

Unknown or deleted users are not included in the returned list.

Roles

class Roles()

An accessor to directory roles visible to the bot.

get_role

async def get_role(role_id: str) -> Role

Get one role by ID.

get_list

async def get_list() -> list[Role]

Get all non-deleted roles currently visible to the bot.