Modify Guild Role#

ORCAcode discord_modify_guild_role(struct discord *client, u64_snowflake_t guild_id, u64_snowflake_t role_id, struct discord_modify_guild_role_params *params, struct discord_role *ret)#

Modify a guild role.

Note

Requires the MANAGE_ROLES permission

Note

Fires a Guild Role Update event

Parameters:
  • client – the client created with discord_init()

  • guild_id – the unique id of the guild that the role belongs to

  • role_id – the unique id of the role to modify

  • params – request parameters

  • ret – if successful, a discord_role that should be free’d with discord_role_cleanup()

Returns:

ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary

struct discord_modify_guild_role_params#

Methods

  • Initializer:

    • void discord_modify_guild_role_params_init(struct discord_modify_guild_role_params *)

  • Cleanup:

    • void discord_modify_guild_role_params_cleanup(struct discord_modify_guild_role_params *)

    • void discord_modify_guild_role_params_list_free(struct discord_modify_guild_role_params **)

  • JSON Decoder:

    • void discord_modify_guild_role_params_from_json(char *rbuf, size_t len, struct discord_modify_guild_role_params *)

    • void discord_modify_guild_role_params_list_from_json(char *rbuf, size_t len, struct discord_modify_guild_role_params ***)

  • JSON Encoder:

    • void discord_modify_guild_role_params_to_json(char *wbuf, size_t len, struct discord_modify_guild_role_params *)

    • void discord_modify_guild_role_params_list_to_json(char *wbuf, size_t len, struct discord_modify_guild_role_params **)

Public Members

char *name#

name of the role

u64_bitmask_t permissions#

bitwise value of the enabled/disabled permissions

int color#

RGB color value

bool hoist#

whether the role should be displayed separately in the sidebar

bool mentionable#

whether the role should be mentionable