#topgg-open-source

1 messages ยท Page 6 of 1

dense barn
#

perhaps

#

for webhooks

#

probably

tiny shard
#

but that sounds good yeah i see no issue with the entity obj

dense barn
#

fetch apis are the priority for api/v1

tiny shard
#

@dense barn oh oh oh, you might want to pass like, a discordId in the entity

#

cuz arent ids not discord bound anymore

dense barn
#

yea

#

the id = discord id for now

tiny shard
#

rihgt

#

maybe userId then?

#

not sure

dense barn
#

user

#

the webhook won't change

#

user: string still gives the user id

tiny shard
#

yeah, but how do u access the top.gg user's id?

dense barn
#

ah

#

for api/v1 we will expose a basic user payload

tiny shard
dense barn
#

e.g.

#
user {
  id: string;
  connections: [
    { type: "discord", id: string },
  ];
}
tiny shard
#

got it

dense barn
#

gmm

#
connections: {
  discord: {}
}
#

also looking clean

#

but it might be a little bit more complicated

tiny shard
#

discord does it, google does it, plenty others

dense barn
#

yea

#

this is what we also do under the hood

dusky shale
surreal socket
#

Oh huh what

#

I'll get on it after college

#

Thanks for noticing ๐Ÿ‘€

dusky shale
#

Okie, np

worthy cypress
#

honestly looking forward to that

surreal socket
#

@dusky shale all deps in requirements-dev except pytest itself

dusky shale
#

Yeah?

surreal socket
#

Should I add pytest in requirements-dev? ๐Ÿ˜‚

dusky shale
#

pytest-asyncio and pytest-mock depends on it I guess

#

But if you wanna explicitly list it, why not? xd

surreal socket
#

I don't think so

#

sec

dusky shale
#

It didn't install pytest?

surreal socket
#

Oh yeah it did

#

I'm just being dumb

dusky shale
#

You're not ๐Ÿญ

#

Is it rolling out pogey

surreal socket
#

I'm trying to get back my PyCharm settings I used before KEKW

dusky shale
surreal socket
#

Mmmm yes

#

attr is a list and is either owners or guilds

dusky shale
#

Why does it match the key type though?

surreal socket
#

tbf the list check is redundant

#

both of those keys are lists anyway and if they're not then shit's very bad

dusky shale
#

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?

surreal socket
#

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

dusky shale
#

exdee, prob caching issues

surreal socket
#

oh wait no I just excluded the tests folder from inspections

dusky shale
#

Ah

worthy cypress
#

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
pepeHands

#

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

surreal socket
#

@dusky shale like 3 years and we haven't thought about closing the request in HTTPClient.request method

#

This is fun!

dusky shale
#

Closing the request? Isn't it a context manager?

surreal socket
#

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?

dusky shale
#

__aexit__ does close it though

surreal socket
#

I don't think it closes when I return within it?

#

Since it doesn't actually exit topggThink

dusky shale
surreal socket
#

Oh, I see

dusky shale
#

But yeah, I think it actually just "releases" the connection. There's release and close lmao. Probably a good idea to call it explicitly

surreal socket
#

You mean close the request manually?

dusky shale
#

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

surreal socket
#

Where's that? ๐Ÿ‘€

surreal socket
#

oh

brisk fossil
#

Since when did topggpy stop returning dictionaries?

dusky shale
#

Since never

surreal socket
#

DataDict is subclass of dict, v1.1

worthy cypress
surreal socket
#

Pain

surreal socket
dusky shale
surreal socket
#

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

dusky shale
#

Yeah, now that I think of that, it's trivial and unlikely gonna happen

surreal socket
#

I'll keep it in mind but close the issue ig

#

People are free to report it when it becomes an actual issue

dusky shale
#

Sure topggThumbsUp . It's not gonna be an issue as far as I'm aware, just gonna delay the lock release a bit

surreal socket
#

Oh my God

#

Oh I didn't tick these two apparently

dusky shale
#

Das pog you got those options. I need to add it manually mmLol

surreal socket
#

