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

Document Blocking Words in Member Profiles Automod #6040

Merged
merged 5 commits into from
May 31, 2024

Conversation

jaw0r3k
Copy link
Contributor

@jaw0r3k jaw0r3k commented Apr 1, 2023

The automod rule was added today as alpha

Update: at the beginning of June this feature was moved to beta

I am not sure about naming it, so any suggestions will be appreciated

@codeofandrin
Copy link
Contributor

Trigger Metadata would have changes too.

Looks like it can be used for keyword_filter, regex_patterns and allow_list:

image

@shiftinv
Copy link
Contributor

shiftinv commented Apr 2, 2023

Looks like AuditLogEntry.options.channel_id in audit log entries with the new Automod trigger/event type can now be an empty string over REST (seems like a bug?) and null in gw events:

rest
{
    "audit_log_entries": [
        {
            "id": "1234",
            "user_id": "1234",
            "target_id": "1234",
            "action_type": 144,
            "options": {
                "auto_moderation_rule_name": "Member Profile Custom Keywords List",
                "auto_moderation_rule_trigger_type": "6",
                "channel_id": ""
            },
            "reason": "Message was flagged by AutoMod"
        }
    ]
}
gateway
{
    "t": "GUILD_AUDIT_LOG_ENTRY_CREATE",
    "s": 13,
    "op": 0,
    "d": {
        "user_id": "1234",
        "target_id": "1234",
        "reason": "Message was flagged by AutoMod",
        "options": {
            "channel_id": null,
            "auto_moderation_rule_trigger_type": "6",
            "auto_moderation_rule_name": "Member Profile Custom Keywords List"
        },
        "id": "1234",
        "action_type": 144,
        "guild_id": "1234"
    }
}

@jaw0r3k
Copy link
Contributor Author

jaw0r3k commented Apr 2, 2023

Looks like AuditLogEntry.options.channel_id in audit log entries with the new Automod trigger/event type can now be an empty string over REST (seems like a bug?) and null in gw events:

its just in alpha so it probably is a bug

@shaydewael shaydewael added the not released This issue or PR is referencing a change that is not yet widely released and/or subject to change. label Apr 14, 2023
@shaydewael shaydewael removed the not released This issue or PR is referencing a change that is not yet widely released and/or subject to change. label Jul 13, 2023
@shaydewael
Copy link
Contributor

removed the not released label since this was released this week, but there's a conflict in AutoMod file 😓

@codeofandrin
Copy link
Contributor

@jaw0r3k Is it possible to resolve the conflicts that it can be merged?

@MinnDevelopment
Copy link
Contributor

How long is this feature going to be in beta? Should libraries add support or not?

@MinnDevelopment
Copy link
Contributor

Has this feature been forgotten? @shaydewael what's blocking this?

@shaydewael shaydewael self-assigned this May 14, 2024
@shaydewael shaydewael merged commit 60a711d into discord:main May 31, 2024
@jaw0r3k jaw0r3k deleted the memberProfileBlocking branch June 4, 2024 21:48
vilgotf pushed a commit to twilight-rs/twilight that referenced this pull request Jun 15, 2024
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 29, 2024
The DSL for creating/editing MemberProfileAutoModerationRules looks like
this:

val rule = guild.createMemberProfileAutoModerationRule("name") {
    anywhereKeyword("cat")
    regexPattern("^b(a|@)d\$w(o|0)rd(s|$)")
    allowPrefixKeyword("black cat")
    blockMemberInteraction()
    sendAlertMessage(channelId)
    enabled = true
}
println(rule)

See discord/discord-api-docs#6040
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 30, 2024
The DSL for creating/editing MemberProfileAutoModerationRules looks like
this:

val rule = guild.createMemberProfileAutoModerationRule("name") {
    anywhereKeyword("cat")
    regexPattern("^b(a|@)d\$w(o|0)rd(s|$)")
    allowPrefixKeyword("black cat")
    blockMemberInteraction()
    sendAlertMessage(channelId)
    enabled = true
}
println(rule)

See discord/discord-api-docs#6040
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 30, 2024
The DSL for creating/editing MemberProfileAutoModerationRules looks like
this:

val rule = guild.createMemberProfileAutoModerationRule("name") {
    anywhereKeyword("cat")
    regexPattern("^b(a|@)d\$w(o|0)rd(s|$)")
    allowPrefixKeyword("black cat")
    blockMemberInteraction()
    sendAlertMessage(channelId)
    enabled = true
}
println(rule)

See discord/discord-api-docs#6040
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 30, 2024
The DSL for creating/editing MemberProfileAutoModerationRules looks like
this:

val rule = guild.createMemberProfileAutoModerationRule("name") {
    anywhereKeyword("cat")
    regexPattern("^b(a|@)d\$w(o|0)rd(s|$)")
    allowPrefixKeyword("black cat")
    blockMemberInteraction()
    sendAlertMessage(channelId)
    enabled = true
}
println(rule)

See discord/discord-api-docs#6040
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 19, 2024
The DSL for creating/editing MemberProfileAutoModerationRules looks like
this:

val rule = guild.createMemberProfileAutoModerationRule("name") {
    anywhereKeyword("cat")
    regexPattern("^b(a|@)d\$w(o|0)rd(s|$)")
    allowPrefixKeyword("black cat")
    blockMemberInteraction()
    sendAlertMessage(channelId)
    enabled = true
}
println(rule)

See discord/discord-api-docs#6040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants