Concord - C Discord API library
A Discord API wrapper library written in C
auto_moderation.h File Reference

Generated code. More...

#include <stddef.h>
#include <stdbool.h>
#include <inttypes.h>
#include "carray.h"
#include "cog-utils.h"
#include "types.h"
#include "jsmn.h"
#include "jsmn-find.h"
#include "json-build.h"
Include dependency graph for auto_moderation.h:

Go to the source code of this file.

Data Structures

struct  discord_auto_moderation_trigger_metadata
 
struct  discord_auto_moderation_action
 
struct  discord_auto_moderation_actions
 
struct  discord_auto_moderation_action_metadata
 
struct  discord_auto_moderation_rule
 
struct  discord_auto_moderation_rules
 
struct  discord_create_auto_moderation_rule
 
struct  discord_modify_auto_moderation_rule
 
struct  discord_delete_auto_moderation_rule
 

Macros

#define JSMN_STRICT
 
#define JSMN_HEADER
 
#define JSONB_HEADER
 

Enumerations

enum  discord_auto_moderation_trigger_types { DISCORD_AUTO_MODERATION_KEYWORD = 1 , DISCORD_AUTO_MODERATION_HARMFUL_LINK = 2 , DISCORD_AUTO_MODERATION_SPAM = 3 , DISCORD_AUTO_MODERATION_KEYWORD_PRESET = 4 }
 Characterizes the type of content which can trigger the rule. More...
 
enum  discord_auto_moderation_keyword_preset_types { DISCORD_AUTO_MODERATION_PROFANITY = 1 , DISCORD_AUTO_MODERATION_SEXUAL_CONTENT = 2 , DISCORD_AUTO_MODERATION_SLURS = 3 }
 
enum  discord_auto_moderation_event_types { DISCORD_AUTO_MODERATION_MESSAGE_SEND = 1 }
 
enum  discord_auto_moderation_action_types { DISCORD_AUTO_MODERATION_ACTION_BLOCK_MESSAGE = 1 , DISCORD_AUTO_MODERATION_ACTION_SEND_ALERT_MESSAGE = 2 , DISCORD_AUTO_MODERATION_ACTION_TIMEOUT = 3 }
 

Functions

void discord_auto_moderation_rule_init (struct discord_auto_moderation_rule *self)
 
void discord_auto_moderation_rule_cleanup (struct discord_auto_moderation_rule *self)
 
void discord_auto_moderation_rules_cleanup (struct discord_auto_moderation_rules *self)
 
void discord_create_auto_moderation_rule_init (struct discord_create_auto_moderation_rule *self)
 
void discord_create_auto_moderation_rule_cleanup (struct discord_create_auto_moderation_rule *self)
 
void discord_modify_auto_moderation_rule_init (struct discord_modify_auto_moderation_rule *self)
 
void discord_modify_auto_moderation_rule_cleanup (struct discord_modify_auto_moderation_rule *self)
 
long discord_auto_moderation_rule_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_auto_moderation_rule *self)
 
size_t discord_auto_moderation_rule_from_json (const char buf[], size_t size, struct discord_auto_moderation_rule *self)
 
long discord_auto_moderation_rules_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_auto_moderation_rules *self)
 
size_t discord_auto_moderation_rules_from_json (const char buf[], size_t size, struct discord_auto_moderation_rules *self)
 
long discord_create_auto_moderation_rule_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_create_auto_moderation_rule *self)
 
size_t discord_create_auto_moderation_rule_from_json (const char buf[], size_t size, struct discord_create_auto_moderation_rule *self)
 
long discord_modify_auto_moderation_rule_from_jsmnf (jsmnf_pair *root, const char *js, struct discord_modify_auto_moderation_rule *self)
 
size_t discord_modify_auto_moderation_rule_from_json (const char buf[], size_t size, struct discord_modify_auto_moderation_rule *self)
 
jsonbcode discord_create_auto_moderation_rule_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_create_auto_moderation_rule *self)
 
size_t discord_create_auto_moderation_rule_to_json (char buf[], size_t size, const struct discord_create_auto_moderation_rule *self)
 
jsonbcode discord_modify_auto_moderation_rule_to_jsonb (jsonb *b, char buf[], size_t size, const struct discord_modify_auto_moderation_rule *self)
 
size_t discord_modify_auto_moderation_rule_to_json (char buf[], size_t size, const struct discord_modify_auto_moderation_rule *self)
 

Detailed Description

Generated code.

Author
Cogmasters

Macro Definition Documentation

◆ JSMN_STRICT

#define JSMN_STRICT

◆ JSMN_HEADER

#define JSMN_HEADER

◆ JSONB_HEADER

#define JSONB_HEADER

Enumeration Type Documentation

◆ discord_auto_moderation_trigger_types

Characterizes the type of content which can trigger the rule.

Enumerator
DISCORD_AUTO_MODERATION_KEYWORD 