๐Ÿคฃ

dusky shale
#

Btw, you don't install topgg or what?

surreal socket
#

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 KEKW

#

Oh nice 403s when trying to push

dusky shale
#

Yeah, but shouldn't you got it installed?

surreal socket
#

In my Git repo or as a package via pip?

dusky shale
#

Locally, with the editable flag

surreal socket
#

Nop KEKW

dusky shale
#

lmao, that's a pain

surreal socket
#

idk I'm used to just working with the repo clone locally and then updating that

dusky shale
#

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

surreal socket
#

Probs

#

I just don't think I have any need for the PyPi package altogether since I don't even personally use it

dusky shale
#

KEKW 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

surreal socket
#

Note to self: stop forgetting to add changelogs

#

I'll take a look at it, sounds helpful for... whenever I'll need it

surreal socket
#

v1.2 is out and should be good to go

dusky shale
brisk fossil
surreal socket
#

Pretty much ๐Ÿ˜‚

brisk fossil
surreal socket
#

v2 changelog be like: added appropriate changelog for v1.2

brisk fossil
#

lmao

#

changelogs are hard, I just let the users figure it out tbh

surreal socket
#

๐Ÿคฃ Can't have that in my case. they ain't the smartest

brisk fossil
#

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

surreal socket
brisk fossil
#

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

surreal socket
#

Good luck lmfao

brisk fossil
#

I'm gonna need that

brisk fossil
surreal socket
#

LMFAO

#

Poor you

tiny shard
#

@dense barn @wintry marten progress on how to push to git? what's the plan

dense barn
#

No need to ping Xetera

#

I haven't done this yet

tiny shard
dense barn
#

I just need to set up the secrets, correct?

tiny shard
dense barn
#

yo pog

#

@ornate kite wrote us a ruby lib

tiny shard
#

noice

dense barn
#

Can we quickly jump into a call btw

#

so we can get this thing done

tiny shard
#

@dense barn what was the domain you set it up on?

dense barn
#

none

#

it didn't build yet

tiny shard
#

i mean netlify

#

oh

#

uh

#

ok

worthy cypress
#

new build for PHP library deployed to fix JSON query-string construction on the HTTP URI path

worthy cypress
#

@dense barn do we have any information about upcoming new endpoints for API/v1?
Refer: #topgg-api message

dense barn
#

no

tiny shard
worthy cypress
#

not sure if you noticed, but Veld posted this:

tiny shard
tiny shard
wintry marten
#

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

tiny shard
wintry marten
#

oh wtf my github didn't update with the new comments, my bad

tiny shard
#

@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

dense barn
#

ok

#

this is the url btw

tiny shard
#

ye ik, do u want a slug?

#

like topgg.netlify.app

dense barn
#

it shouldn't matter

#

because it'll never be used

#

other than in the DNS

tiny shard
#

right

#

ok

tiny shard
#

just make it topgg-node-sdk.netlify.app or sumn

#

i lied they dont

#

ok nvrm

dense barn
#

ok

worthy cypress
#

Berry squint

#

Which one is it

dense barn
tiny shard
#

idk

#

most of them in there have slugs

#

but i see like

#

2

#

that dont

worthy cypress
#

I gotta know too for my stuff lmao

dense barn
#

here u go

tiny shard
#

~~i mean should make a slug regardless but i dont wanna annoy veld kek ~~

dense barn
tiny shard
#

ty

worthy cypress
#

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).

tiny shard
#

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

tiny shard
#

@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

wintry marten
#

netlify should already be getting updated by master

tiny shard
#

the npm publish i mean

#

yeah pain

#

i cant delete the tag either

#

that i cant actually delete cuz i dont have write perms

wintry marten
#

which tag

tiny shard
#

3.1.2

wintry marten
#

why do you need to delete it

tiny shard
#

because the action failed so i cant publish to v3.1.2

wintry marten
#

do we need to publish anything for docs changes?

tiny shard
#

the docs url to the readme

#

and the homepage

wintry marten
#

ah

#

