|
Concord - C Discord API library
A Discord API wrapper library written in C
|
Webhook's public API supported by Concord. More...
Data Structures | |
| struct | discord_ret_webhook |
| Request's return context. More... | |
| struct | discord_ret_webhooks |
| Request's return context. More... | |
Functions | |
| CCORDcode | discord_create_webhook (struct discord *client, u64snowflake channel_id, struct discord_create_webhook *params, struct discord_ret_webhook *ret) |
| Create a new webhook. More... | |
| CCORDcode | discord_get_channel_webhooks (struct discord *client, u64snowflake channel_id, struct discord_ret_webhooks *ret) |
| Get webhooks from a given channel. More... | |
| CCORDcode | discord_get_guild_webhooks (struct discord *client, u64snowflake guild_id, struct discord_ret_webhooks *ret) |
| Get webhooks from a given guild webhook objects. More... | |
| CCORDcode | discord_get_webhook (struct discord *client, u64snowflake webhook_id, struct discord_ret_webhook *ret) |
| Get the new webhook object for the given id. More... | |
| CCORDcode | discord_get_webhook_with_token (struct discord *client, u64snowflake webhook_id, const char webhook_token[], struct discord_ret_webhook *ret) |
| CCORDcode | discord_modify_webhook (struct discord *client, u64snowflake webhook_id, struct discord_modify_webhook *params, struct discord_ret_webhook *ret) |
| Modify a webhook. More... | |
| CCORDcode | discord_modify_webhook_with_token (struct discord *client, u64snowflake webhook_id, const char webhook_token[], struct discord_modify_webhook_with_token *params, struct discord_ret_webhook *ret) |
| CCORDcode | discord_delete_webhook (struct discord *client, u64snowflake webhook_id, struct discord_delete_webhook *params, struct discord_ret *ret) |
| CCORDcode | discord_delete_webhook_with_token (struct discord *client, u64snowflake webhook_id, const char webhook_token[], struct discord_ret *ret) |
| CCORDcode | discord_execute_webhook (struct discord *client, u64snowflake webhook_id, const char webhook_token[], struct discord_execute_webhook *params, struct discord_ret *ret) |
| CCORDcode | discord_get_webhook_message (struct discord *client, u64snowflake webhook_id, const char webhook_token[], u64snowflake message_id, struct discord_ret_message *ret) |
| Get previously-sent webhook message from the same token. More... | |
| CCORDcode | discord_edit_webhook_message (struct discord *client, u64snowflake webhook_id, const char webhook_token[], u64snowflake message_id, struct discord_edit_webhook_message *params, struct discord_ret_message *ret) |
| Edits a previously-sent webhook message from the same token. More... | |
| CCORDcode | discord_delete_webhook_message (struct discord *client, u64snowflake webhook_id, const char webhook_token[], u64snowflake message_id, struct discord_ret *ret) |
| Deletes a message that was created by the webhook. More... | |
Webhook's public API supported by Concord.
| CCORDcode discord_create_webhook | ( | struct discord * | client, |
| u64snowflake | channel_id, | ||
| struct discord_create_webhook * | params, | ||
| struct discord_ret_webhook * | ret | ||
| ) |
Create a new webhook.
| client | the client created with discord_init() |
| channel_id | the channel that the webhook belongs to |
| params | request parameters |
| ret | return context of the request. if successful a discord_webhook will be sent over to its assigned done callback |
| CCORDcode discord_get_channel_webhooks | ( | struct discord * | client, |
| u64snowflake | channel_id, | ||
| struct discord_ret_webhooks * | ret | ||
| ) |
Get webhooks from a given channel.
| client | the client created with discord_init() |
| channel_id | the channel that the webhooks belongs to |
| ret | return context of the request. if successful a discord_webhooks will be sent over to its assigned done callback |
| CCORDcode discord_get_guild_webhooks | ( | struct discord * | client, |
| u64snowflake | guild_id, | ||
| struct discord_ret_webhooks * | ret | ||
| ) |
Get webhooks from a given guild webhook objects.
| client | the client created with discord_init() |
| guild_id | the guild that the webhooks belongs to |
| ret | return context of the request. if successful a discord_webhooks will be sent over to its assigned done callback |
| CCORDcode discord_get_webhook | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| struct discord_ret_webhook * | ret | ||
| ) |
Get the new webhook object for the given id.
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| ret | return context of the request. if successful a discord_webhook will be sent over to its assigned done callback |
| CCORDcode discord_get_webhook_with_token | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| struct discord_ret_webhook * | ret | ||
| ) |
Same as discord_get_webhook(), except this call does not require authentication and returns no user in the webhook object
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| ret | return context of the request. if successful a discord_webhook will be sent over to its assigned done callback |
| CCORDcode discord_modify_webhook | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| struct discord_modify_webhook * | params, | ||
| struct discord_ret_webhook * | ret | ||
| ) |
Modify a webhook.
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| params | request parameters |
| ret | return context of the request. if successful a discord_webhook will be sent over to its assigned done callback |
| CCORDcode discord_modify_webhook_with_token | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| struct discord_modify_webhook_with_token * | params, | ||
| struct discord_ret_webhook * | ret | ||
| ) |
Same discord_modify_webhook(), except this call does not require authentication and returns no user in the webhook object
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| params | request parameters |
| ret | return context of the request. if successful a discord_webhook will be sent over to its assigned done callback |
| CCORDcode discord_delete_webhook | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| struct discord_delete_webhook * | params, | ||
| struct discord_ret * | ret | ||
| ) |
Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| params | request parameters |
| ret | return context of the request. if successful the assigned done will be triggered |
| CCORDcode discord_delete_webhook_with_token | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| struct discord_ret * | ret | ||
| ) |
Same discord_delete_webhook(), except this call does not require authentication
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| ret | return context of the request. if successful the assigned done will be triggered |
| CCORDcode discord_execute_webhook | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| struct discord_execute_webhook * | params, | ||
| struct discord_ret * | ret | ||
| ) |
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| params | request parameters |
| ret | return context of the request. if successful the assigned done will be triggered |
| CCORDcode discord_get_webhook_message | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| u64snowflake | message_id, | ||
| struct discord_ret_message * | ret | ||
| ) |
Get previously-sent webhook message from the same token.
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| message_id | the message the webhook belongs to |
| ret | return context of the request. if successful a discord_message will be sent over to its assigned done callback |
| CCORDcode discord_edit_webhook_message | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| u64snowflake | message_id, | ||
| struct discord_edit_webhook_message * | params, | ||
| struct discord_ret_message * | ret | ||
| ) |
Edits a previously-sent webhook message from the same token.
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| message_id | the message the webhook belongs to |
| params | request parameters |
| ret | return context of the request. if successful a discord_message will be sent over to its assigned done callback |
| CCORDcode discord_delete_webhook_message | ( | struct discord * | client, |
| u64snowflake | webhook_id, | ||
| const char | webhook_token[], | ||
| u64snowflake | message_id, | ||
| struct discord_ret * | ret | ||
| ) |
Deletes a message that was created by the webhook.
| client | the client created with discord_init() |
| webhook_id | the webhook itself |
| webhook_token | the webhook token |
| message_id | the message the webhook belongs to |
| ret | return context of the request. if successful the assigned done will be triggered |