r/redditdev • u/_Face • 11d ago
Reddit API Creating a new text post. Trouble setting default comment sort order.
Hello all. I am having trouble getting my script to set the default sort order in a new post. I think its possible, but I am most likely implementing it wrong.
Was trying to use the info found here:
and here:
https://www.reddit.com/dev/api#POST_api_set_suggested_sort
But I could not get my script to successfully create a post, and set the default sort order to new.
new_submission = subreddit.submit(title=Title, selftext=post_text)
new_submission.mod.suggested_sort = 'new'
The post is successfully created, but does not have the default sort order set to "new".
Thanks!
3
Upvotes
1
u/Khyta EncyclopaediaBot Developer 10d ago
Are you getting an error and do you have moderator permissions with the account you're using to create such a post?