Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <channel.h>
Public methods
discord_message_from_json(const char json[], size_t len, struct discord_message *this)
discord_message_from_jsmnf(jsmnf *root, const char json[], struct discord_message *this)
u64snowflake discord_message::id |
ID of the message
u64snowflake discord_message::channel_id |
ID of the channel the message was sent in
u64snowflake discord_message::guild_id |
ID of the guild the message was sent in
struct discord_user* discord_message::author |
the author of this message (not guaranteed to be a valid user)
struct discord_guild_member* discord_message::member |
partial guild member
char* discord_message::content |
contents of the message
u64unix_ms discord_message::timestamp |
when this message was sent
u64unix_ms discord_message::edited_timestamp |
when this message was edited (or null if never)
bool discord_message::tts |
whether this was a TTS message
bool discord_message::mention_everyone |
whether this message mentions everyone
struct discord_users* discord_message::mentions |
FIXME: expects additional member field users specifically mentioned in the message
struct snowflakes* discord_message::mention_roles |
roles specifically mentioned in this message
struct discord_channels* discord_message::mention_channels |
channels specifically mentioned in this message
struct discord_attachments* discord_message::attachments |
any attached files
struct discord_embeds* discord_message::embeds |
any embedded content
struct discord_reactions* discord_message::reactions |
reactions to the message
json_char* discord_message::nonce |
used for validating a message was sent
bool discord_message::pinned |
whether this message is pinned
u64snowflake discord_message::webhook_id |
if the message is generated by a webhook, this is the webhook's ID
enum discord_message_types discord_message::type |
type of message
struct discord_message_activity* discord_message::activity |
sent with Rich Presence-related chat embeds
struct discord_application* discord_message::application |
sent with Rich Presence-related chat embeds
u64snowflake discord_message::application_id |
if the message is an interaction or an application-owned webhook, this is the ID of the application
struct discord_message_reference* discord_message::message_reference |
data showing the source of a crosspost, channel follow add, pin, or reply message
u64bitmask discord_message::flags |
Message flags combined as a bitfield
struct discord_message* discord_message::referenced_message |
the message associated with the message_reference
struct discord_message_interaction* discord_message::interaction |
sent if the message is a response to an interaction
struct discord_channel* discord_message::thread |
the thread that was started from this message, includes discord_thread_member
struct discord_components* discord_message::components |
sent if the message contains components like buttons, action rows, or other interactive components
struct discord_sticker_items* discord_message::sticker_items |
sent if the message contains stickers
struct discord_stickers* discord_message::stickers |
sticker_items
instead int discord_message::position |
A generally increasing integer that represents the approximate position of the message in a thread
struct discord_role_subscription_data* discord_message::role_subscription_data |
data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message
struct discord_resolved_data* discord_message::resolved |
data for users, members, channels, and roles in the message's auto-populated select menus