Auto Moderation

class discord_limits.paths.AutoModerationPaths(client)
Parameters:

client (discord_limits.DiscordClient) – The DiscordClient instance to use.

async list_auto_moderation_rules(guild_id)

Get a list of all rules currently configured for guild.

Parameters:

guild_id (int) – The ID of the guild to get rules from.

Returns:

List of auto moderation rule objects.

Return type:

ClientResponse

async get_auto_moderation_rule(guild_id, rule_id)

Get a single rule.

Parameters:
  • guild_id (int) – The ID of the guild to get rule from.

  • rule_id (int) – The ID of the rule that is to be retrieved.

Returns:

A auto moderation rule object.

Return type:

ClientResponse

async create_auto_moderation_rule(guild_id, **options)

Create a new rule.

Parameters:

guild_id (int) – The ID of the guild to create a rule in.

Returns:

A auto moderation rule object.

Return type:

ClientResponse

async modify_auto_moderation_rule(guild_id, rule_id, **options)

Modify an existing rule.

Parameters:
  • guild_id (int) – The ID of the guild to modify a rule in.

  • rule_id (int) – The ID of the rule that is to be modified.

Returns:

A auto moderation rule object.

Return type:

ClientResponse

async delete_auto_moderation_rule(guild_id, rule_id)

Delete a rule.

Parameters:
  • guild_id (int) – The ID of the guild to delete a rule from.

  • rule_id (int) – The ID of the rule that is to be deleted.

Returns:

The response from Discord.

Return type:

ClientResponse