Create Guild Ban#

ORCAcode discord_create_guild_ban(struct discord *client, u64_snowflake_t guild_id, u64_snowflake_t user_id, struct discord_create_guild_ban_params *params)#

Bans user from a given guild.

Note

Requires the BAN_MEMBERS permission

Note

Fires a Guild Ban Add event

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

  • guild_id – guild the user belongs to

  • user_id – the user to be banned

  • params – request parameters

Returns:

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

struct discord_create_guild_ban_params#

Methods

  • Initializer:

    • void discord_create_guild_ban_params_init(struct discord_create_guild_ban_params *)

  • Cleanup:

    • void discord_create_guild_ban_params_cleanup(struct discord_create_guild_ban_params *)

    • void discord_create_guild_ban_params_list_free(struct discord_create_guild_ban_params **)

  • JSON Decoder:

    • void discord_create_guild_ban_params_from_json(char *rbuf, size_t len, struct discord_create_guild_ban_params *)

    • void discord_create_guild_ban_params_list_from_json(char *rbuf, size_t len, struct discord_create_guild_ban_params ***)

  • JSON Encoder:

    • void discord_create_guild_ban_params_to_json(char *wbuf, size_t len, struct discord_create_guild_ban_params *)

    • void discord_create_guild_ban_params_list_to_json(char *wbuf, size_t len, struct discord_create_guild_ban_params **)

Public Members

int delete_message_days#

number of days to delete messages for(0-7)

char *reason#

reason for the ban (deprecated)