Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Conversation

@zunda-arrow
Copy link
Member

Changes

  • adds: Basic gateway. Shards. They are not started properly because I didn't understand that part of the docs.
  • fixed: Middleware is updated with proper type hints.
  • improvements: Gateway shouldn't disconnect

This needs to be reviewed. The gateway has some pretty awful code so I'm opening this now so I can get some suggestions

Check off the following

  • I have tested my changes with the current requirements
  • My Code follows the pep8 code style.

@zunda-arrow zunda-arrow marked this pull request as draft December 23, 2021 20:17
@VincentRPS
Copy link
Contributor

fixing gateway more like rewrite

@zunda-arrow
Copy link
Member Author

zunda-arrow commented Dec 24, 2021

fixing gateway more like rewrite

@VincentRPS Pincer somehow has a lot of technical debt 👐
But really, not much changed in this PR.

@VincentRPS
Copy link
Contributor

@Lunarmagpie did you remove websockets from setup_config?

@zunda-arrow
Copy link
Member Author

the dependency has been removed

@zunda-arrow zunda-arrow marked this pull request as ready for review December 26, 2021 21:29
@codecov
Copy link

codecov bot commented Dec 26, 2021

Codecov Report

Merging #329 (05f7e3d) into main (6a8337a) will increase coverage by 0.54%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #329      +/-   ##
==========================================
+ Coverage   90.00%   90.54%   +0.54%     
==========================================
  Files           9        8       -1     
  Lines         100       74      -26     
==========================================
- Hits           90       67      -23     
+ Misses         10        7       -3     
Impacted Files Coverage Δ
tests/_utils.py 0.00% <0.00%> (-100.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a8337a...05f7e3d. Read the comment docs.

Returns
-------
bool
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if it's required but shouldn't it be :class:`bool` or sth like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Its not required I think

socket : :class:`~ws:websockets.legacy.client.WebSocketClientProtocol`
The current socket, which can be used to interact
with the Discord API.
def set_session_id(self, _id: str):
Copy link
Member

Choose a reason for hiding this comment

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

property?

Copy link
Member Author

@zunda-arrow zunda-arrow Dec 27, 2021

Choose a reason for hiding this comment

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

Thats a setter not a getter. I could make the variable public but I kept it private for consistency.

zunda-arrow and others added 2 commits December 27, 2021 18:01
@trag1c trag1c mentioned this pull request Dec 29, 2021
2 tasks
@zunda-arrow zunda-arrow merged commit 72993cb into Pincer-org:main Dec 30, 2021
Copy link
Member

@Sigmanificient Sigmanificient left a comment

Choose a reason for hiding this comment

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

coro coro coro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants