Concord - C Discord API library
A Discord API wrapper library written in C
channel.h
Go to the documentation of this file.
1
7#ifndef DISCORD_CHANNEL_H
8#define DISCORD_CHANNEL_H
9
10/* forward declaration */
12
13
30 u64snowflake channel_id,
31 struct discord_ret_channel *ret);
32
43 u64snowflake channel_id,
44 struct discord_modify_channel *params,
45 struct discord_ret_channel *ret);
46
64 u64snowflake channel_id,
65 struct discord_delete_channel *params,
66 struct discord_ret_channel *ret);
67
85 struct discord *client,
86 u64snowflake channel_id,
87 struct discord_get_channel_messages *params,
88 struct discord_ret_messages *ret);
89
101 u64snowflake channel_id,
102 u64snowflake message_id,
103 struct discord_ret_message *ret);
104
116 u64snowflake channel_id,
117 struct discord_create_message *params,
118 struct discord_ret_message *ret);
119
134 u64snowflake channel_id,
135 u64snowflake message_id,
136 struct discord_ret_message *ret);
137
150 u64snowflake channel_id,
151 u64snowflake message_id,
152 u64snowflake emoji_id,
153 const char emoji_name[],
154 struct discord_ret *ret);
155
168 u64snowflake channel_id,
169 u64snowflake message_id,
170 u64snowflake emoji_id,
171 const char emoji_name[],
172 struct discord_ret *ret);
173
187 u64snowflake channel_id,
188 u64snowflake message_id,
189 u64snowflake user_id,
190 u64snowflake emoji_id,
191 const char emoji_name[],
192 struct discord_ret *ret);
193
207 u64snowflake channel_id,
208 u64snowflake message_id,
209 u64snowflake emoji_id,
210 const char emoji_name[],
211 struct discord_get_reactions *params,
212 struct discord_ret_users *ret);
213
224 u64snowflake channel_id,
225 u64snowflake message_id,
226 struct discord_ret *ret);
227
241 u64snowflake channel_id,
242 u64snowflake message_id,
243 u64snowflake emoji_id,
244 const char emoji_name[],
245 struct discord_ret *ret);
246
259 u64snowflake channel_id,
260 u64snowflake message_id,
261 struct discord_edit_message *params,
262 struct discord_ret_message *ret);
263
275 u64snowflake channel_id,
276 u64snowflake message_id,
277 struct discord_delete_message *params,
278 struct discord_ret *ret);
279
290 struct discord *client,
291 u64snowflake channel_id,
292 struct discord_bulk_delete_messages *params,
293 struct discord_ret *ret);
294
307 struct discord *client,
308 u64snowflake channel_id,
309 u64snowflake overwrite_id,
311 struct discord_ret *ret);
312
322 u64snowflake channel_id,
323 struct discord_ret_invites *ret);
324
335 struct discord *client,
336 u64snowflake channel_id,
337 struct discord_create_channel_invite *params,
338 struct discord_ret_invite *ret);
339
352 struct discord *client,
353 u64snowflake channel_id,
354 u64snowflake overwrite_id,
356 struct discord_ret *ret);
357
367 u64snowflake channel_id,
368 struct discord_ret *ret);
369
381 struct discord *client,
382 u64snowflake channel_id,
383 struct discord_follow_news_channel *params,
384 struct discord_ret_followed_channel *ret);
385
395 u64snowflake channel_id,
396 struct discord_ret_messages *ret);
397
409 u64snowflake channel_id,
410 u64snowflake message_id,
411 struct discord_pin_message *params,
412 struct discord_ret *ret);
413
425 u64snowflake channel_id,
426 u64snowflake message_id,
427 struct discord_unpin_message *params,
428 struct discord_ret *ret);
429
441 struct discord *client,
442 u64snowflake channel_id,
443 u64snowflake user_id,
444 struct discord_group_dm_add_recipient *params,
445 struct discord_ret *ret);
446
457 u64snowflake channel_id,
458 u64snowflake user_id,
459 struct discord_ret *ret);
460
473 struct discord *client,
474 u64snowflake channel_id,
475 u64snowflake message_id,
477 struct discord_ret_channel *ret);
478
490 struct discord *client,
491 u64snowflake channel_id,
493 struct discord_ret_channel *ret);
494
505 u64snowflake channel_id,
506 struct discord_ret *ret);
507
519 u64snowflake channel_id,
520 u64snowflake user_id,
521 struct discord_ret *ret);
522
533 u64snowflake channel_id,
534 struct discord_ret *ret);
535
548 u64snowflake channel_id,
549 u64snowflake user_id,
550 struct discord_ret *ret);
551
563 u64snowflake channel_id,
564 struct discord_ret_thread_members *ret);
565
578 struct discord *client,
579 u64snowflake channel_id,
581
593 struct discord *client,
594 u64snowflake channel_id,
595 u64unix_ms before,
596 int limit,
598
610 struct discord *client,
611 u64snowflake channel_id,
612 u64unix_ms before,
613 int limit,
615
627 struct discord *client,
628 u64snowflake channel_id,
629 u64unix_ms before,
630 int limit,
632
646void discord_embed_set_title(struct discord_embed *embed, char format[], ...);
647
658 char format[],
659 ...);
660
670void discord_embed_set_url(struct discord_embed *embed, char format[], ...);
671
684 char url[],
685 char proxy_url[],
686 int height,
687 int width);
700 char url[],
701 char proxy_url[],
702 int height,
703 int width);
704
717 char url[],
718 char proxy_url[],
719 int height,
720 int width);
721
733 char text[],
734 char icon_url[],
735 char proxy_icon_url[]);
736
747 char name[],
748 char url[]);
749
762 char name[],
763 char url[],
764 char icon_url[],
765 char proxy_icon_url[]);
766
778 char name[],
779 char value[],
780 bool Inline);
781
798 u64snowflake guild_id,
799 enum discord_channel_types type,
800 int position,
801 struct discord_ret_channel *ret);
802
814void discord_overwrite_append(struct discord_overwrites *permission_overwrites,
815 u64snowflake id,
816 int type,
817 u64bitmask allow,
818 u64bitmask deny);
819
837#endif /* DISCORD_CHANNEL_H */
discord_channel_types
Definition: channel.h:48
CCORDcode
Definition: error.h:12
uint64_t u64snowflake
Snowflake datatype.
Definition: types.h:28
uint64_t u64bitmask
Bitmask primitive.
Definition: types.h:35
uint64_t u64unix_ms
Unix time in milliseconds.
Definition: types.h:22
void discord_embed_set_url(struct discord_embed *embed, char format[],...)
Add URL to embed.
void discord_embed_set_video(struct discord_embed *embed, char url[], char proxy_url[], int height, int width)
Add video to embed.
void discord_embed_set_footer(struct discord_embed *embed, char text[], char icon_url[], char proxy_icon_url[])
Add footer to embed.
void discord_embed_set_description(struct discord_embed *embed, char format[],...)
Add description to embed.
void discord_embed_set_title(struct discord_embed *embed, char format[],...)
Add title to embed.
void discord_embed_set_author(struct discord_embed *embed, char name[], char url[], char icon_url[], char proxy_icon_url[])
Add author to embed.
void discord_embed_add_field(struct discord_embed *embed, char name[], char value[], bool Inline)
Add field to embed.
void discord_embed_set_image(struct discord_embed *embed, char url[], char proxy_url[], int height, int width)
Add image to embed.
void discord_embed_set_thumbnail(struct discord_embed *embed, char url[], char proxy_url[], int height, int width)
Add thumbnail to embed.
void discord_embed_set_provider(struct discord_embed *embed, char name[], char url[])
Add provider to embed.
void discord_overwrite_append(struct discord_overwrites *permission_overwrites, u64snowflake id, int type, u64bitmask allow, u64bitmask deny)
Append to an overwrite list.
CCORDcode discord_get_channel_at_pos(struct discord *client, u64snowflake guild_id, enum discord_channel_types type, int position, struct discord_ret_channel *ret)
Get a guild's channel from its given numerical position.
CCORDcode discord_delete_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_delete_message *params, struct discord_ret *ret)
Delete a message.
CCORDcode discord_add_thread_member(struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
Adds another member to an un-archived thread.
CCORDcode discord_create_message(struct discord *client, u64snowflake channel_id, struct discord_create_message *params, struct discord_ret_message *ret)
Post a message to a guild text or DM channel.
CCORDcode discord_start_thread_with_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_start_thread_with_message *params, struct discord_ret_channel *ret)
Creates a new thread from an existing message.
CCORDcode discord_join_thread(struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
Adds the current user to an un-archived thread.
CCORDcode discord_delete_own_reaction(struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
Delete a reaction the current user has made for the message.
CCORDcode discord_delete_user_reaction(struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake user_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
Deletes another user's reaction.
CCORDcode discord_pin_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_pin_message *params, struct discord_ret *ret)
Pin a message to a channel.
CCORDcode discord_get_reactions(struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_get_reactions *params, struct discord_ret_users *ret)
Get a list of users that reacted with given emoji.
CCORDcode discord_start_thread_without_message(struct discord *client, u64snowflake channel_id, struct discord_start_thread_without_message *params, struct discord_ret_channel *ret)
Creates a new thread that is not connected to an existing message.
CCORDcode discord_remove_thread_member(struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
Removes another member from a un-archived thread.
CCORDcode discord_delete_channel_permission(struct discord *client, u64snowflake channel_id, u64snowflake overwrite_id, struct discord_delete_channel_permission *params, struct discord_ret *ret)
Delete a channel permission overwrite for a user or role in a channel.
CCORDcode discord_list_public_archived_threads(struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
Get public archived threads in a given channel.
CCORDcode discord_group_dm_add_recipient(struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_group_dm_add_recipient *params, struct discord_ret *ret)
Adds a recipient to a Group DM using their access token.
CCORDcode discord_get_pinned_messages(struct discord *client, u64snowflake channel_id, struct discord_ret_messages *ret)
Get all pinned messages in the channel.
CCORDcode discord_get_channel_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret_message *ret)
Get a specific message in the channel.
CCORDcode discord_modify_channel(struct discord *client, u64snowflake channel_id, struct discord_modify_channel *params, struct discord_ret_channel *ret)
Update a channel's settings.
CCORDcode discord_edit_channel_permissions(struct discord *client, u64snowflake channel_id, u64snowflake overwrite_id, struct discord_edit_channel_permissions *params, struct discord_ret *ret)
Edit the channel permission overwrites for a user or role in a channel.
CCORDcode discord_leave_thread(struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
Removes the current user from a un-archived thread.
CCORDcode discord_list_joined_private_archived_threads(struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
Get private archived threads that current user has joined.
CCORDcode discord_get_channel(struct discord *client, u64snowflake channel_id, struct discord_ret_channel *ret)
Get channel from given id.
CCORDcode discord_list_active_threads(struct discord *client, u64snowflake channel_id, struct discord_ret_thread_response_body *ret)
Get all active threads in a given channel.
CCORDcode discord_group_dm_remove_recipient(struct discord *client, u64snowflake channel_id, u64snowflake user_id, struct discord_ret *ret)
Removes a recipient from a Group DM.
CCORDcode discord_list_thread_members(struct discord *client, u64snowflake channel_id, struct discord_ret_thread_members *ret)
Get members from a given thread channel.
CCORDcode discord_bulk_delete_messages(struct discord *client, u64snowflake channel_id, struct discord_bulk_delete_messages *params, struct discord_ret *ret)
Delete multiple messages in a single request.
CCORDcode discord_edit_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_edit_message *params, struct discord_ret_message *ret)
Edit a previously sent message.
CCORDcode discord_get_channel_invites(struct discord *client, u64snowflake channel_id, struct discord_ret_invites *ret)
Get invites (with invite metadata) for the channel.
CCORDcode discord_delete_channel(struct discord *client, u64snowflake channel_id, struct discord_delete_channel *params, struct discord_ret_channel *ret)
Delete a channel, or close a private message.
CCORDcode discord_delete_all_reactions(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret *ret)
Deletes all reactions from message.
CCORDcode discord_create_reaction(struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
Create a reaction for the message.
CCORDcode discord_crosspost_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_ret_message *ret)
Crosspost a message in a News Channel to following channels.
CCORDcode discord_list_private_archived_threads(struct discord *client, u64snowflake channel_id, u64unix_ms before, int limit, struct discord_ret_thread_response_body *ret)
Get private archived threads in a given channel.
CCORDcode discord_follow_news_channel(struct discord *client, u64snowflake channel_id, struct discord_follow_news_channel *params, struct discord_ret_followed_channel *ret)
Follow a News Channel to send messages to a target channel.
CCORDcode discord_create_channel_invite(struct discord *client, u64snowflake channel_id, struct discord_create_channel_invite *params, struct discord_ret_invite *ret)
Create a new invite for the channel.
CCORDcode discord_unpin_message(struct discord *client, u64snowflake channel_id, u64snowflake message_id, struct discord_unpin_message *params, struct discord_ret *ret)
Unpin a message from a channel.
CCORDcode discord_delete_all_reactions_for_emoji(struct discord *client, u64snowflake channel_id, u64snowflake message_id, u64snowflake emoji_id, const char emoji_name[], struct discord_ret *ret)
Deletes all the reactions for a given emoji on message.
CCORDcode discord_get_channel_messages(struct discord *client, u64snowflake channel_id, struct discord_get_channel_messages *params, struct discord_ret_messages *ret)
Get messages for a given channel.
CCORDcode discord_trigger_typing_indicator(struct discord *client, u64snowflake channel_id, struct discord_ret *ret)
Post a typing indicator for the specified channel.
Definition: channel.h:755
Definition: channel.h:779
Definition: channel.h:683
Definition: channel.h:815
Definition: channel.h:660
Definition: channel.h:750
Definition: channel.h:762
Definition: channel.h:727
Definition: channel.h:397
Definition: channel.h:820
Definition: channel.h:664
Definition: channel.h:716
Definition: channel.h:835
Definition: channel.h:587
Definition: channel.h:313
Definition: channel.h:826
Request's return context.
Definition: discord-response.h:84
Request's return context.
Definition: discord-response.h:88
Request's return context.
Definition: discord-response.h:132
Request's return context.
Definition: discord-response.h:133
Request's return context.
Definition: discord-response.h:86
Request's return context.
Definition: discord-response.h:87
Request's return context.
Definition: discord-response.h:89
Request's return context.
Definition: discord-response.h:90
Request's return context.
Definition: discord-response.h:151
Request's return context.
Definition: discord-response.h:54
Definition: channel.h:842
Definition: channel.h:859
Definition: channel.h:830
The Discord client handler.
Definition: discord-internal.h:1182