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 |
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 |
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
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