Giter VIP home page Giter VIP logo

g.js-self's Introduction

g.js-self's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar disasterday2 avatar jgb14002 avatar sxmurai avatar zaida04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

g.js-self's Issues

WS Gateway does send any data

Ever since the Guilded API update that broke the old login system of sending the HMAC_SIGNED_SESSION cookie through the WS, the WS gateway has not been sending any data under opcode 42. At the moment, the lib is only receiving 0 (connection established), 3 (heartbeat), 40 (ready event), & 41 (??).

Screenshot of test log:
image

As shown above, things like the ping and connection established are shown. However, things like messages, reactions, pretty much everything you'd get through WS, is just not being sent. I've attempted to do some debugging, and swapping of WS libraries but this is persistent across libs (I tried socket.io as well). This could be a network issue on my end, but I've had one other person report this.

Any help or knowledge on this issue would be much appreciated.

@guildedjs/guilded-api-typings timeline

REST:

  • Discover all endpoints
  • Document endpoints

WS:

  • ChatMessageCreated
  • ChatMessageUpdated
  • ChatMessageReactionAdded

Common:

  • API structures (document, leaf, nodes)

@guildedjs/guilded.js timeline

Required Structures (all must accept client):

  • Base
  • Message (accept channel and data param)
  • MessageReaction (accept message and reaction data)
  • Team (accept team data)
  • TeamChannel (accept team and channel data)
  • DMChannel (accept user and channel data)
  • Channel (abstract base)
  • Team Role (accept team and role data)
  • GuildedJSError (accept error data)
  • TeamMember (accept team and member data)
  • User (accept user data)

Managers:

  • BaseManager<Structure, StructureData>
  • Add function accept either an object being held or what encompasses the structure data
  • ChannelManager
  • ChannelMessageManager
  • TeamChannelManager
  • TeamManager
  • TeamMemberManager
  • TeamRoleManager
  • UserManager

Typings:

  • Type all structure data (separate from api data??)

The future of this project

โš ๏ธRead the most recent reply to this issue. The below plan is no longer in place.

As I'm sure you're aware, this repository and it's packages are currently for the Guilded *user API. I have been given Early Access to the bot API in order to adapt my library to the new bot API. Seeing that selfbots aren't necessarily outlawed on Guilded, support for the user API verison of this library will continue.

With this new API access, I will now be starting work on the next branch of this repo, which will include the following breaking changes:

  • current @guildedjs/guilded.js package will be renamed to @guildedjs/guilded.js-selfbot.
  • new package will be published under @guildedjs/guilded.js that covers the bot API. Will include the same caching, ws, events, and other mechanics that the old package had.
  • @guildedjs/rest will be adapted to work for both the bot API and the user API (atm it's literally just a fancy node-fetch wrapper with retry logic, which I'll have to rework for the bot API to take into account ratelimit headers).
  • user API typings in @guildedjs/guilded-api-typings will be moved to a user directory in that package, and the bot API typings will be in a bot dir with the API versions being separated by dirs with the appropriate version number (e.x. v1/, v2/).

This process will take weeks, maybe even months. There is no planned package release date. I have full permission from Guilded employees to publish my work on the bot API on GitHub.

Websocket connection fails with 400 error

Error: Unexpected server response: 400
at ClientRequest. (/home/ken/workspace/guildedtest/node_modules/ws/lib/websocket.js:604:7)
at ClientRequest.emit (node:events:378:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:636:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
at TLSSocket.socketOnData (node:_http_client:502:22)
at TLSSocket.emit (node:events:378:20)
at addChunk (node:internal/streams/readable:313:12)
at readableAddChunk (node:internal/streams/readable:288:9)
at TLSSocket.Readable.push (node:internal/streams/readable:227:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

Websocket tab suggests that guildedClientId parameter could be important. Also noted that cookies are not sent with the upgrade request.

question

when this finished will i be able to easily convert my discord.js bot to work with this? also i know this is very early to be asking something like this, but will there be something similar to discord.js-commando? (possibly named guilded.js-commando)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.