ok try again

tiny shard
#

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

GitHub

This Pull Request provides documentation updates to the Go section of the website to show proper methods and use of the library instead of linking to a external page just as the Java page did. This...

dense barn
#

Sounds like a recipe for disaster

tiny shard
#

eyes

worthy cypress
#

PHP library now allows direct widget creation with HTML/markdown variation for webservers.

surreal socket
#

Pog

tiny shard
#

@wintry marten lul should i make a react element for widgets in the sdk? or do it out-of-lib

wintry marten
#

separate lib

tiny shard
#

gamer

worthy cypress
#

should be separate tbh, only reason it's in PHP library is because PHP can be used for webserver or pure backend development

dense barn
#

btw fun fact

#

top.gg public API v1 is live in internal networking and will be implemented on the site this week

high depot
#

do be poggers

worthy cypress
surreal socket
#

ring as in ๐Ÿ’ or as in ๐Ÿ“ž

worthy cypress
#

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

high depot
surreal socket
#

Ya'll istg

dense barn
wary stratus
#

very pogs

worthy cypress
#

Poggies

worthy cypress
#

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.

dusky shale
worthy cypress
#

@karmic valley I'll be sharing the PHPDocs with you later this week

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

tiny shard
#

@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}`}`;```
wintry marten
#

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

tiny shard
kindred maple
#

One message removed from a suspended account.

high depot
tiny shard
#

smh

high depot
#

pr closed

tiny shard
#

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

high depot
#

i just cant do normal fix rn

#

im palying warzone

tiny shard
#

just reopen it itโ€™s fine

dusky shale
#

Interesting to know that you get muted for showing how disrespectful someone is pithink

#

@spare sedge so I guess he will just get along with nothing, right?

spare sedge
#

@dusky shale feel free to dm me if you would like to report what had happened, or talk about the reason for your mute

dusky shale
surreal socket
#

P.S. this isn't #reports

spare sedge
#

@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

worthy cypress
#

@surreal socket hey

#

wanna make the Rust API wrapper together with me?

surreal socket
#

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

worthy cypress
high depot
#

what the fuck was that

worthy cypress
high depot
#

@wary stratus join dev vc

worthy cypress
#

flushed

#

imagine not being able to type in any of the channels

#

lib devs get the free pass ๐Ÿ˜Ž

true portal
surreal socket
#

@dusky shale Why is VT set as the kwargs type for some DataDict subclasses?

surreal socket
#

I think

#

Oh yeah

dusky shale
#

**kwargs' keys are always str

#

We type hint the values of it

surreal socket
#

Why not just Any it like the rest?

dusky shale
#

The rest was Any to fill that VT

#

It's a type variable, isn't it?

surreal socket
#

VT = TypeVar("VT")

dusky shale
#

Yeah, it needs to be a TypeVar for this to work

#

We can actually make use of TypedDict, so that we have no Anys

surreal socket
#

Eh

#

It's probably fine as-is tbh

#

Doesn't really matter anyway

dusky shale
#

Okie, I don't mind implementing it any time

tiny shard
#

@dusky shale i guess you're the uh, new dev for the py lib just so you know

dusky shale
tiny shard
tiny shard
#

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

dusky shale
#

Sure, I have something in mind

tiny shard
#

๐Ÿ‘€

kindred maple
#

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.

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

kindred maple
#

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.

kindred maple
#

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.

high depot
#

@noble shadow maybe yeet vanity url for a bit to prevent bots joining

vast cliff
#

No

fair goblet
high depot
#

since they'll spam here once general is locked

#

kek

wintry marten
true portal
#

Time to get to looking

amber drum
#

lmfao

high depot
#

dis channel ze ded

wary stratus
true portal
#

Not much to talk about rn :>

dusky shale
tiny shard
#

boi wat da hell boi

high depot
#

boi your pic crashed my discord boi

pastel girder
dusky shale
#

That's where rebasing becomes handy when merging.

PS: First message of 2022 on the most active channel

amber drum
#

lets gooooooooooo

cunning locust
#

how i got access to this channel

true portal
wary stratus
#

the pog emojis still exist? FLOSHAD

true portal
#

Yews

#

Oh wait

#

I forgot about that

#

oops

tiny shard
#

@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

wintry marten
#

I don't think we'll be making any changes to the old api at this point

tiny shard
wintry marten
#

not sure, we're not really there yet

high depot
wary stratus
#

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 CalliSus

#

Aaaaand enough GitHub, reading the issues on the peacenotwar repo made my braincells die

cunning locust
#

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?

wary stratus
#

They reverted the commit or GitHub did

#

KEKW good

cunning locust
#

Good angery

wary stratus
#

Trust killed off on that repo nonetheless

cunning locust
wary stratus
#

also unity updated to that version and had people appear that file

#

Great view on a supply chain attack though

#
Snyk

Vue.js users using the dependency โ€œnode-ipcโ€ are experiencing a supply chain attack protesting the invasion of Ukraine, from a package named โ€œpeacenotwarโ€.

Snyk Vulnerability Database

Snyk Vulnerability Database

high depot
tiny shard
cunning locust
#

Also we should probably reference 418 codes on the rate limit page, a few people have had those this week

wintry marten
#

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

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

cunning locust
wintry marten
#

where did you see that

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
#

man can't you just set up a reminder for yourself

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
#

not at all what I meant by that

cunning locust
#

not sure which you meant kek

wintry marten
#

I can't find any docs at all to back up that 418 claim

cunning locust
#

oh sus it was the first result i found and several other pages said the same

kindred maple
#

One message removed from a suspended account.

wintry marten
#

cloudflare will hit you up with a 429, 418 is the 4 year old meme endpoint response we never changed

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
#

every single one of these requests have been made to /api not stats

#

it's just a library error

cunning locust
#

oh ok

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
#

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

cunning locust
#

makes sense Hehe

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
kindred maple
#

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.

wary stratus
#

I can assure you nik won't respond on the repo stuff

#

There's 2-3 prs from 2018-19

kindred maple
#

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.

wary stratus
#

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

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary stratus
#

Hi

#

Sure

#

Send a message and I'll pin it

kindred maple
#

One message removed from a suspended account.

tiny shard
#

@wintry marten why was 72 merged?

#

That completely removes the ability to leave the instantiating generic

wintry marten
#

uh maybe we can just add a comment for eris or something idk

tiny shard
#

probably wouldโ€™ve been better to just

#

({ โ€ฆ })

wintry marten
#

idk I mean to me these docs are just examples shrug

tiny shard
wintry marten
#

sure

tiny shard
#

thatโ€™s not good

wintry marten
#

I just rolled it back

tiny shard
#

if you feel the need to differentiate between instantiations i can make it, but i donโ€™t think itโ€™s strictly necessary

wintry marten
#

I don't think it's necessary

kindred maple
#

One message removed from a suspended account.

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary stratus
#

Hi am online

#

What's up

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary stratus
#

Are you referring to the java sdk?

kindred maple
#

One message removed from a suspended account.

wary stratus
#

You'd need xetera to add you as a maintainer then

kindred maple
#

One message removed from a suspended account.

wintry marten
#

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

wary stratus
#

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

kindred maple
#

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.

wary stratus
#

You never made a release

kindred maple
#

One message removed from a suspended account.

wary stratus
#

The last one is still from 2018

kindred maple
#

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.

wary stratus
#

Yup a maintainer has to create a release

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

kindred maple
#

One message removed from a suspended account.

amber drum
#

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

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

amber drum
#

oh lmao

#

okok ill bug someone

kindred maple
#

One message removed from a suspended account.

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

amber drum
#

it was busy im sorry i forgot ๐Ÿฅบ

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

amber drum
#

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

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

amber drum
#

its rly a xettypoo question thats who i would/will be bugging

kindred maple
kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary stratus
#

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

kindred maple
#

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.

wary stratus
#

nah KEKW dont have the time to

kindred maple
#

One message removed from a suspended account.