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

IsContributor not working properly #142

Closed jimmyhiggs337 closed 1 year ago

jimmyhiggs337 commented 1 year ago

config:

runs:
  -checks:
        - name: approveUser
          description: approved posts from approved users
          kind: submission
          rules:
             - name: approveContrib
               kind: author
               authorIs: 
                   - isContributor: true
          actions:
           - kind: approve
jimmyhiggs337 commented 1 year ago

I fixed it by changing it to this:

        - name: approveUser
          description: approved posts from approved users
          kind: submission
          rules:
             - name: approveContrib
               kind: author
               include: 
                   - isContributor: true
          actions:
           - kind: approve

not sure if this will actually work on approved users, but it at the least doesn't approve every single post

jimmyhiggs337 commented 1 year ago

I now understand where I went wrong, at the check level I would use authorIs and at the rule level I would use exclude / include I see this is not an error, but correct functionality, I wish the docs made more clarification about what can be used where and what cannot.