Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <channel.h>
Data Fields | |
u64snowflake | id |
enum discord_channel_types | type |
u64snowflake | guild_id |
int | position |
struct discord_overwrites * | permission_overwrites |
char * | name |
char * | topic |
bool | nsfw |
u64snowflake | last_message_id |
int | bitrate |
int | user_limit |
int | rate_limit_per_user |
struct discord_users * | recipients |
char * | icon |
u64snowflake | owner_id |
u64snowflake | application_id |
bool | managed |
u64snowflake | parent_id |
u64unix_ms | last_pin_timestamp |
char * | rtc_region |
int | voice_quality_mode |
int | message_count |
int | member_count |
struct discord_thread_metadata * | thread_metadata |
struct discord_thread_member * | member |
int | default_auto_archive_duration |
u64bitmask | permissions |
u64bitmask | flags |
int | total_message_sent |
struct discord_thread_tags * | available_tags |
struct snowflakes * | applied_tags |
struct discord_thread_default_reaction * | default_reaction_emoji |
int | default_thread_rate_limit_per_user |
enum discord_sort_order_types | default_sort_order |
enum discord_forum_layout_types | default_forum_layout |
Public methods
discord_channel_from_json(const char json[], size_t len, struct discord_channel *this)
discord_channel_from_jsmnf(jsmnf *root, const char json[], struct discord_channel *this)
u64snowflake discord_channel::id |
the ID of this channel
enum discord_channel_types discord_channel::type |
the type of channel
u64snowflake discord_channel::guild_id |
the ID of the guild (may be missing for some channel objects received over gateway guild dispatches)
int discord_channel::position |
sorting position of the channel
struct discord_overwrites* discord_channel::permission_overwrites |
explicit permission overwrites for members and roles
char* discord_channel::name |
the name of the channel (0-1024 characters)
char* discord_channel::topic |
the channel topic (0-1024 characters)
bool discord_channel::nsfw |
whether the channel is nsfw
u64snowflake discord_channel::last_message_id |
the id of the last message sent in this channel (may not point to an existing or valid message)
int discord_channel::bitrate |
the bitrate (in bits) of the voice channel
int discord_channel::user_limit |
the user limit of the voice channel
int discord_channel::rate_limit_per_user |
amount of seconds a user has to wait before sending another message (0-21600). bots, as well as users with the permission MANAGE_MESSAGES
or MANAGE_CHANNEL
are unaffected
struct discord_users* discord_channel::recipients |
array of user objects
char* discord_channel::icon |
icon hash of the group DM
u64snowflake discord_channel::owner_id |
id of the creator of the group DM or thread
u64snowflake discord_channel::application_id |
application ID of the group DM creator if its bot-created
bool discord_channel::managed |
for group DM channels: whether the channel is managed by an application via the gdm.join OAuth2 scope
u64snowflake discord_channel::parent_id |
for guild channels: ID of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created
u64unix_ms discord_channel::last_pin_timestamp |
when the last pinned message was pinned. This may be NULL
in events such as GUILD_CREATE
when a message is not pinned
char* discord_channel::rtc_region |
voice region ID for the voice channel, automatic when set to null
int discord_channel::voice_quality_mode |
the camera video quality mode of the voice channel, 1 when not present
int discord_channel::message_count |
an approximate count of messages in a thread, stops counting at 50
int discord_channel::member_count |
an approximate count of users in a thread, stops counting at 50
struct discord_thread_metadata* discord_channel::thread_metadata |
thread-specific fields not needed by other channels
struct discord_thread_member* discord_channel::member |
thread member object for the current user, if they have joined the thread, only included on certain API endpoints
int discord_channel::default_auto_archive_duration |
default duration that the clients (not the API) will use for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
u64bitmask discord_channel::permissions |
computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved
data received on a application command interaction
u64bitmask discord_channel::flags |
channel flags combined as a bitfield
int discord_channel::total_message_sent |
number of messages ever sent in a thread
struct discord_thread_tags* discord_channel::available_tags |
the set of tags that can be used in a GUILD_FORUM or a GUILD_MEDIA channel
struct snowflakes* discord_channel::applied_tags |
the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel
struct discord_thread_default_reaction* discord_channel::default_reaction_emoji |
the emoji to show in the add reaction button on a thread in a GUILD_FORUM or a GUILD_MEDIA channel
int discord_channel::default_thread_rate_limit_per_user |
the initial rate_limit_per_user to set on newly created threads in a channel
enum discord_sort_order_types discord_channel::default_sort_order |
the default sort order type used to order posts in GUILD_FORUM and GUILD_MEDIA channels
enum discord_forum_layout_types discord_channel::default_forum_layout |
he default forum layout view used to display posts in GUILD_FORUM channels