perezdev / CMVModBot

A moderation bot for /r/ChangeMyView to automate rule violations.
7 stars 0 forks source link

Subreddit settings on FTF #11

Open Snorrrlax opened 6 years ago

Snorrrlax commented 6 years ago

When CMVModBot changed the subreddit settings today, it wiped a few things that I didn't think to mention. Can we make sure that when CMVModBot does this next time, the following remain unchanged:

Submission text:

**Remember, only post if you are able to have a conversation in the next 3 hours.**

Other options:

Suggested comment sort: q&a

Minutes to hide comment scores: 1440

Header mouseover text: Nothing there just now but sometimes I like to put a quote in, so can the bot ignore this setting?

Snorrrlax commented 6 years ago

Also, cross-posting needs to be disabled.

perezdev commented 6 years ago

Ah. I'm not explicitly settings these settings when FTF is turned off. So I bet the default values are sent in from RedditSharp. Bummer. I'll take a look today.

ansuz07 commented 6 years ago

Also, allow free-form reports by users needs to be allowed.

perezdev commented 6 years ago

So... there's an issue with these three properties:

I can't seem to find an these options in the JSON. The rest of the properties have been fixed. But it'll take a little more research for these 3.

hacksoncode commented 6 years ago

Hmmm... is it possible to do a read-modify-write on the properties?

perezdev commented 6 years ago

@hacksoncode I think the problem is that reddit expects every property in the JSON. So for example, I wasn't supplying the property for submit_text at all. You'd think if I wasn't sending the property, it wouldn't do anything with it. But instead, it wipes out the value if you don't send it. So I need to get all the current properties and send their unchanged values because reddit is going to update it whether or not I send it.

perezdev commented 6 years ago

@hacksoncode Also, about those properties, I can't find them here:

https://www.reddit.com/r/CMVModBotTest/about/edit/.json

I imagine their in the docs somewhere, just haven't had a chance to look into it yet. But it seems super weird that they wouldn't appear in the about JSON. Maybe their stored elsewhere.

Snorrrlax commented 6 years ago

Is there a way to tell the bot to only touch the settings we need to change?