Concord - C Discord API library
A Discord API wrapper library written in C
discord_message Struct Reference

#include <channel.h>

Collaboration diagram for discord_message:
[legend]

Data Fields

u64snowflake id
 
u64snowflake channel_id
 
u64snowflake guild_id
 
struct discord_userauthor
 
struct discord_guild_membermember
 
char * content
 
u64unix_ms timestamp
 
u64unix_ms edited_timestamp
 
bool tts
 
bool mention_everyone
 
struct discord_usersmentions
 
struct discord_rolesmention_roles
 
struct discord_channelsmention_channels
 
struct discord_attachmentsattachments
 
struct discord_embedsembeds
 
struct discord_reactionsreactions
 
json_charnonce
 
bool pinned
 
u64snowflake webhook_id
 
enum discord_message_types type
 
struct discord_message_activityactivity
 
struct discord_applicationapplication
 
u64snowflake application_id
 
struct discord_message_referencemessage_reference
 
u64bitmask flags
 
struct discord_messagereferenced_message
 
struct discord_message_interactioninteraction
 
struct discord_channelthread
 
struct discord_componentscomponents
 
struct discord_sticker_itemssticker_items
 

Detailed Description

Field Documentation

◆ id

u64snowflake discord_message::id

ID of the message

Examples
cache.c, fetch-messages.c, pin.c, and reaction.c.

◆ channel_id

u64snowflake discord_message::channel_id

ID of the channel the message was sent in

Examples
ban.c, cache.c, channel.c, components.c, embed.c, emoji.c, guild.c, pin.c, and reaction.c.

◆ guild_id

u64snowflake discord_message::guild_id

ID of the guild the message was sent in

Examples
audit-log.c, ban.c, cache.c, channel.c, emoji.c, guild-template.c, guild.c, pin.c, and slash-commands.c.

◆ author

struct discord_user* discord_message::author

the author of this message (not guaranteed to be a valid user)

Examples
audit-log.c, cache.c, channel.c, components.c, embed.c, emoji.c, fetch-messages.c, guild.c, invite.c, manual-dm.c, pin.c, reaction.c, and slash-commands.c.

◆ member

struct discord_guild_member* discord_message::member

partial guild member

◆ content

char* discord_message::content

◆ timestamp

u64unix_ms discord_message::timestamp

when this message was sent

◆ edited_timestamp

u64unix_ms discord_message::edited_timestamp

when this message was edited (or null if never)

◆ tts

bool discord_message::tts

whether this was a TTS message

◆ mention_everyone

bool discord_message::mention_everyone

whether this message mentions everyone

◆ mentions

struct discord_users* discord_message::mentions

FIXME: expects additional member field users specifically mentioned in the message

◆ mention_roles

struct discord_roles* discord_message::mention_roles

roles specifically mentioned in this message

◆ mention_channels

struct discord_channels* discord_message::mention_channels

channels specifically mentioned in this message

◆ attachments

struct discord_attachments* discord_message::attachments

any attached files

◆ embeds

struct discord_embeds* discord_message::embeds

any embedded content

◆ reactions

struct discord_reactions* discord_message::reactions

reactions to the message

◆ nonce

json_char* discord_message::nonce

used for validating a message was sent

◆ pinned

bool discord_message::pinned

whether this message is pinned

◆ webhook_id

u64snowflake discord_message::webhook_id

if the message is generated by a webhook, this is the webhook's ID

◆ type

enum discord_message_types discord_message::type

type of message

◆ activity

struct discord_message_activity* discord_message::activity

sent with Rich Presence-related chat embeds

◆ application

struct discord_application* discord_message::application

sent with Rich Presence-related chat embeds

◆ application_id

u64snowflake discord_message::application_id

if the message is an interaction or an application-owned webhook, this is the ID of the application

◆ message_reference

struct discord_message_reference* discord_message::message_reference

data showing the source of a crosspost, channel follow add, pin, or reply message

Examples
channel.c.

◆ flags

u64bitmask discord_message::flags

Message flags combined as a bitfield

◆ referenced_message

struct discord_message* discord_message::referenced_message

the message associated with the message_reference

Examples
pin.c, and reaction.c.

◆ interaction

struct discord_message_interaction* discord_message::interaction

sent if the message is a response to an interaction

◆ thread

struct discord_channel* discord_message::thread

the thread that was started from this message, includes discord_thread_member

Examples
channel.c.

◆ components

struct discord_components* discord_message::components

sent if the message contains components like buttons, action rows, or other interactive components

◆ sticker_items

struct discord_sticker_items* discord_message::sticker_items

sent if the message contains stickers


The documentation for this struct was generated from the following file: