5 upvotes, 1 direct replies (showing 1)
View submission: Introducing the Mod Welcome Message
API notes:
The only thing they haven't done is add a field for it to the edit page on old reddit. The value is visible in https://old.reddit.com/r/SUBREDDIT/about/edit.json[1] just like the other features they aren't holding hostage. You can edit the values using the regular API just like you would any other subreddit setting.
1: https://old.reddit.com/r/SUBREDDIT/about/edit.json
`welcome_message_enabled` is a boolean value corresponding to, you guessed it, whether the message is enabled. `welcome_message_text` is either null or a string value corresponding to the text of your welcome message. It's only null if you have never had a welcome message; once you turn on welcome messages it will become a string and I haven't found a way to make it null again. `welcome_message_text` is also stored in https://www.reddit.com/r/SUBREDDIT/wiki/config/welcome_message[2], but editing this page does not seem to update the value in the settings.
2: https://www.reddit.com/r/SUBREDDIT/wiki/config/welcome_message
So for example, if you're using PRAW you can do something like
reddit.subreddit('SUBREDDIT').mod.update( welcome_message_enabled=True, welcome_message_text='please roll a d5 and if it lands on 5, participate in this community. thanks.' )
If you try to do this on a subreddit with over 50k subscribers, it'll give you an `INVALID_OPTION` error.
Thank you for coming to my TED Talk.
Comment by uzi at 05/12/2019 at 21:14 UTC
6 upvotes, 0 direct replies
This guy TEDs.
Yeah, like you said, the message text is stored in both places and the code uses the **welcome_message_text** for the most part. It's stored in the wiki as well as a backup for now, in case there's an unwanted edit, etc. Very similar to how we treat a subreddit's **public_description**.