Skip to content
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

feat: implement events #3

Merged
merged 28 commits into from
Sep 1, 2021
Merged

feat: implement events #3

merged 28 commits into from
Sep 1, 2021

Conversation

DjDeveloperr
Copy link
Member

@DjDeveloperr DjDeveloperr commented Aug 29, 2021

towards #1

  • buffered reading. very large packets were broken.
  • refactored into low level DiscordIPC and high level Client
  • implement events based on AsyncIterator

* buffered reading
* refactor
* implement events based on AsyncIterators
@DjDeveloperr
Copy link
Member Author

I was thinking about that we can probably keep DiscordIPC for sole purpose of interacting with Discord IPC at low level, and add an Client which abstracts away things such as commands, events.

@DjDeveloperr
Copy link
Member Author

Also constructing class the way it's done right now adds some unnecessary complexities I feel like and we're locked to use unique symbols. Why not let the constructor accept Deno.Conn and createClient or DiscordIPC.connect static method for finding Conn and constructing it? It could also help us write tests by mocking the IPC.

src/conn.ts Outdated Show resolved Hide resolved
@DjDeveloperr
Copy link
Member Author

Also added Client implementation to this PR

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thank you!

@littledivy littledivy merged commit c89b9b6 into harmonyland:main Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants