Discuss Scratch

god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

There are some little technical things I want to ask the community about.
1. Receivers in NodeJS EventEmitters cannot actually return a value. So I made a new function pCloud.send(name, value) which sends a packet. I could implement my own EventEmitters if this feature is mandatory.
2. The current method of sending just does a big broadcast, and the client code outside of the pCloud sprite can choose whether the packet sent is directed to it or not. If you want, I can make a system where each client gets assigned an ID and that ID is used for sending and receiving but I don't think it will be that useful.
god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

pCloud.onRequest(() => {}) // is not valid now
// Instead, write
pCloud.on(pCloud.onRequest, () => {});
// This syntax is not nice though but the functionality is better since it integrates directly with EventEmitters.
RixTheTyrunt
Scratcher
33 posts

Meowclient - connect to Scratch with NodeJS

Thank you for this wonderful library. I just want you to add one small thing if you haven't: replying to comments on user profiles (own and someone else's) and on projects! If you can't do it, that'd be sad.
god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

RixTheTyrunt wrote:

Thank you for this wonderful library. I just want you to add one small thing if you haven't: replying to comments on user profiles (own and someone else's) and on projects! If you can't do it, that'd be sad.
Yes, Meowclient v4 will get this capability. In fact, if you want to “live on the edge”, just do
npm install webdev03/meowclient
to get the alpha release

Edit: I realise that you may not have understood how it works.
(Note that thing is either a profile or a project)
So for both Profile (new) and Project (v3) it works in multiple ways:
1. Plain comment, no replying
thing.comment("I like this!");
2. Replying comment, with ping
thing.comment("Thanks for your comment!", /*INSERT PARENT COMMENT ID HERE!*/, /*INSERT PARENT COMMENTER ID HERE!*/)
3. Replying comment, no ping (Looks funny because there is no @ at the start)
thing.comment("Thanks for your comment!", /*INSERT PARENT COMMENT ID HERE!*/, undefined)
The comment IDs can be attained from getComments

Last edited by god286 (Oct. 29, 2023 03:33:50)

god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

Bump!
v4 releasing this week
god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

Sorry for saying “this week” earlier. I really want to make sure that it is a near-perfect release.
Please try the latest version of meowclient from the source and tell me if you find any bugs or such.
god286
Scratcher
1000+ posts

Meowclient - connect to Scratch with NodeJS

RIP mobile forums You will be missed dearly
Currently in the process of changing everything to use normal forums

Powered by DjangoBB