discord_run - start client connection to Discord

ORCAcode discord_run(struct discord *client)

Start a connection to the Discord Gateway.

Parameters
Returns

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

Example

void on_ready(struct discord *client)
{
  log_info("Up and running!");
}

int main(void)
{
  struct discord *client = discord_init(BOT_TOKEN);
  discord_set_on_ready(client, &on_ready);
  discord_run(client);
  discord_cleanup(client);
}