Create Guild Channel#

ORCAcode discord_create_guild_channel(struct discord *client, u64_snowflake_t guild_id, struct discord_create_guild_channel_params *params, struct discord_channel *ret)#

Create a new guild channel.

Note

Requires the MANAGE_CHANNELS permission

Note

If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators

Note

Fires a Channel Create event

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

  • guild_id – id of the guild to create a channel at

  • params – request parameters

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

Returns:

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

struct discord_create_guild_channel_params#

Methods

  • Initializer:

    • void discord_create_guild_channel_params_init(struct discord_create_guild_channel_params *)

  • Cleanup:

    • void discord_create_guild_channel_params_cleanup(struct discord_create_guild_channel_params *)

    • void discord_create_guild_channel_params_list_free(struct discord_create_guild_channel_params **)

  • JSON Decoder:

    • void discord_create_guild_channel_params_from_json(char *rbuf, size_t len, struct discord_create_guild_channel_params *)

    • void discord_create_guild_channel_params_list_from_json(char *rbuf, size_t len, struct discord_create_guild_channel_params ***)

  • JSON Encoder:

    • void discord_create_guild_channel_params_to_json(char *wbuf, size_t len, struct discord_create_guild_channel_params *)

    • void discord_create_guild_channel_params_list_to_json(char *wbuf, size_t len, struct discord_create_guild_channel_params **)

Public Members

char *name#
int type#
char *topic#
int bitrate#
int user_limit#
int rate_limit_per_user#
int position#
struct discord_overwrite **permission_overwrites#
u64_snowflake_t parent_id#
bool nsfw#