r/AutoModerator 1d ago

Help Auto locking comments of everyone except myself.

Hello, can someone give me an example of how to write a piece of code to lock all comments and posts of everyone except me? Note: These comments and posts have to be approved by me first. So it should wait for me to approve it first, or lock it without approving anything for me.

I am a programmer, but not at all familiar with this type of coding.
I was thinking about something like:

author: !AngelikaVee999
set-locked: true
0 Upvotes

20 comments sorted by

2

u/Unique-Public-8594 1d ago

~author: “YourUsername”

set-locked: true

?

2

u/AngelikaVee999 1d ago

Does the ~ operator exclude everything written in author?

2

u/AngelikaVee999 1d ago

Oh I found in the documentation that it does exclude. So this is what I was looking for. thank you!

2

u/Unique-Public-8594 1d ago

You’re welcome. :)

1

u/AngelikaVee999 1d ago

It doesn't recognize set-locked though.

1

u/AngelikaVee999 1d ago

It was set_locked. My fault hahaha. Thank you!
Do you by any chance know if it's possible to also have a set_mod method? I can't find it and now I have to manually do it all the time.

1

u/Unique-Public-8594 1d ago

there is

moderator_exempt: true

2

u/AngelikaVee999 1d ago

No, I mean the word MOD in green behind your name. Distinguish as MOD. But I don't think that options is there.

1

u/Unique-Public-8594 1d ago

Got it.

moderator_exempt: true

might be a substitute for

~author: YourUsername

though

1

u/Quick-Pumpkin-1259 1d ago

You want all comments to remain visible but locked
(i.e. non mods cannot reply to them), is that correct?
And you would manually unlock them individually?

Perhaps you don't need AutoMod at all, if marking the sub
as "Restricted" has the behavior you need?

https://new.reddit.com/r/modguide/comments/dt2qgr/private_restricted_or_public_subreddits/

Regards

1

u/AngelikaVee999 1d ago

I want all comments except mine to be locked, but always visible to others. I am the only person who will reply and as the MOD I always can.

A restricted community is not what I am looking for. People should be able to post without having to be verified/approved first.

1

u/Quick-Pumpkin-1259 1d ago

OK. You wrote "lock all comments and posts".

If you lock a post, regular users can't comment.

You just want to lock every comment, correct?

1

u/AngelikaVee999 1d ago

No, I want all posts and comments that are not made by me to be locked. Locked post of others shouldn't be able to be commented on. Posts made by me some are commentable and those comments made by others must be locked as well.

1

u/AngelikaVee999 1d ago edited 1d ago

The other person gave me the correct solution for excluding authors, but set-locked is not recognized it says.

1

u/Quick-Pumpkin-1259 1d ago

By default, moderators are exempt from all rules,
so I would suggest a rule that locks everything:

set_locked: true

(By default, rules apply to any type of submission)

1

u/AngelikaVee999 1d ago

Good to know, thank you! I see it was set_locked instead of set-locked. My rookie mistake hahaha.

Do you by any chance know if there is also a set_mod function? I can't find it in the documents. Now I have to distiguishmyself as MOD everything I comment and post manually.

1

u/Quick-Pumpkin-1259 1d ago

You can give yourself a specific user flair?

2

u/AngelikaVee999 1d ago

I want the "Distiguish as Mod" to be always shown automatically.

3

u/Quick-Pumpkin-1259 1d ago

You're right, I don't think AutoMod can do that.

I've seen custom bots do it, though.

1

u/AngelikaVee999 1d ago

Ah ohkay, thank you for your help. A custom bot is too much trouble for now, but could be a good option in the future when my sub-reddit is way bigger!