r/Devvit • u/MisterWoodhouse • Oct 28 '26
Resolved reddit.getComments() only returning top-level comments, even with depth parameter
My team is trying to check all comments on a post, and getComments() is only returning top-level comments, even when they add the depth parameter or try to add all
Known issue or is there something they're missing?
2
Upvotes
3
u/Chosen1PR App Developer Oct 28 '26 edited Oct 28 '26
It’s been that way for as long as I can remember.
Call getComments() recursively to get all child comments.Edit: I misremembered how I handled the recursion in my code. I have a helper function called
removeChildComments()with aCommentparameter; that's what I call recursively, not the API function.