Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <channel.h>
Data Fields | |
u64snowflake | id |
u64snowflake | channel_id |
u64snowflake | guild_id |
struct discord_user * | author |
struct discord_guild_member * | member |
char * | content |
u64unix_ms | timestamp |
u64unix_ms | edited_timestamp |
bool | tts |
bool | mention_everyone |
struct discord_users * | mentions |
struct snowflakes * | mention_roles |
struct discord_channels * | mention_channels |
struct discord_attachments * | attachments |
struct discord_embeds * | embeds |
struct discord_reactions * | reactions |
json_char * | nonce |
bool | pinned |
u64snowflake | webhook_id |
enum discord_message_types | type |
struct discord_message_activity * | activity |
struct discord_application * | application |
u64snowflake | application_id |
struct discord_message_reference * | message_reference |
u64bitmask | flags |
struct discord_message * | referenced_message |
struct discord_message_interaction * | interaction |
struct discord_channel * | thread |
struct discord_components * | components |
struct discord_sticker_items * | sticker_items |
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