#topgg-open-source
1 messages ยท Page 6 of 1
but that sounds good yeah i see no issue with the entity obj
fetch apis are the priority for api/v1
@dense barn oh oh oh, you might want to pass like, a discordId in the entity
cuz arent ids not discord bound anymore

got it
gmm
connections: {
discord: {}
}
also looking clean
but it might be a little bit more complicated
iirc what most people do is this
discord does it, google does it, plenty others
@surreal socket https://github.com/top-gg/python-sdk/blob/master/topgg/client.py#L63 still refers to on_guild_post. Maybe it can get fixed along with the README.mdโthe redundant variable and consistency in using quotes mark. It can be copy-pasted from https://docs.top.gg/libraries/python/, I guess. Or you may have fixed it?
Okie, np
poggers dude
honestly looking forward to that
@dusky shale all deps in requirements-dev except pytest itself
Yeah?
Should I add pytest in requirements-dev? ๐
pytest-asyncio and pytest-mock depends on it I guess
But if you wanna explicitly list it, why not? xd
It didn't install pytest?
I'm trying to get back my PyCharm settings I used before 

Why does it match the key type though?
tbf the list check is redundant
both of those keys are lists anyway and if they're not then shit's very bad
Wait, the attr itself is the list, not the value
Or rather, the key
The list won't equal both owners and guilds, will it?
It won't, hence the in
I was accidentally checking if attr itself is a list and then if attr is either equal to owners or guilds
I'm surprised PyCharm wasn't yelling at me for this before
exdee, prob caching issues
oh wait no I just excluded the tests folder from inspections
Ah
be me
be trying to fix your top.gg library code for almost a month now
you realize the error was within your class initializer function
you forgot["status"]because you were checking the object and not the JSON response code
on the more bright side that doesn't include my highly shown stupidity, i can finally push the update to the PHP library that implements automatic stats posting and webhook integrations

