handle incoming messages through MESSAGE_CREATE

This commit is contained in:
2019-07-11 20:06:51 +02:00
parent 6d7c7e641f
commit f742f29fcc
5 changed files with 77 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ typedef enum {
/* A direct message channel for 1:1 communication
*/
CHANNEL_TYPE_DM_TEXT,
CHANNEL_TYPE_DM,
/* A guild voice channel
*/
@@ -53,6 +53,7 @@ dc_channel_t dc_channel_from_json(json_t *j);
char const *dc_channel_id(dc_channel_t c);
dc_channel_type_t dc_channel_type(dc_channel_t c);
bool dc_channel_is_dm(dc_channel_t c);
void dc_channel_set_type(dc_channel_t c, dc_channel_type_t t);
size_t dc_channel_recipients(dc_channel_t c);

View File

@@ -10,7 +10,9 @@ typedef struct dc_event_ *dc_event_t;
typedef enum {
DC_EVENT_TYPE_UNKNOWN = 0,
DC_EVENT_TYPE_READY,
DC_EVENT_TYPE_MESSAGE_CREATE,
/* ^^^^^^ Make sure events are up there ^^^^^^^ */
DC_EVENT_TYPE_LAST,
} dc_event_type_t;