Concord - C Discord API library
A Discord API wrapper library written in C
Auto Moderation

Auto Moderation public API supported by Concord. More...

Collaboration diagram for Auto Moderation:

Data Structures

struct  discord_ret_auto_moderation_rule
 Request's return context. More...
 
struct  discord_ret_auto_moderation_rules
 Request's return context. More...
 

Functions

CCORDcode discord_list_auto_moderation_rules_for_guild (struct discord *client, u64snowflake guild_id, struct discord_ret_auto_moderation_rules *ret)
 Get a list of all rules currently configured for the guild. More...
 
CCORDcode discord_get_auto_moderation_rule (struct discord *client, u64snowflake guild_id, u64snowflake auto_moderation_rule_id, struct discord_ret_auto_moderation_rule *ret)
 Get a single rule. More...
 
CCORDcode discord_create_auto_moderation_rule (struct discord *client, u64snowflake guild_id, struct discord_create_auto_moderation_rule *params, struct discord_ret_auto_moderation_rule *ret)
 Create a new rule. More...
 
CCORDcode discord_modify_auto_moderation_rule (struct discord *client, u64snowflake guild_id, u64snowflake auto_moderation_rule_id, struct discord_modify_auto_moderation_rule *params, struct discord_ret_auto_moderation_rule *ret)
 Modify an existing rule. More...
 
CCORDcode discord_delete_auto_moderation_rule (struct discord *client, u64snowflake guild_id, u64snowflake auto_moderation_rule_id, struct discord_delete_auto_moderation_rule *params, struct discord_ret *ret)
 Delete a rule. More...
 

Detailed Description

Auto Moderation public API supported by Concord.

Function Documentation

◆ discord_list_auto_moderation_rules_for_guild()

CCORDcode discord_list_auto_moderation_rules_for_guild ( struct discord client,
u64snowflake  guild_id,
struct discord_ret_auto_moderation_rules ret 
)

Get a list of all rules currently configured for the guild.

Note
Requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe guild to fetch the rules from
retreturn context of the request. if successful a discord_auto_moderation_rules will be sent over to its assigned done callback
See also
discord_ret_auto_moderation_rules for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_get_auto_moderation_rule()

CCORDcode discord_get_auto_moderation_rule ( struct discord client,
u64snowflake  guild_id,
u64snowflake  auto_moderation_rule_id,
struct discord_ret_auto_moderation_rule ret 
)

Get a single rule.

Note
Requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe guild to fetch the rule from
auto_moderation_rule_idthe rule to be fetched
retreturn context of the request. if successful a discord_auto_moderation_rule will be sent over to its assigned done callback
See also
discord_ret_auto_moderation_rule for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_create_auto_moderation_rule()

Create a new rule.

Note
Requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe guild to create the rule in
paramsrequest parameters
retreturn context of the request. if successful a discord_auto_moderation_rule will be sent over to its assigned done callback
See also
discord_ret_auto_moderation_rule for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_modify_auto_moderation_rule()

CCORDcode discord_modify_auto_moderation_rule ( struct discord client,
u64snowflake  guild_id,
u64snowflake  auto_moderation_rule_id,
struct discord_modify_auto_moderation_rule params,
struct discord_ret_auto_moderation_rule ret 
)

Modify an existing rule.

Note
Requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe guild where the rule to be modified is at
auto_moderation_rule_idthe rule to be modified
paramsrequest parameters
retreturn context of the request. if successful a discord_auto_moderation_rule will be sent over to its assigned done callback
See also
discord_ret_auto_moderation_rule for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary

◆ discord_delete_auto_moderation_rule()

CCORDcode discord_delete_auto_moderation_rule ( struct discord client,
u64snowflake  guild_id,
u64snowflake  auto_moderation_rule_id,
struct discord_delete_auto_moderation_rule params,
struct discord_ret ret 
)

Delete a rule.

Note
Requires the MANAGE_GUILD permission
Parameters
clientthe client created with discord_init()
guild_idthe guild where the rule to be deleted is at
auto_moderation_rule_idthe rule to be deleted
paramsrequest parameters
retreturn context of the request. if successful the assigned done will be triggered
See also
discord_ret for more options
Returns
CCORDcode value for how the operation went, CCORD_OK means nothing out of the ordinary