@dusky shale like 3 years and we haven't thought about closing the request in HTTPClient.request method
This is fun!
Closing the request? Isn't it a context manager?
It is, and we either return the request body or raise an error
so basically it doesn't close
Makes sense for me to only keep my log.debug in the context manager, right?
__aexit__ does close it though
It's still called even when you return it, because it goes out of that block. Kind of behave like finally I guess.
Oh, I see
But yeah, I think it actually just "releases" the connection. There's release and close lmao. Probably a good idea to call it explicitly
You mean close the request manually?
It got these comments ```
We're basing behavior on the exception as it can be caused by
user code unrelated to the status of the connection. If you
would like to close a connection you must do that
explicitly. Otherwise connection error handling should kick in
and close/recycle the connection as required.
So, either way is fine, I guess
Where's that? ๐
oh
Since when did topggpy stop returning dictionaries?
Since never
DataDict is subclass of dict, v1.1
utter pain
Pain
https://github.com/top-gg/python-sdk/issues/53 @dusky shale what do you mean with this? What's wrong with sleeping on 429 instead of continuing to second iteration?
It's not a big deal though, just a bit unnecessary, I think. I don't know what's the chance to get rate limited on the second try, but consider this case:
- Makes a request
- Gets ratelimited, sleep a bit.
- Do the second try
- Still gets ratelimited, sleep again (is this necessary?)
- Raises error
I don't think there are big chances to get ratelimited with the current local ratelimiter, but it's still possible if you restart your bot while the local ratelimiter is "capped" at max_calls
As for second-try ratelimit I'm not sure honestly
Yeah, now that I think of that, it's trivial and unlikely gonna happen
I'll keep it in mind but close the issue ig
People are free to report it when it becomes an actual issue
Sure
. It's not gonna be an issue as far as I'm aware, just gonna delay the lock release a bit
Das pog you got those options. I need to add it manually 
๐คฃ
Btw, you don't install topgg or what?
All of it is local and since all my tests do import topgg instead of from .. import topgg, it can't find the module in the tests folder
I used to but not anymore 
Oh nice 403s when trying to push
Yeah, but shouldn't you got it installed?
In my Git repo or as a package via pip?
Locally, with the editable flag
Nop 
lmao, that's a pain
idk I'm used to just working with the repo clone locally and then updating that
What I usually do:
- clone the repo
- pip install -erepo
- profit
Prob cuz I tend to test it in a real project that depends on it
Probs
I just don't think I have any need for the PyPi package altogether since I don't even personally use it

LMAO
But yeah, the editable flag is useful since it creates sort of a symlink. So the changes reflect in real time (taking runtime caches into account, obv) which is useful for development
Note to self: stop forgetting to add changelogs
I'll take a look at it, sounds helpful for... whenever I'll need it
v1.2 is out and should be good to go

so dictionaries with extra steps 
Pretty much ๐
1.3.4: remembered to add changelogs
v2 changelog be like: added appropriate changelog for v1.2
๐คฃ Can't have that in my case. they ain't the smartest
You'd be surprised how idiot proof you can make stuff
I say this while still trying to investigate why my bot can only make one request before it gets ratelimited

I'm praying to god it's a bug in the bot instead of the lib, because if it's the lib then I've been debugging the wrong thing for ages
Good luck lmfao
I'm gonna need that
I mean I just found this comment in my code
# Yes, this is the function that single-handedly carries this module
# Yes, it's a bit jank
# Yes, you're welcome to tidy it up
# No, there's no need to change anything
# It works perfectly fine
# JUST DON'T *TRY* TO BREAK IT
If that gives you any idea how confident I am in it
@dense barn @wintry marten progress on how to push to git? what's the plan
well i dont even thing any of us know what has to be done, we havent decided on how, what user, what tokens etc
I just need to set up the secrets, correct?
if we're using top-gg-bot, but you said we shouldnt so idk
noice
@dense barn what was the domain you set it up on?
new build for PHP library deployed to fix JSON query-string construction on the HTTP URI path
@dense barn do we have any information about upcoming new endpoints for API/v1?
Refer: #topgg-api message
no
@wintry marten in case you missed it https://github.com/top-gg/node-sdk/pull/63 is ready for review
not sure if you noticed, but Veld posted this:
not sure why but that was ran on the old docs so its fine
(@wintry marten just so you know the preview for what i just made is here https://deploy-preview-63--jolly-benz-150468.netlify.app/classes/api.html)
i know i saw
btw stringified bigint does break code since it's not compatible with string in my experience
I think we should leave the bigint change for a major change
yeah i found that out half an hour ago, i pushed the revert
oh wtf my github didn't update with the new comments, my bad

@dense barn just pushed the new docs, can you update the netlify and let me know what the slug is
well it is updated, but you said you were gonna add a custom slug, then i can apply for the js.org
actually i think js.org has a requirement on that
just make it topgg-node-sdk.netlify.app or sumn
i lied they dont
ok nvrm
ok

I gotta know too for my stuff lmao
here u go
~~i mean should make a slug regardless but i dont wanna annoy veld
~~
Documentation for @top-gg/sdk
ty
Giving webhook posting header support in PHP for easy compatibility
The error handling has been reworked now to work in compliance with custom exceptions now, so the response code will be tracked and forced rate limiting will occur within the script if it notices the limit is active on the API token regardless of calls being requested
Rate limits will currently be sent as PHP warnings instead, while anything error/fatal within the script receives a mutable BaseException with throwable defaults.
On another side note, I am still actively testing Issues written in the top-gg/issues repository (hopefully this gives some aid to Xignotic who's been doing a good majority of the labeling on them so far) to help have secondhand reports either confirming or denying something is an issue existent with the website(s).
I've already added your requested subdomain to JS.ORGs zonefile. You may have to configure your host to accept the custom domain.
I'll merge after we have "contact". Please keep this PR open.
@dense barn
you have to add the custom domain to the netlify app
@wintry marten uuuh how should i re-publish the release so that the action works?
i cant delete a previous release so i cant just redo it again
and re-running all jobs reruns the old script
nvrm i can delete old release github just poopoo
netlify should already be getting updated by master
the npm publish i mean
yeah pain
i cant delete the tag either
that i cant actually delete cuz i dont have write perms
which tag
3.1.2
why do you need to delete it
because the action failed so i cant publish to v3.1.2
do we need to publish anything for docs changes?
there we go
thanks
@dense barn https://github.com/top-gg/docs/pull/31 btw you do know that extreme was basically just copy pasting existing documentation so that it can just be in docs, can't expect there to be code changes, atleast until its rewritten
Sounds like a recipe for disaster
eyes
PHP library now allows direct widget creation with HTML/markdown variation for webservers.
Pog
@wintry marten lul should i make a react element for widgets in the sdk? or do it out-of-lib
separate lib
gamer
should be separate tbh, only reason it's in PHP library is because PHP can be used for webserver or pure backend development
btw fun fact
top.gg public API v1 is live in internal networking and will be implemented on the site this week
do be poggers
gimme a ring when it's out for us to use โ๏ธ
ring as in ๐ or as in ๐
if i sell both of them i'll get more money than the $11.38 in my bank account right now
so either is fine
as ๐
Ya'll istg
very pogs
Poggies
PSR-2 support has been extended to PHP library via. separation of all interfaces and classes to customized "stubs" layout, this allows easy toggling and the ability to load specific namespaces faster.

@karmic valley I'll be sharing the PHPDocs with you later this week
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@wintry marten im removing the double / in the _request method, but im curious if i should care about it being a breaking change, since it's private, marked with an underscore, and is not documented? or should i care and just do something like
let url = `https://top.gg/api${path.startsWith("/") ? path : `/${path}`}`;```
should be fine to break that as long as it doesn't break the user-facing api
if you're using underscored functions in js that's your fault

One message removed from a suspended account.
@tiny shard https://github.com/top-gg/node-sdk/pull/69
why. i already said i was going to fix it myself
smh
ah didnt notice
pr closed
and then

alright donโt do stuff like that, reopen the pr. itโs just git etiquette not to do things like that, but once youโve already done it thereโs no point in wasting it @high depot

just reopen it itโs fine
Interesting to know that you get muted for showing how disrespectful someone is 
@spare sedge so I guess he will just get along with nothing, right?
@dusky shale feel free to dm me if you would like to report what had happened, or talk about the reason for your mute
P.S. this isn't #reports
@dusky shale i know you are unmuted now but in the future please keep this chat on topic and do not use it to bypass a mute either :( Otherwise it could lead to further punishment, which i dont want to happen
can dm a mod for reports
I don't know Rust well enough soz
I've been thinking about transferring topggpy over to norizon as I cba to maintain any public projects at this time

what the fuck was that
@wary stratus join dev vc
flushed
imagine not being able to type in any of the channels
lib devs get the free pass ๐

For the base class?
Why not just Any it like the rest?
VT = TypeVar("VT")
Yeah, it needs to be a TypeVar for this to work
We can actually make use of TypedDict, so that we have no Anys
Okie, I don't mind implementing it any time
@dusky shale i guess you're the uh, new dev for the py lib just so you know
Yeah, shiv has told me. Thanks anyway
yup. alright so i would make a pr into https://github.com/top-gg/docs/blob/master/CODEOWNERS to get codeowner for the python docs on the main docs site
Will do later, thanks!
also feel free to bounce any ideas off of me, i do have some python experience and if you need that top.gg library feedback i'll be here for ya
Sure, I have something in mind
๐
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@noble shadow maybe yeet vanity url for a bit to prevent bots joining
No
vanity isnt the only invite we have
well bruh
lock #site-translators pls
since they'll spam here once general is locked
kek
lmao
I added a few hacktoberfest issues if anyone's interested in taking them up before some rando who doesn't even have an anime avatar does
https://github.com/top-gg/docs/issues/45
https://github.com/top-gg/node-sdk/issues/61
https://github.com/top-gg/node-sdk/issues/70
Time to get to looking
lmfao
dis channel ze ded

Not much to talk about rn :>

boi wat da hell boi
boi your pic crashed my discord boi
when pull requests get long boi
That's where rebasing becomes handy when merging.
PS: First message of 2022 on the most active channel
lets gooooooooooo
how i got access to this channel

the pog emojis still exist? 
@wintry marten not sure if you're the person to go to, but i think it would be valuable for the api to treat @me on bot_id endpoints (similar to how discord does it) would be valuable and more readable to replace the current way of doing it which is just completely omitting the bot_id entirely. so for posting stats it would be POST /bots/@me/stats instead of POST /bots/stats, obviously you need it for non-breaking purposes. but i think @me would be a good alternative that can eventually phase out the old way
I don't think we'll be making any changes to the old api at this point
will the new api have this distinction?
not sure, we're not really there yet
ayo just making you aware that this shit right here added a malware that purges users disks
make sure u dont update so topgg stays cool and working
https://github.com/RIAEvangelist/node-ipc
Like I again get the message
But
Why would you want to put it in code that is possibly used in production environments
Another user on another discord server I provide support on reported that 000webhost injects a goddamn banner with such message, even on data response stuff like php scripts

Took us ages to debug why the fuck it didn't work
Just imagine the issues it might cause when something like that is used within banking or a more important environment like hospitals 
Aaaaand enough GitHub, reading the issues on the peacenotwar repo made my braincells die
Christ why would anyone even try do that, regardless of if there is a war or not, on a widely used package and then tell people to โjust use another versionโ when complaining?
Good 
Trust killed off on that repo nonetheless

also unity updated to that version and had people appear that file
Great view on a supply chain attack though
Also the snyk cve for anyone interested https://snyk.io/blog/peacenotwar-malicious-npm-node-ipc-package-vulnerability/
https://security.snyk.io/vuln/SNYK-JS-NODEIPC-2426370
they did only on master 
@wintry marten could we change the link on node-sdk to https://topgg.js.org ?
Documentation for @top-gg/sdk
Also we should probably reference 418 codes on the rate limit page, a few people have had those this week
418 only ever appears if you do a get request to /api which you have no reason to do and does not happen on rate limits
a bug with a library update maybe
One message removed from a suspended account.
One message removed from a suspended account.
Oh, I looked online and it said its when you ignore a cloudflare's 429 code. I'll check with the person who said, but I'm pretty sure they got it from posting stats
where did you see that
One message removed from a suspended account.
One message removed from a suspended account.
man can't you just set up a reminder for yourself
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
not at all what I meant by that
#support message is them talking about the 418
#topgg-api message is me referencing the 418 definition i found
not sure which you meant 
I can't find any docs at all to back up that 418 claim
oh
it was the first result i found and several other pages said the same
One message removed from a suspended account.
cloudflare will hit you up with a 429, 418 is the 4 year old meme endpoint response we never changed
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
every single one of these requests have been made to /api not stats
it's just a library error
oh ok
One message removed from a suspended account.
One message removed from a suspended account.
one of the old devs put it in as a joke but nothing has changed about it for many years, this isn't a recent bug or anything
makes sense 
One message removed from a suspended account.
One message removed from a suspended account.
submit PRs for now and we'll see
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Alrighty
Only stuff that's honestly needed there is some cleanup and compatibility stuff
As it's technically still up-to-date except perhaps the domain and old readme
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@wintry marten why was 72 merged?
That completely removes the ability to leave the instantiating generic
uh maybe we can just add a comment for eris or something idk
idk why itโs need at all
probably wouldโve been better to just
({ โฆ })
idk I mean to me these docs are just examples 
exactly and now the example implies that you need these intents or you need these options on things like a sharding manager which isnโt the case
sure
thatโs not good
I just rolled it back
if you feel the need to differentiate between instantiations i can make it, but i donโt think itโs strictly necessary
I don't think it's necessary
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Are you referring to the java sdk?
One message removed from a suspended account.
You'd need xetera to add you as a maintainer then
One message removed from a suspended account.
i have no idea who has access to maven or wherever its hosted
the last push for that was before anyone on the team joined
Would otherwise say just yeet the maven and refer Devs to jitpack
Oh wait
Nah the docs mentions jitpack, jitpack isn't owned by anyone, it just translates the GitHub repo to a maven dependency
So any changes you make on master will be reflected by jitpack automatically once someone tries to update
Same on the gradle one
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
You never made a release
One message removed from a suspended account.
The last one is still from 2018
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Yup a maintainer has to create a release
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
confusion
im reading your pr it sounds like youre taking over the java sdk in general? @kindred maple wouldnt you be the one to merge your pr and create a release
i dont actually have perms on that repo atm
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.

it was busy im sorry i forgot ๐ฅบ
One message removed from a suspended account.
One message removed from a suspended account.
sorry im out of office at the moment. fwiw weve been super busy and this wasnt part of our planned work so i hadnt brought it up yet, no one is ignoring you or anything
i dont have perms in the org or the repo at all
One message removed from a suspended account.
One message removed from a suspended account.
its rly a xettypoo question thats who i would/will be bugging
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I wish we mods had access to repo stuff istg
one thing I dont get though, why is org.json as a dependency when you have gson
or whats the difference between both
oh nvm one can be used to serialize
honestly the repo needs a breaking restructure regarding the classes, bunch of cleanup etc
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
nah
dont have the time to
One message removed from a suspended account.




