Create Guild Template#

ORCAcode discord_create_guild_template(struct discord *client, u64_snowflake_t guild_id, struct discord_create_guild_template_params *params, struct discord_guild_template *ret)#

Creates a template for the guild.

Note

Requires the MANAGE_GUILD permission

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

  • guild_id – the guild to create a template from

  • params – the request parameters

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

Returns:

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

struct discord_create_guild_template_params#

Methods

  • Initializer:

    • void discord_create_guild_template_params_init(struct discord_create_guild_template_params *)

  • Cleanup:

    • void discord_create_guild_template_params_cleanup(struct discord_create_guild_template_params *)

    • void discord_create_guild_template_params_list_free(struct discord_create_guild_template_params **)

  • JSON Decoder:

    • void discord_create_guild_template_params_from_json(char *rbuf, size_t len, struct discord_create_guild_template_params *)

    • void discord_create_guild_template_params_list_from_json(char *rbuf, size_t len, struct discord_create_guild_template_params ***)

  • JSON Encoder:

    • void discord_create_guild_template_params_to_json(char *wbuf, size_t len, struct discord_create_guild_template_params *)

    • void discord_create_guild_template_params_list_to_json(char *wbuf, size_t len, struct discord_create_guild_template_params **)

Public Members

char *name#

name of the guild

char *description#

description for the template (0-120) chars