Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto moderation #821

Merged
merged 12 commits into from Jul 2, 2022
Merged

Add auto moderation #821

merged 12 commits into from Jul 2, 2022

Conversation

SQKo
Copy link
Member

@SQKo SQKo commented Jun 2, 2022

https://discord.com/developers/docs/resources/auto-moderation

discord/discord-api-docs#4860

discord/discord-api-docs#5063
discord/discord-api-docs#5079
discord/discord-api-docs#5082
discord/discord-api-docs#5083

Example create:

$rule = new Rule($discord, [
    'name' => 'custom keyword 2',
    'event_type' => 1,
    'trigger_type' => 1,
    'actions' => [
        [
            'type' => 1,
            'metadata' => []
        ]
    ],
    'trigger_metadata' => [
        'keyword_filter' => ['boggo']
    ]
]);

$guild->auto_moderation_rules->save($rule)->done(function ($automodrules) {
    var_dump($automodrules);
});

Need testing:

  • Events
  • Repositories
  • Execution

Also need opinion on the file & class naming

key2peace
key2peace previously approved these changes Jun 26, 2022
@SQKo SQKo marked this pull request as ready for review June 29, 2022 06:48
@SQKo SQKo requested a review from a team June 29, 2022 07:56
@SQKo SQKo merged commit ffc510b into discord-php:master Jul 2, 2022
@SQKo SQKo deleted the patch-75 branch July 2, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants