FoxxMD / context-mod

an event-based, reddit moderation bot built on top of snoowrap and written in typescript
https://contextmod.dev
MIT License
49 stars 11 forks source link

Need help with config #132

Open monerobull opened 1 year ago

monerobull commented 1 year ago

Hi there, I've tried to create a config for our subreddit based on some cookbook templates but it doesnt seem to work at all. I would be very grateful if someone could help out with this.

Essentially we need a filter that checks when someone comments:

  1. Does the user have the mod-note "Human" (if yes, it's fine, no need to check anything else)
  2. Has the user commented in a list of our or related subreddits before? (in the last 100 submissions is fine i guess?)
  3. If they havent commented, is their account older than 3 years?
  4. If they havent commented before and the account is younger than 3 years, remove the comment
  5. If the comment has been removed, tag the user with a mod-note saying so

Additionally, something that tags people as human in via the mod-notes if they have more than x submissions in our/related subs already and are older than 3 years would be great.

this is what i have so far but doesnt work:

polling:
  - newComm
runs:
  - checks:
#### Uncomment the code above to use this as a FULL subreddit config
####
#### Otherwise copy-paste the code below to use as a CHECK
        #
        # Report submissions by users with less than 5 non-OP comments in our subreddit
        # and optionally remove the submission
        #
      - name: RequireEngagement
        description: Remove submission if author has less than X non-op comments in our subreddit
        kind: comment
        rules:
          - name: LittleEngagement
            kind: recentActivity
            lookAt: comments
            useSubmissionAsReference: false
            # bot will check the last 100 NON-OP comments from user's history
            window:
              count: 100
              fetch: comments
              filterOn:
                post:
                  commentState:
                    - op: false
            thresholds:
                subreddits:
                            - r/monero
                            - r/monerosupport
                            - r/xmrtrader
                            - r/monerochan
                            - r/darknet
                            - r/privacy
                            - r/moonero
                # rule is "triggered" if there are LESS THAN 5 comments in our subreddit in the window specified (currently 100 non-op comments)
                threshold: '< 5'

        actions:

          - kind: report # report the submission
            enable: true
            # the text of the report
            content: 'User has <5 non-OP comments in last 100 comments'

          - kind: filter # remove the submission
            enable: false
            note: 'User has <5 non-OP comments in last 100 comments'
FoxxMD commented 1 year ago

Hi! Is there a bot moderating your subreddit that is running ContextMod already?

monerobull commented 1 year ago

Jup, I've set it all up already, it is taking config from the wiki and can save there too. At one point it even checked comments and removed them based on recent activity (and tried to add mod-notes but they were all empty) before i broke it again. Never got any further than that let alone to a config close to what we would like it to be in its final form.