Create Guild#

ORCAcode discord_create_guild(struct discord *client, struct discord_create_guild_params *params, struct discord_guild *ret)#

Create a new guild.

Note

Fires a Guild Create event

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

  • params – request parameters

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

Returns:

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

struct discord_create_guild_params#

Methods

  • Initializer:

    • void discord_create_guild_params_init(struct discord_create_guild_params *)

  • Cleanup:

    • void discord_create_guild_params_cleanup(struct discord_create_guild_params *)

    • void discord_create_guild_params_list_free(struct discord_create_guild_params **)

  • JSON Decoder:

    • void discord_create_guild_params_from_json(char *rbuf, size_t len, struct discord_create_guild_params *)

    • void discord_create_guild_params_list_from_json(char *rbuf, size_t len, struct discord_create_guild_params ***)

  • JSON Encoder:

    • void discord_create_guild_params_to_json(char *wbuf, size_t len, struct discord_create_guild_params *)

    • void discord_create_guild_params_list_to_json(char *wbuf, size_t len, struct discord_create_guild_params **)

Public Members

char *name#

name of the guild (2-100) characters

char *region#

voice region id

char *icon#

base64 128x1128 image for the guild icon

int verification_level#

verification level

int default_message_notifications#

default message notification level

int explicit_content_filter#

explicit content filter level

struct discord_role **roles#

new guild roles

struct discord_channel **channels#

array of partial channel objects

u64_snowflake_t afk_channel_id#

id for afk channel

int afk_timeout#

afk timeout in seconds

u64_snowflake_t system_channel_id#

the id of the channel where guild notices such as welcome messages and boost events are posted