check if content contains words from a user defined list of keywords

Note
maximum 3 per guild
DISCORD_AUTO_MODERATION_HARMFUL_LINK 

check if content contains any harmful links

Note
maximum 1 per guild
DISCORD_AUTO_MODERATION_SPAM 

check if content represents generic spam

Note
maximum 1 per guild
DISCORD_AUTO_MODERATION_KEYWORD_PRESET 

check if content contains words from internal pre-defined wordsets

Note
maximum 1 per guild

◆ discord_auto_moderation_keyword_preset_types

Enumerator
DISCORD_AUTO_MODERATION_PROFANITY 

words that may be considered forms of swearing or cursing

DISCORD_AUTO_MODERATION_SEXUAL_CONTENT 

words that refer to sexually explicit behavior or activity

DISCORD_AUTO_MODERATION_SLURS 

personal insults or words that may be considered hate speech

◆ discord_auto_moderation_event_types

Enumerator
DISCORD_AUTO_MODERATION_MESSAGE_SEND 

when a member sends or edits a message in the guild

◆ discord_auto_moderation_action_types

Enumerator
DISCORD_AUTO_MODERATION_ACTION_BLOCK_MESSAGE 

blocks the content of a message according to the rule

DISCORD_AUTO_MODERATION_ACTION_SEND_ALERT_MESSAGE 

logs user content to a specified channel

DISCORD_AUTO_MODERATION_ACTION_TIMEOUT 

timeout user for a specified duration

Function Documentation

◆ discord_auto_moderation_rule_init()

void discord_auto_moderation_rule_init ( struct discord_auto_moderation_rule self)

◆ discord_auto_moderation_rule_cleanup()

void discord_auto_moderation_rule_cleanup ( struct discord_auto_moderation_rule self)

◆ discord_auto_moderation_rules_cleanup()

void discord_auto_moderation_rules_cleanup ( struct discord_auto_moderation_rules self)

◆ discord_create_auto_moderation_rule_init()

void discord_create_auto_moderation_rule_init ( struct discord_create_auto_moderation_rule self)

◆ discord_create_auto_moderation_rule_cleanup()

void discord_create_auto_moderation_rule_cleanup ( struct discord_create_auto_moderation_rule self)

◆ discord_modify_auto_moderation_rule_init()

void discord_modify_auto_moderation_rule_init ( struct discord_modify_auto_moderation_rule self)

◆ discord_modify_auto_moderation_rule_cleanup()

void discord_modify_auto_moderation_rule_cleanup ( struct discord_modify_auto_moderation_rule self)

◆ discord_auto_moderation_rule_from_jsmnf()

long discord_auto_moderation_rule_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_auto_moderation_rule self 
)

◆ discord_auto_moderation_rule_from_json()

size_t discord_auto_moderation_rule_from_json ( const char  buf[],
size_t  size,
struct discord_auto_moderation_rule self 
)

◆ discord_auto_moderation_rules_from_jsmnf()

long discord_auto_moderation_rules_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_auto_moderation_rules self 
)

◆ discord_auto_moderation_rules_from_json()

size_t discord_auto_moderation_rules_from_json ( const char  buf[],
size_t  size,
struct discord_auto_moderation_rules self 
)

◆ discord_create_auto_moderation_rule_from_jsmnf()

long discord_create_auto_moderation_rule_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_create_auto_moderation_rule self 
)

◆ discord_create_auto_moderation_rule_from_json()

size_t discord_create_auto_moderation_rule_from_json ( const char  buf[],
size_t  size,
struct discord_create_auto_moderation_rule self 
)

◆ discord_modify_auto_moderation_rule_from_jsmnf()

long discord_modify_auto_moderation_rule_from_jsmnf ( jsmnf_pair *  root,
const char *  js,
struct discord_modify_auto_moderation_rule self 
)

◆ discord_modify_auto_moderation_rule_from_json()

size_t discord_modify_auto_moderation_rule_from_json ( const char  buf[],
size_t  size,
struct discord_modify_auto_moderation_rule self 
)

◆ discord_create_auto_moderation_rule_to_jsonb()

jsonbcode discord_create_auto_moderation_rule_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_create_auto_moderation_rule self 
)

◆ discord_create_auto_moderation_rule_to_json()

size_t discord_create_auto_moderation_rule_to_json ( char  buf[],
size_t  size,
const struct discord_create_auto_moderation_rule self 
)

◆ discord_modify_auto_moderation_rule_to_jsonb()

jsonbcode discord_modify_auto_moderation_rule_to_jsonb ( jsonb b,
char  buf[],
size_t  size,
const struct discord_modify_auto_moderation_rule self 
)

◆ discord_modify_auto_moderation_rule_to_json()

size_t discord_modify_auto_moderation_rule_to_json ( char  buf[],
size_t  size,
const struct discord_modify_auto_moderation_rule self 
)