-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error fetching comment by ID #336
Comments
I have recently also had problems with the comment system, and found some quirks/scratchattach didn't work for me. |
Hello! Only replies to top-level comments are shown on the Scratch website. Replies to replies are actually replies to the corresponding top-level comment in the API and aren't different in any way. Thus, you will have to use the parent id of the original comment when trying to reply. The correct syntax to reply to a comment is: user.reply_comment("comment content", parent_id="parent_id", commentee_id=""). Use the commentee_id to notify a user / ping a user about the message (put their user_id) (that is also how replies are handled in the API). |
What you're saying I should do is use the comment ID to get a comment object, then use the parent comment method of that comment to find the parent comment, and finally reply to the parent comment. However, I can't even get the comment object from the comment ID. |
I will look into it
uukelele-scratch ***@***.***> schrieb am Di., 28. Jan. 2025,
09:01:
… Hello! Only replies to top-level comments are shown on the Scratch
website. Replies to replies are actually replies to the corresponding
top-level comment in the API and aren't different in any way. Thus, you
will have to use the parent id of the original comment when trying to
reply. The correct syntax to reply to a comment is:
user.reply_comment("comment content", parent_id="parent_id",
commentee_id=""). Use the commentee_id to notify a user / ping a user about
the message (put their user_id) (that is also how replies are handled in
the API).
What you're saying I should do is use the comment ID to get a comment
object, then use the parent comment method of that comment to find the
parent comment, and finally reply to the parent comment.
However, I can't even get the comment object from the comment ID.
—
Reply to this email directly, view it on GitHub
<#336 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATCKMZX5V7BUACHV7UYRWCT2M42MHAVCNFSM6AAAAABV4G2MXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYGE3DANZTHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
What error do you get when fetching a comment by id and would you give the
whole code?
Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025, 09:29:
… I will look into it
uukelele-scratch ***@***.***> schrieb am Di., 28. Jan.
2025, 09:01:
> Hello! Only replies to top-level comments are shown on the Scratch
> website. Replies to replies are actually replies to the corresponding
> top-level comment in the API and aren't different in any way. Thus, you
> will have to use the parent id of the original comment when trying to
> reply. The correct syntax to reply to a comment is:
> user.reply_comment("comment content", parent_id="parent_id",
> commentee_id=""). Use the commentee_id to notify a user / ping a user about
> the message (put their user_id) (that is also how replies are handled in
> the API).
>
> What you're saying I should do is use the comment ID to get a comment
> object, then use the parent comment method of that comment to find the
> parent comment, and finally reply to the parent comment.
>
> However, I can't even get the comment object from the comment ID.
>
> —
> Reply to this email directly, view it on GitHub
> <#336 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ATCKMZX5V7BUACHV7UYRWCT2M42MHAVCNFSM6AAAAABV4G2MXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYGE3DANZTHA>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Nevermind
Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025, 09:31:
… What error do you get when fetching a comment by id and would you give the
whole code?
Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025,
09:29:
> I will look into it
>
> uukelele-scratch ***@***.***> schrieb am Di., 28. Jan.
> 2025, 09:01:
>
>> Hello! Only replies to top-level comments are shown on the Scratch
>> website. Replies to replies are actually replies to the corresponding
>> top-level comment in the API and aren't different in any way. Thus, you
>> will have to use the parent id of the original comment when trying to
>> reply. The correct syntax to reply to a comment is:
>> user.reply_comment("comment content", parent_id="parent_id",
>> commentee_id=""). Use the commentee_id to notify a user / ping a user about
>> the message (put their user_id) (that is also how replies are handled in
>> the API).
>>
>> What you're saying I should do is use the comment ID to get a comment
>> object, then use the parent comment method of that comment to find the
>> parent comment, and finally reply to the parent comment.
>>
>> However, I can't even get the comment object from the comment ID.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#336 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ATCKMZX5V7BUACHV7UYRWCT2M42MHAVCNFSM6AAAAABV4G2MXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYGE3DANZTHA>
>> .
>> You are receiving this because you are subscribed to this thread.Message
>> ID: ***@***.***>
>>
>
|
You are looking for comments where there are nonel
Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025, 09:34:
… Nevermind
Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025,
09:31:
> What error do you get when fetching a comment by id and would you give
> the whole code?
>
> Simon Gilde ***@***.***> schrieb am Di., 28. Jan. 2025,
> 09:29:
>
>> I will look into it
>>
>> uukelele-scratch ***@***.***> schrieb am Di., 28. Jan.
>> 2025, 09:01:
>>
>>> Hello! Only replies to top-level comments are shown on the Scratch
>>> website. Replies to replies are actually replies to the corresponding
>>> top-level comment in the API and aren't different in any way. Thus, you
>>> will have to use the parent id of the original comment when trying to
>>> reply. The correct syntax to reply to a comment is:
>>> user.reply_comment("comment content", parent_id="parent_id",
>>> commentee_id=""). Use the commentee_id to notify a user / ping a user about
>>> the message (put their user_id) (that is also how replies are handled in
>>> the API).
>>>
>>> What you're saying I should do is use the comment ID to get a comment
>>> object, then use the parent comment method of that comment to find the
>>> parent comment, and finally reply to the parent comment.
>>>
>>> However, I can't even get the comment object from the comment ID.
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#336 (comment)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/ATCKMZX5V7BUACHV7UYRWCT2M42MHAVCNFSM6AAAAABV4G2MXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYGE3DANZTHA>
>>> .
>>> You are receiving this because you are subscribed to this thread.Message
>>> ID: ***@***.***>
>>>
>>
|
Interesting. Sometimes, when viewing the comments page, recent comments don't show. Perhaps something needs to be added in this function to handle empty comment pages. |
When I'm replying using the ID of a root-level comment it works fine, but as soon as I attempt to reply using the ID of a reply this error is thrown.
I can't even try replying to the comment with its parent, as I can't even get the comment_obj.
Here's more of my code:
The text was updated successfully, but these errors were encountered: