#topgg-open-source

1 messages Β· Page 4 of 1

dense barn
#

That would be good, thank you!

heady halo
dense barn
#

PepeHands one day it can be merged but null has the tendency to change the entire codebase in one commit and then i can't properly review it

heady halo
#

null's code is interesting

#

I was only going to change one thing in this code, but I wanted to know what is returned in /v1/projects/@me/commands?

heady halo
drowsy thistle
#

can you review my pull requests?

dense barn
#

please link them

dense barn
#

yeah that's not happening tonight lol

drowsy thistle
#

you don't have to review them today

#

take your time veld

dense barn
#

<@&1324896486130974720> it would also be nice to have some other people review here pls

drowsy thistle
#

yes please

#

good luck!

#

dw some of the pull requests have ~100 diffs

#

please let me know if you have any concerns

#

one second, i'm working on python-sdk's #90

woven granite
#

Did we ever get perms setup for staff to do reviews?

dense barn
#

you can review em without any perms

#

I can merge them in no problemo

drowsy thistle
#

also i forgot to update the license year

#

oops

#

one sec

#

nvm i'm getting sidetracked, i'll just do it later

drowsy thistle
dense barn
#

I'd prefer if we could focus on getting things merged instead

drowsy thistle
#

alright!

#

i'll make that a separate pull request

drowsy thistle
dense barn
drowsy thistle
#

noted noted

#

i've also responded to your comment in #90

#

alright thanks for merging it 🫢

drowsy thistle
dense barn
cunning locust
#

that should mean i can use that for the docs i created a PR for

dense barn
#

prolly some thing are still a bit wonky

#

e.g. integer(int64) is parsed as strings for our api

woven granite
#

Neat

dense barn
#

hosted UI will come later

stable zealot
dense barn
#

shrug load balancer slices

#

ok just for u i changed it

jade sandal
#

big w

wintry ivy
#

I need a bot that notifies me when someone new joins a server

wary stratus
#

cool, good luck with that

heady halo
high trail
timid trellis
#

Yeah that's incredibly easy to find.

drowsy thistle
#

planning to do this to the SDKs where i am the core maintainer of -- as I'm waiting for further review

#

done for the C++ and Rust SDK onionpray

dense barn
drowsy thistle
#

changes reverted for the Python SDK DoggThumbsUp

#

changes reverted for the C++ SDK DoggThumbsUp

#

changes reverted for the Rust SDK DoggThumbsUp

#

the rest of the SDKs simply had a bumped license year, these changes shouldn't interfere that much!

#

if you want me to split the prs further or rework some of them, please let me know!

drowsy thistle
#

fixed conflicts in the Python SDK pull request DoggThumbsUp

drowsy thistle
#

license-related changes has been reverted in the Python SDK pull request πŸ™‚ this should make reviewing it a bit less tiresome

#

GitHub workflows and Eslint-related changes have been reverted in the Node SDK pull request DoggThumbsUp

#

these changes will go in another pull request

drowsy thistle
#

thank you so much for your comments Veld! ❀️

#

now the Node SDK pull request can be merged!

#

cc @tiny shard

steady kite
#

Lmk if you want me to check something

drowsy thistle
#

review the ones you are best suited on!

tiny shard
#

left 1 comment as well

drowsy thistle
#

wait, i forgot about that one

#

one second, sorry!

tiny shard
#

build is also failing it seems

drowsy thistle
#

maybe i can bring them back if you want?

tiny shard
#

no need for config changes but the eslint version was bumped causing an error in even running it

#

id revert the eslint version upgrade and make a separate pr updating it if you want it on latest

drowsy thistle
#

sure

drowsy thistle
tiny shard
#

the response field was still removed

drowsy thistle
#

do i just leave it as undefined?

drowsy thistle
drowsy thistle
#

wait nevermind, that could be a bad idea if i use setGlobalDispatcher

#

i could create a mock ⁨⁨⁨Dispatcher.ResponseData⁩⁩⁩ but that would be a hacky solution

#

but if i leave it as ⁨⁨undefined⁩⁩, the user would get no error message as a clear reason

#

nevermind, i'll just revert it altogether

drowsy thistle
#

the pull request can be re-reviewed again, so sorry guys! onionpray

#

this (and my other) pull requests have been pretty messy, i'll promise not to repeat my mistakes

tiny shard
#

is erroring out without an api call not a goal?

drowsy thistle
#

well it used to just warn the user about the deprecation via ⁨⁨console.warn⁩⁩

#

we just need to convey to the users that the endpoint is deprecated

#

but veld said that we should prioritize on adapting it to v1 over things getting deprecated in v0 (which has been subsided by v1) so it's not that big of a deal

dense barn
dense barn
tiny shard
#

tbh

#

yeah

dense barn
#

If you use the old API, just like don't update.

#

But I feel like that's my thoughts since we're not really anywhere closer to releasing a library version, and the v1 api is basically going to be on feature parity as v0 in a week orso...

#

Previously I felt that if people wanted to gradually adopt the new API they could do it this way, but I don't think that makes sense anymore in terms of timing

#

Anyways, webhooks v2 public API is set in stone now. Above is a working example from my testing, figured I'd share so people can prepare or something 🫑

drowsy thistle
#

but you've been saying not to create breaking changes topggSob

dense barn
#

You want to update the older version

#

We can’t break that api

drowsy thistle
#

fair enough

#

so do i make my pr major then delete the old API?

dense barn
#

Go for it

drowsy thistle
#

alright

dense barn
#

I’ll add the v1 API stats push endpoint later this week

#

Then the API v1 can replace all common use cases

drowsy thistle
#

as soon as i can

#

i have not slept tho, maybe soon

dense barn
#

Go sleep πŸ₯Ή

tiny shard
#

thank you null

#

doin the lords work

dense barn
#

Fr

drowsy thistle
#

that's a lot of deletions! πŸ˜…

dense barn
#

yup only v1 should be left in the 4.0 version

drowsy thistle
#

🫑

#

noted!

drowsy thistle
dense barn
#

merged

drowsy thistle
drowsy thistle
#

should we drop support for node 18 as it's no longer supported?

#

this would be done by making the github workflows test from version 20, and make .nvmrc 20.0.0

drowsy thistle
#

@tiny shard @dense barn what do you think?

tiny shard
#

mmmm. only concern would be to create an easier upgrade path, changing a package version is easier than changing a node version

#

i’m okay with it but if we’re trying to keep spirit with the goal it might be worth continuing support for just the one release first

drowsy thistle
#

alright

tiny shard
#

is there a point?

drowsy thistle
#

thought we would release a newer version for the users who still use v0

#

before we release the major version that deletes the v0 features

dense barn
#

I think that would've been alright 4-5 months ago, but very little value now imo

drowsy thistle
#

alright!

drowsy thistle
#

will close other SDK's v0 pull requests and replace them with v1 ones

drowsy thistle
#

this one is fairly straightforward

#

hm, it seems that newer versions of undici does not work with Node.js v18

drowsy thistle
#

@tiny shard #95 is approved by veld, can you look at it?

#

in the meantime, i'll work on implementing more v1 features to #92 DoggThumbsUp

#

crap, i forgot to add discord-api-types topggSob i'll just add it to #92

#

i'll handle the conflicts

#

implemented GET /v1/projects/@me on the Node SDK DoggThumbsUp

#

time to work on the new webhook approach!

drowsy thistle
drowsy thistle
#

oh by the way, should we continue to support the /api/weekend endpoint? it's not attached to any API version that I know of

drowsy thistle
#

bumped to the next major version, removed all v0 features, and implemented GET /v1/projects/@me on the .NET SDK DoggThumbsUp

#

will update the webhook pull request onionpray

drowsy thistle
#

i think both the Node and .NET SDK are now virtually done! DoggThumbsUp

drowsy thistle
#

i'll work on the other SDKs when I am free haha, sorry! I have final exams next week topggSob

dense barn
#

people would never need to call "/api/weekend" because of this

drowsy thistle
#

alrighty, will remove /api/weekend from the .NET SDK when I am awake!

dense barn
drowsy thistle
#

oh alright, mb mb

dense barn
#

also u can prolly generate openapi spec from our openapi for the types etc

drowsy thistle
#

alright!

dense barn
#

could generate crud clients for all languages iirc

#

that way actual work on SDKs can be done by working on integrations like webhook listeners, specific library integrations etc

drowsy thistle
#

thank you so much veld!

drowsy thistle
#

that means i will ?: virtually everything

dense barn
#

What do you mean?

#

You’re pointing to the entire api schema

drowsy thistle
dense barn
#

Ah no theyre not all optional

drowsy thistle
#

in spec.json

#

even if non-nullable properties don't have it, there's no way openapi-generator-cli would mark every property as nullable

dense barn
#

thanks for flagging, will fix

drowsy thistle
#

lmao 😭

#

no prob!

drowsy thistle
#

well tbh if the ones in docs.top.gg are correct, then i don't need to change anything

#

Python SDK pull request now closed, working on a major pull request that adds v1 support but deletes v0 features

#

6 other pull requests also closed under the same reason

drowsy thistle
#

The Java SDK's webhooks pull request now uses the new authorization approach!

#

refactored the .NET SDK pull request on it as well

drowsy thistle
#

I'll work on the rest when I am free. schedule is crazy packed for the 10 days 😭

#

I've made existing WIP pull requests draft DoggThumbsUp

steady kite
drowsy thistle
#

but why add yarn to package.json?

#

i'm okay with it but it's a bit odd

steady kite
#

I just installed it

#

any now anyone else who pulls that will also have it

#

its needed to run the server

drowsy thistle
#

fair enough

#

other than that the pull request looks okay :)

steady kite
#

well I better hope so

drowsy thistle
#

btw william, if you have time, can you review some of my pull requests?

drowsy thistle
#

not updated yet, sorry

#

@steady kite updated

steady kite
#

alrught

#

left comments on them, they look good to me don't have perms to actually review them

drowsy thistle
#

you took the time and that's all that matters

#

love u 🫢

wheat geyser
#

me : lgtm
production : nuh-uh πŸ˜‚

drowsy thistle
#

tests: yuh uh

wheat geyser
#

that's the only serving grace tbf

drowsy thistle
#

I'll address the .NET SDK comments when I am free as I am undergoing final exams right now, thanks Veld!

drowsy thistle
#

I'll also do the same to other webhook pull requests, sorry Veld! πŸ˜… I did not know about the payload changes as well

#

every pull request updating it will be drafted for now.

#

I promise I'll work on them next week. onionpray

crimson plover
#

Hi

drowsy thistle
#

hello!

crimson plover
#

Can u help

#

Looking for bot to list sports listing to add to server

drowsy thistle
#

you can look it up in the website, also this is not the correct channel to ask it πŸ˜„

crimson plover
#

Ok

#

Can't find one

drowsy thistle
#

@dense barn hey uhm

drowsy thistle
tawny nest
#

Is that comic sans ms topggSick

drowsy thistle
#

yes

drowsy thistle
#

Java SDK webhooks updated!

#

now it's time to sleep, it's 3am!!! πŸ™ˆ

drowsy thistle
#

currently working on updating the Rust SDK onionpray

dense barn
#

need a bit more context

#

what app id are you calling this from?

drowsy thistle
#

the lib dev access bot

dense barn
#

thx

drowsy thistle
dense barn
#

will fix the bug that it 500s tho

drowsy thistle
#

🫑

dense barn
#

fix pushed, should be working in approx 10 minutes

drowsy thistle
#

thanks Veld!

drowsy thistle
#

I am really low on sleep right now. Here's the current progress on the Rust SDK:

drowsy thistle
#

added getVotes to the Node SDK poggythumbsup the pull request can be reviewed now!

drowsy thistle
#

I think I can safely say that the Node SDK is now complete πŸ˜„

drowsy thistle
#

the Rust SDK is complete from an API standpoint. all it needs now is to test its updated webhooks!

drowsy thistle
#

i am really tired, so i am going to bed right now πŸ˜„ will work on the rest in a few days

#

also from now on i'm gonna work on one SDK per day so i don't get burned out so quickly, sorry everyone! onionpray

drowsy thistle
#

the Rust SDK is now complete!

#

these are pretty big diffs πŸ˜… i'll split it into two pull requests

drowsy thistle
drowsy thistle
#

@faint fern sigh

tardy falcon
dense barn
#

pls don't advertise in random channels

tardy falcon
#

Plz help

dense barn
drowsy thistle
dense barn
#

no

#

same ratelimits

drowsy thistle
#

so i'm guessing 100/second for all routes?

drowsy thistle
#

currently working on rewriting the Python SDK πŸ˜„ TODOs:

  • implement post commands for different libraries
  • implement webhooks
  • testing
  • documentation

everything else is complete DoggThumbsUp

dense bronze
drowsy thistle
dense bronze
#

what routes are you rate limiting?

drowsy thistle
#

all routes

dense bronze
#
  const { type, data } = req.body;  
  const traceId = req.headers['x-topgg-trace'];

  prettyRequest(traceId || 'No Trace ID', type, data);

  res.status(200).send('Webhook received successfully');
});
#

if im not mistaken

drowsy thistle
#

webhooks?

#

i was referring to the Top.gg API endpoints

dense bronze
#

okay so global ratelimiting would be working fine for those apis

#

you can also do it per user as you are taking the auth token

drowsy thistle
drowsy thistle
#

the Python SDK is almost done! all it needs now is testing and documentation! DoggThumbsUp

drowsy thistle
#

@dense barn ```js
const response2 = await fetch(https://top.gg/api/v1/projects/@me/votes?cursor=asdf, {
headers: {
Authorization: Bearer ${token},
'Content-Type': 'application/json'
}
})

gives 500
dense barn
#

i hope you're not actually passing asdf

drowsy thistle
#

I am actually passing asdf

#

and yes I know what a valid cursor looks like

#

a valid cursor is a long hex string

dense barn
#

low low priority

drowsy thistle
#

I understand, just reminding you Veld πŸ˜„

dense barn
#

@fair goblet could you add it to the backlog?

drowsy thistle
#

a bug is still a bug πŸ™‚

#

you don't have to fix it right now but still

#

but yeah I shouldn't have pinged you πŸ™ˆ sorry if I bothered you

fair goblet
drowsy thistle
#

good night marco!

dense barn
#

Thanks!

drowsy thistle
#

the Python SDK is done! all it needs now is testing and a proper documentation.

current coverage on the Python SDK as per pytest-cov: 100%

drowsy thistle
#

the Python SDK has been successfully tested with 100% coverage! DoggThumbsUp

drowsy thistle
#

hey @dense barn, do you mind if you dm me a public key for the lib dev access bot? i need it to write documentation examples for the Python SDK onionpray

dense barn
#

public key?

drowsy thistle
#

yeah

#

apparently some libraries like discord.http require it to be able to fetch global commands

dense barn
#

you mean the bot token?

drowsy thistle
#

hikari requires this as well

pastel girder
#

in the discord dev portal

drowsy thistle
#

yeah

#

can you dm that to me

drowsy thistle
#

btw i am doing this because i've been trying to document post_commands() usage for various libraries

#

do you guys think i should continue to do this? πŸ˜…

drowsy thistle
#

for starters the Rust SDK has special wrappers for Twilight and Serenity for this purpose

#

at this point i am 3 SDKs in and i'm reconsidering if i should continue doing this or not for the rest of the SDKs

#

@steady kite sorry for pinging you william but I need your thoughts on this

steady kite
#

I would standardize it, so yes do it for the libraries that already have it that way if a user switches or whatever it’s already there if you known what I mean

#

I haven’t experienced exactly what those do, but if we can try to keep them as similar as possible I say to do that

#

Just my own thoughts, velds may differ ofc

nocturne ravine
#

πŸ’œπŸ’œ

drowsy thistle
drowsy thistle
#

the Python SDK's documentation is now complete! which means that the entire Python SDK is now finally complete and ready for review! DoggThumbsUp

#

sorry for the wait guys! πŸ₯Ή

drowsy thistle
#

πŸ₯³

#

I am gonna work on the rest of the SDKs in order based on their github's star count, sooo next stop is the Java SDK! DoggThumbsUp

drowsy thistle
#

everything in the Java SDK is pretty much complete! now it's time to add finishing touches πŸ˜„

cunning locust
#

lua coming soonβ„’

#

my inside sources say its going to be the best SDK ever

drowsy thistle
#

hahahahaha! ❀️

#

I am currently adding JDA and Discord4J wrapper support! onionpray

drowsy thistle
#

alright! both are done!

heady halo
#

fast

tame bison
cunning locust
#

pretty sure you don’t even need a bot token for that :)

drowsy thistle
#

alright tests are halfway done! DoggSunglasses

opal estuary
#

$mu

drowsy thistle
#

after 5 hours I've finally done webhooks testing for Dropwizard 😭 two to go!

drowsy thistle
#

Eclipse Jetty has now been proven to work! only one left! πŸ₯³

#

I'm going to continue tomorrow, please be patient!

drowsy thistle
#

alright, everything is pretty much done! all it needs now is the readme. the SDK is not entirely complete (i'll open github issues for them), but it's quite stable now.

drowsy thistle
#

README is now completee!!!

#

finally!

#

hey Veld, uhmmm I am about to open 9 more pull requests πŸ™ˆ

dense barn
#

Awesome looking forward to it

drowsy thistle
drowsy thistle
# drowsy thistle hey Veld, uhmmm I am about to open 9 more pull requests πŸ™ˆ

alright good news! 5 (out of a previously 9) branches could be merged with their respective principal branch because their changes were not as huge as I thought DoggThumbsUp so now only 4 pull requests (including the one above) are open in the Java SDK's repository!

#

next stop: the .NET SDK DoggThumbsUp this one's gonna be super your alley Veld! hahahahaha! DoggLaugh

drowsy thistle
#

keep in mind that the progress on the remaining SDKs is going to be a bit slower as I have uni and other things to take care of too, sorry everyone!

#

if anyone wants to offer help, please be my guest! ❀️

drowsy thistle
#

alright! the .NET SDK has been successfully tested! finally!

drowsy thistle
#

I am now finally halfway through the SDKs! onionpray

#

finally! i can go to sleep πŸ™ˆ hahahaha!

fathom cove
drowsy thistle
#

I am taking a break from the SDKs for a while, I really need to catch up with uni. Sorry everyone! πŸ˜„

drowsy thistle
#

now working on the Go SDK πŸ˜„ making quick progress! DoggThumbsUp

drowsy thistle
#

alright, webhooks are done!

drowsy thistle
#

client tests are done!

drowsy thistle
#

webhook tests are done!

west storm
drowsy thistle
#

hai!

drowsy thistle
#

next stop will be the C++ SDK! πŸ˜„ it's not the most popular one but it's the one i'm the most familiar with out of the remaining 4 SDKs.

drowsy thistle
royal breach
#

i've added a comment for it Ok

drowsy thistle
#

thank you so much for your feedback! will work on them! DoggThumbsUp

#

will also reflect the changes in the other sdks if possible πŸ˜„

royal breach
#

yea generally i would only fail (send a non 2XX status code) if authentication or authorization fails, all other errors are always on your side and should not make top.gg retry imo

#

adding a log is fair for parsing failing tho

drowsy thistle
drowsy thistle
#

reflected the changes on the Python, Node.js, and Rust SDK onionpray will work on updating the Java and .NET SDK later when I wake up! DoggThumbsUp

#

I really need more sleep lol

chilly yacht
drowsy thistle
#

will do!

chilly yacht
#

Also another comment on the other regarding linting

#

Now that work is being done on it, worth getting it to standards ^^

#

There were some other triggers, but mostly due to one PR fixing the triggers from the other PR, so not much relevant

dense barn
#

Yeah you're the goat man!

drowsy thistle
#

huuuaaaaaaa that's quite the word πŸ™ˆ thank you so much everyone!

#

I am not perfect and I make so many mistakes!

#

❀️

#

but I appreciate all of your support! It truly means the world to me! I'll always try to offer the best to all of you! 🫢

royal breach
chilly yacht
dense barn
#

Reviewed the C# ones @drowsy thistle

drowsy thistle
#

@dense barn oh by the way, the long description for projects have length constraints, right?

pastel girder
drowsy thistle
#

alright! thanks luke!

deft merlin
#

I think we did have to implement a maximum but I dont remember what it is

#

@dense barn do u remember

dense barn
#

Its 65k

deft merlin
#

Integer limit

dense barn
#

Yeah 16bit limit

#

Afaik at least

#

There’s a few bots with more

#

But i don’t think you can go beyond anymore

drowsy thistle
#

i see i see

drowsy thistle
drowsy thistle
#

@dense barn i am not familiar with nuget but the nuget package has always been called DiscordBotsList.Api, no? wouldn't this require publishing a new nuget package?

the same also applies to the other SDKs, many of them still bear DBL in their package name. wouldn't this possibly require publishing an entirely new package?

dense barn
#

Yeah it would need to be new package

drowsy thistle
#

oh okay! noted!

dense barn
#

We call them the sdks right?

#

If so, i would go with Topgg.Sdk

drowsy thistle
#

noted noted!

#

updated the Go, Node, Rust, Python, .NET, and Java SDK for it onionpray removed all references to DBL and updated the platform type enum!

#

oh btw @chilly yacht! i'm sorry but migrating from travis might be a bit outside of the pull request's scope πŸ˜… do you mind if i just get rid of travis for now? you can open a pull request for it later!

drowsy thistle
chilly yacht
#

I can add the workflow if needed, I use them everywhere already

drowsy thistle
#

sure!!

drowsy thistle
# drowsy thistle updated the Go, Node, Rust, Python, .NET, and Java SDK for it <:onionpray:954383...

alright, all six SDKs are ready for review again! with the exceptions of the following low priority issues:

  • The warp wrapper for the Rust SDK does not include the payload JSON deserialization warning because to my knowledge it's not possible via warp's Filter#map() method.
  • The actix-web wrapper for the Rust SDK does not include the 2 MiB request body limit because to my knowledge it's not possible to do this with a standalone FromRequest impl.
  • The Eclipse Jetty wrapper for the Java SDK does not include the 2 MiB request body limit because to my knowledge the library gives you the String body immediately from the @RequestBody attribute, thus it's not possible to do this with a standalone RestController.

while imo these issues are not worth tackling atm, they deserve their respective github issue in the future DoggThumbsUp

#

in case anybody wants to help contribute! ❀️

drowsy thistle
#

now writing a proper Javadoc documentation for the Java SDK! onionpray

#

so far the main API has been documented. webhooks will take more time to document. please be patient.

#

okay I am starting to feel burned out. I am gonna take a break topggSob

steady kite
#

take your time null, don't burn yourself out heart we appreicate your support DoggThumbsUp

dense barn
#

Please do not rush yourself AG_Pray

cunning locust
#

you are insane at this null

#

i'm still working on the lua sdk trying to get it to work as intended lol

drowsy thistle
#

alright! i am free now! now i can work on the sdks again! DoggThumbsUp

#

I am currently working on migrating the Node SDK from using undici to Node.js' native fetch() and from Jest to Node test. Please don't review it for now.

#

For the time being, can you guys review the Python, C#, Rust, and .NET SDK pull requests please?

#

you guys don't have to wait until I completed working on all SDKs before reviewing them! πŸ˜…

drowsy thistle
#

migration successful! the current coverage for the Node SDK is 100%! πŸ˜„

drowsy thistle
#

alright, the Node SDK is done and is ready for review! (for like the billionth time i know) DoggSunglasses

new changes:

  • Added timeout handling so that getBody() would not freeze forever if content-length does not match the actual body
  • Squashed lots of webhook bugs
  • Added mocked webhook unit tests
  • Zero dependency vulnerabilities!
pastel girder
#

ping the link and I'll review it

drowsy thistle
#

i recommend you check out #95 first

#

because i feel like there could be conflicts between #95 and #92 πŸ™ˆ

#

sorry about that

pastel girder
#

if it's approved why not merge and fix the conflicts?

drowsy thistle
#

i can't.

#

but technically i could close #95, merge #95's changes into #92, then resolve its conflicts

#

even though that's kinda weird DoggLaugh

pastel girder
#

that's probably he better idea, just close 95 once you've merged the changes into 1 PR, makes more sense that way I believe, you can close 95 with a comment like "Approved changes merged into #95"

drowsy thistle
#

will do!

#

@pastel girder done! you can now check and review #92!

#

addressed your comment πŸ˜„ it's now resolved!

steady kite
#

does this include breaking changess?

drowsy thistle
#

yes

#

everything

#

the Node SDK is probably the only one to have everything inside one pull request DoggLaugh

steady kite
#

ya little scarry

#

have the docs been updated to reflect these changes before it goes live

drowsy thistle
steady kite
#

probably one of the biggest SDK

drowsy thistle
#

in terms of what?

steady kite
#

usage

drowsy thistle
#

mhm πŸ˜„

steady kite
#

the read me was at least updated so thats good

drowsy thistle
#

including every code example

#

the readme will have the exact same format for the other sdks so i could enforce consistency

steady kite
#

I love consistency

drowsy thistle
#

don't we all

pastel girder
#

Looking at it, it looks good, as long as we have full test coverage over everything im happy with it going in

drowsy thistle
#

you bet! πŸ˜„

#

(the 1,000ms here comes from the timeout handling test.)

drowsy thistle
#

also added and tested webhook timeout handling to the Python SDK onionpray

#

you guys could review that one as well DoggThumbsUp

#

I'm not sure the same could applied to the Java SDK's internal eclipse jetty, dropwizard, and spring boot wrappers as resources online said that "it's best to be configured at the server level." If anybody is experienced in these frameworks and you think otherwise, please don't hesitate to help me or create a pull request for it! πŸ˜„

drowsy thistle
#

also added and tested webhook timeout handling to the .NET SDK DoggThumbsUp

wispy carbon
# drowsy thistle I'm not sure the same could applied to the Java SDK's internal eclipse jetty, dr...

Looks fun to figure out O: I did some minor research and found out about two things that might work. DeferredResult instead of returning a synchronous response entity, the webhook controller method would return something like DeferredResult<ResponseEntity<?>> When a Spring controller returns this type the DispatcherServlet immediately releases the primary HTTP worker thread back to the embedded containers thread pool. Which would transition the request into an asynchronous state. And Servlet has an Asynchronous Processing API, plus CompletableFuture chaining from Java 8.

#

Idk if I got time I'll look at this one over the weekend

drowsy thistle
#

❀️

#

will look into it!

wispy carbon
#

Yayie happy to help in any fashion

#

I love learning new things

#

Networking has been one of my top topics of research

drowsy thistle
#

awesomee!! ❀️

wispy carbon
#

You can pass a specific timeout value to the deferredresult iirc.

Idk about dropwizard but I know it uses Jersey for web endpoints. You can pass a @Suspended AsyncResponse parameter to the webhook method. It also has a built in setTimeout method as well. If you're looking for ways to exactly timeout requests at 1000ms anyway

drowsy thistle
#

noted noted!

#

thank you so much capi! onionpray

wispy carbon
drowsy thistle
drowsy thistle
#

added request timeout handling to the Rust SDK's actix-web, rocket, and axum wrappers! DoggThumbsUp I'm not sure how it's done for the warp wrapper 😭 if anyone is knowledgable on this, please let me know!

drowsy thistle
#

added request timeout handling to the Go SDK! DoggThumbsUp

drowsy thistle
#

(ignore the @Override errors πŸ™ˆ)

wispy carbon
# drowsy thistle here's my code for it:

I see only one big issue

ForkJoinPool.commonPool() is really only optimized for cpu intensive tasks. Since webhook processing is almost always i/o bound using commonPool will exhaust the threads and bottleneck the server if a bunch of webhooks hit at once.

If devs can pass a custom ExecutorService into the constructor or if they don't provide one it can default to something better suited for i/o like Executors.newCachedThreadPool()

Other than that I can not see or uncover any sort of issues (from examining on my phone anyway GPz1_KEKLOL )

drowsy thistle
#

i will try! thank you so much for your feedback pal! ❀️

wispy carbon
#

You're welcome! I don't have an environment in which I can test Java SDKs unfortunately, but I started off as a Java developer forever ago so I'm pretty familiar with how it works. I would definitely test anything I suggest or advise if possible

drowsy thistle
wispy carbon
drowsy thistle
#

any help is very appreciated, no matter how big or small ❀️

wispy carbon
#

I love that. Full on working on all of them

#

Remember to take a break though!

drowsy thistle
#

thank you so much pal! i will always consider breaks!

#

🫢

wispy carbon
#

You're awesome at this stuff for real.

drowsy thistle
#

huuaaa thank you so much capii!!

#

❀️

#

honestly you too with everything you make! you are equally as amazing!

wispy carbon
#

I have my strengths and my weaknesses AG_GigglePup my coding knowledge is self taught n all that. But that's why we work as a team NijikaTough

drowsy thistle
#

me too! DoggThumbsUp i agree!

#

a person's strengths could cover another person's weaknesses and vice versa! πŸ˜„

wispy carbon
# drowsy thistle a person's strengths could cover another person's weaknesses and vice versa! πŸ˜„

If you end up looking at the pure jetty sdk too I wrote up a quick snippet of how you could adapt your logic to use an ExecutorService. jetty uses AsyncContext instead of DeferredResult to go async but u can basically just drop ur exact dispatchSync() logic right in.

import javax.servlet.AsyncContext;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;

public abstract class TopggWebhookServlet extends HttpServlet {
    
    private byte[] secret;
    private final ExecutorService executor;

    public TopggWebhookServlet(final String secret, final ExecutorService executor) {
        this.secret = secret.getBytes(java.nio.charset.StandardCharsets.UTF_8);
        this.executor = executor != null ? executor : Executors.newCachedThreadPool();
    }

    public TopggWebhookServlet(final String secret) {
        this(secret, null);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
        final AsyncContext async = req.startAsync();
        
        try {
            final String signatureHeader = req.getHeader("x-topgg-signature");
            final String traceHeader = req.getHeader("x-topgg-trace");
            final String body = req.getReader().lines().collect(Collectors.joining(System.lineSeparator()));

            executor.submit(() -> {
                try {
                    HttpServletResponse asyncResp = (HttpServletResponse) async.getResponse();
                    asyncResp.setStatus(HttpServletResponse.SC_OK); 
                } catch (Exception e) {
                    ((HttpServletResponse) async.getResponse()).setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                } finally {
                    async.complete();
                }
            });
            
        } catch (Exception e) {
            resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            async.complete();
        }
    }
}
drowsy thistle
#

❀️

#

this means a lot to me, it really does pal!

wispy carbon
#

I'm glad I could help a little

#

I hopped to my PC for a second to type that our

#

Out*

drowsy thistle
#

you helped a little? i would say you helped a LOT 😭 HOLY ❀️

wispy carbon
#

Yeah I noticed the Java SDKs use synchronous blocking operations so switching to async is definitely a big win

drowsy thistle
#

you truly are the best at this capi!

#

πŸ₯Ή

wispy carbon
#

I'm just a random passerby really

drowsy thistle
#

please don't say that. i appreciate your humbleness but you really are amazing ❀️

#

i am still learning Java right now πŸ˜„ i am not sure how proficient i am at it but i am certainly trying my best!

wispy carbon
#

If you did the dropwizard one already, a bit of a tip dropwizard uses jetty (and jersey for rest and routing) as it's embedded web server so you basically covered both with that one

#

But having a standalone jetty one for people running a lightweight sort of bot is always a nice option too

drowsy thistle
#

will take note of it! πŸ˜„

drowsy thistle
drowsy thistle
#

i have finally documented every public class and method in the Java SDK!!! topggParty

#

god damn this SDK is huge! hahahaha πŸ™ˆ

wispy carbon
# drowsy thistle <@1089759318624190515> i am finally done with adding timeout handlers to the dro...

Just looked over all of these at lunch and dude, you absolutely nailed it. This is great. Consistency against all three sdks. Defaulting to a 100-thread fixed pool and a 5 second timeout across the board makes the whole sdk feel super cohesive no matter what framework someone might use. Using AsyncListeners and keeping the 2mb payload limit everywhere is a great security practice too.

Seriously amazing work modernizing all this. The java bot community is gonna love it.

drowsy thistle
#

❀️

drowsy thistle
#

Javadoc is now ready! DoggThumbsUp

#

i was unable to get external dependency hyperlinks and overview to work properly πŸ™ˆ but the entire SDK has now been documented! ❀️

drowsy thistle
#

i'll continue working on the C++ SDK in a few hours! DoggThumbsUp

drowsy thistle
dense bronze
#

@drowsy thistle okay correct me if i am wrong isnt a bug

  if (!signature.equals(HexFormat.of().formatHex(digest))) {
        return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
      }```
#

it's too harsh

drowsy thistle
#

what do you mean?

dense bronze
#

we mostly use java.security.MessageDigest.isEqual

#

also

assert signature != null && timestamp != null;```
#

it's most prob NullPointerException

#

default, assertions are disabled at runtime, and the assert statements are ignored by the JVM

chilly yacht
#

I mainly didn't point it out because of the amount of time you've put in them and you're mainly maintaining them all alone, so adding other things on top of the implementations themselves and other is kinda wanting you to burn out

dense bronze
chilly yacht
#

Realistically a timing attack on a signature is not the same as a timing attack on a password as they're not checked the same way as passwords

#

You'd need to compute the HMAC(secret, timestamp + "." + rawBody) all the time, good luck.

#

If you have a password being aaaaa, ab as input will return quicker, by milli/microseconds, than aab as input on non time constant checks

#

For simple string checking it's sort of easy/easier to take advantage of that

#

For signatures, have fun taking advantage of that... especially when a timestamp is in the content....

#

If you want, sure you can change them all as a "nice to have, never gonna happen", as said I didn't point it out as it would be intentionally burning you out

dense bronze
#
  public TopggAPI(final OkHttpClient httpClient) {
    gson =
        new GsonBuilder()
            .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeConverter())
            .registerTypeAdapter(PaginatedVotes.class, new PaginatedVotesConverter(this))
            .create();

    this.httpClient = httpClient;
  }

#

i mean you are creating OkHttpClient every time it's called

#

use it like singleton

#

your work is amazing not gonna lie mate

#

but some bugs exists

drowsy thistle
#

it's alright pal, any feedback, harsh or not, is appreciated!

#

❀️

#

it just means that you care. that's all that matters

drowsy thistle
drowsy thistle
dense bronze
drowsy thistle
#

oh right! my bad! DoggLaugh my mind is soo clumsy!

dense bronze
#

Take your time mate

#

It’s hard to maintain so many langs

dense bronze
dense bronze
#

So they can use it in there project

drowsy thistle
#

what do you mean?

dense bronze
#

Ahhh

#

Mb

#

Mb

#

.map(part -> part.split("=", 2))

This can be error if server receives invalid signature

drowsy thistle
#

thankies!

dense bronze
#

.map(part -> {
String[] split = part.split("=", 2);
if (split.length < 2) return null;
return split;
})
.filter(Objects::nonNull)

drowsy thistle
#

uhmm temper? can you just open a review for it in my pull request?

dense bronze
#

😭😭

#

I’ll cry doing that

drowsy thistle
#

what why?

dense bronze
#

I turned off my pc

drowsy thistle
#

ohhh hahahaha okay!

#

that's fine!

dense bronze
#

Tom for sure

dense bronze
#

Surely

#

I’ll try fixing everything I could

drowsy thistle
#

alright!!

drowsy thistle
#

even down to the most minute things like wordings in the documentation

#

if i were careless that would've been disrespectful πŸ˜„

#

anyway, I am about to go to bed. will address these issues in a few hours

wispy carbon
#

I wish I knew more about encryption and security things

drowsy thistle
wispy carbon
drowsy thistle
#

@dense bronze @wispy carbon here's what i wrote! 🫢 what do you guys think? πŸ˜„

dense bronze
drowsy thistle
#

good morning pal!

wispy carbon
#

I made a silly lil sveltekit npm package for handling topgg webhooks. Not sure if I can share it ASwow but I'd be happy to if it's okay

drowsy thistle
#

i just looked at it, it looks amazing! ❀️

drowsy thistle
#

there's nothing i love more than C++ generic errors πŸ™ˆ huaaa

drowsy thistle
#

love you brain ❀️DoggLaugh hahahaha

drowsy thistle
drowsy thistle
#

added and tested replay attack mitigation to the Node SDK's webhook integration! DoggThumbsUp

drowsy thistle
#

done the same thing to the Python, .NET, and Go SDK πŸ˜„

drowsy thistle
dense bronze
#

sorry mate

drowsy thistle
#

it's alright pal!

dense bronze
#

Good work null

drowsy thistle
#

yaaaayyy!!

#

❀️

#

thank you so much!

#

i swear every time i open the rust sdk directory my storage space shrinks rapidly πŸ™ˆ huaaa

dense bronze
drowsy thistle
#

originally wanted to add replay attack mitigation, ended up rewriting how the rust sdk handles webhooks DoggLaugh

#

how on earth did i even write this

#

😭

drowsy thistle
#

alright, done! now all it needs is an updated documentation! πŸ˜„

drowsy thistle
#

hey everyone! i will be taking a break in the next few days so expect development on the remaining sdks to slow down. I am so sorry for this... onionpray

#

as much as I would love to get them out as soon as possible... my mind and motivation still have a finite capacity

#

in the meantime, please feel free to review the pull requests i've made for the node, python, c#, java, rust, and go sdks

#

please dont wait for me to finish all of them

#

those sdks are pretty popular and i'm sure developers would love to get access to them as soon as possible

#

as always, see pins for the pull request links!

pastel girder
#

Take as much time as you need dude, we really appreciate your hard work on the SDKs πŸ™

Hope you feel better after a nice long break honestly

deft merlin
#

@candid beacon we dont allow that here thank you

eager stratus
#

hay gais

gloomy merlin
#

@faint raft

faint raft
#

yes?

gloomy merlin
faint raft
gloomy merlin
faint raft
trail sapphire
wise maple
#

ban

deft merlin
#

Hello @drowsy thistle uwusnuggie is it yourself or someone else that mainly maintains the node sdk?

#

#support message this is why i ask, just wanted to flag it to someone to take a look at!

dense barn
#

🫑 will review the open PRs now

dense barn
#

I read through and approved the ones I could AG_Pray

drowsy thistle
drowsy thistle
drowsy thistle
#

i appreciate it though ❀️

dense barn
#

make a new PR for that please KEK

drowsy thistle
#

hahahaha fairs!

#

i plan to work on them in the coming weeks. please be patient everyone as my schedule is packed as hell ayaka_pray

tiny shard
#

maybe i missed it somewhere and this was already discussed, but this seems to not cover the metrics/stats usecase completely? 90% of the usecase for the sdk is to go missing?

tiny shard
#

oh right above lol ok

#

makes sense, i just wouldn’t release it

#

merged

#

also, can we think about how we can do webhooks differently? maybe going back to the old listener system?

#

the callback makes sense when there’s just one type but it’s kind of obnoxious once you get multiple types

dense barn
#

@tiny shard @drowsy thistle y'all think it's possible to implement the last few endpoints soon so we can do a new release? DoggSmile

drowsy thistle
dense barn
#

all good

#

thanks!

twilit laurel
drowsy thistle
#

thank you so much for your help pal! ❀️

twilit laurel
#

Np! onionpray

dense barn
#

whenever null checked I can merge it

drowsy thistle
drowsy thistle
drowsy thistle
drowsy thistle
#

after an entire day i've also finished updating the Python SDK πŸ₯Ή -- expect fresh pull requests from it soon!

drowsy thistle
#

will work on more SDKs when i have more time next week, sooo this is about the most i could do this week, i'm so sorry... ayaka_pray

dense barn
#

Thanks!

#

I've reviewed and merged them

#

the docs one is a bit confusing to me since i dont really know the env

drowsy thistle
#

the .rst files are self-explanatory, they are just a skeleton to automatically generate the documentation from the project's docstrings, analoguous to a markdown file with an autoclass specifier

#

the documentation's configuration is stored in conf.py

drowsy thistle
#

was working on updating the Rust SDK today but unfortunately I am crazy busy, quickly ran out of motivation, and burned out. I might continue working on it when I am available ❀️

#

I am so sorry everyone, I have a lot of things to balance πŸ₯Ή

#

my mind has a limit and couldn't take on all things at once

deft merlin
#

@drowsy thistle no worries, take care of yourself ❀️

hollow jacinth
#

first

dusky shale
#

a

misty shoal
#

third message poggers UwU

old hill
#

rip the other one

ashen dragon
#

no more old channel

lime obsidian
#

sixth

dusky shale
#

im the second one

#

hehehe

#

im the first whitename to type in this channel, i should be proud

hollow jacinth
misty shoal
hollow jacinth
#

hell yeah

#

open source devs are cool

wintry marten
#

If you have unacknowledged code contributions to a public repo let me know so I can give you a transparent contributor role

hollow jacinth
#

😎

wintry marten
#

as long as it's under top-gg

hollow jacinth
#

oh ok

old hill
#

oh lol

hollow jacinth
#

lol

wintry marten
#

I'll pin it later, just trying to gauge involvement

misty shoal
#

noice

hollow jacinth
#

nah don't have any contributions

#

lol

wintry marten
#

a few people already have it. People seem to be interested in contributing so I wanna make it a nicer process

hollow jacinth
#

yet, at least

dusky shale
hollow jacinth
#

idk how to contribute tbh

#

what even is there to add

#

lol

wintry marten
#

I'll open a few issues. We'll be making more things open source this year

hollow jacinth
#

cool

wintry marten
#

I love open source I wish our entire codebase could be OSS lol

hollow jacinth
#

lol

dusky shale
#

I ❀️ open source

ashen dragon
hollow jacinth
#

open source is poggers doe

#

open source best

wintry marten
#

I'd like to open source luca as well

hollow jacinth
#

cool

wintry marten
#

but I don't want to give bot reviewers even more shitty clones to deal with

hollow jacinth
#

sad

#

although that would be cool

#

ngl

marble parcel
hollow jacinth
#

lol

hollow jacinth
wintry marten
#

btw @high depot were you able to get it working after the downgrade?

marble parcel
#

rather than publishing the real one for people to make clones of

marble parcel
high depot
#

Lemme make some tea rq

wintry marten
#

hell yeah dude

#

excited

dense barn
#

Keep this channel generally focused towards Top.gg OSS btw πŸ₯Ί

hollow jacinth
#

sure

dense barn
#

No memes bonk

feral hemlock
#

I love open sauce

wintry marten
hollow jacinth
hollow jacinth
dense barn
high depot
marble parcel
wintry marten
dense barn
dense barn
#

yes it's not ready yet

marble parcel
#

yeah I am on a phone

#

me no see topic

hollow jacinth
#

cuz that would be dev related

misty shoal
marble parcel
misty shoal
#

kek

hollow jacinth
#

so anyways

hollow jacinth
#

@marble parcel im the first person to send a message lol

dusky shale
dense barn
#

I remember specifically saying pls no memes in this channel 5 seconds ago

hollow jacinth
#

?

candid vessel
#

Lol

hollow jacinth
#

luca is open source

dense barn
#

no

hollow jacinth
#

it totally is

hollow jacinth
#

its a work of art

ashen dragon
dense barn
#

@hollow jacinth Bonk

misty shoal
#

thanks for curing my depression

bright silo
#

just wondering, what can "we". The dev community do with the open source?

#

to contribute

#

if ya understand what I mean

dense barn
#

We're doing our best to provide some sort of OSS culture from our company side

wintry marten
#

we'll also have more stuff to contribute to later

dense barn
#

Considering we have a dev-heavy community, It would be greatly appreciated to start projects together to better the entire ecosystem

#

And in return we open source our internal projects too

dusky shale
icy kayak
#

interesting

wintry marten
#

I'll be open sourcing the internationalization tooling I wrote for top.gg once I move it out to its own repo pepoJammin

#

could be useful seeing as there's like close to no tooling for translations

ashen dragon
#

finally i can start my bottum.com for cool sa as bots by git cloning top.gg website

dusky shale
#

Kapp Open source Luca

misty shoal
#

yardΔ±m my open source softwareℒ️

wintry marten
#

considering how excited people were about #site-translators I think we could do something similar with code if people feel their contributions are going to be useful which I think is what gets people excited about doing translations

dusky shale
#

yea

fresh crest
#

yardim where is the real top.gg sauce

#

open source the caching when

dusky shale
wary stratus
#

though tbh, there should be active maintainers of libraries though, for example the java library still has open prs/issues since 2019 and nik, presumably the maintainer, doesn't do anything anymore

wintry marten
#

yeah we should make sure those repos are alive at some point

wintry marten
#

especially once apiv1 is alive

wary stratus
#

yup

graceful fossil
#

For a hot second I thought we could finally help the team fix FE and BE issues so people wouldn't have a broken top.gg site for months 😦

ashen dragon
#

i didnt contributed to a big oss project before this will be my first please be kind hashflushed

graceful fossil
#

i am disappoint

wintry marten
#

I would love to open source everything sadly that decision is not up to me lol

graceful fossil
#

devs always want to open source, management never wants to.

dusky shale
#

atVeld plz OSS everything kthxbye

gaunt sand
#

OSS Luca

#

is it shitcode

graceful fossil
#

OSS topgg backend and nextjs frontend so we can fix shit πŸ˜›

#

I don't care about bots

void tulip
#

:0

dusky shale
#

I would love to contribute to Luca

ashen dragon
#

i dont think oss backend is safe

graceful fossil
#

Of course it's safe. In the end it's safer because you can get community-provided security fixes.

dusky shale
#

Imagine the amount of PRs if top.gg goes full OSS

dense barn
#

We're not open sourcing the product facepalm

ashen dragon
kindred maple
#

One message removed from a suspended account.

wary stratus
#

read pins

dusky shale
kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary stratus
#

ΓΆ

wintry marten
#

haha get baited

#

noob

kindred maple
#

One message removed from a suspended account.

wary stratus
#

topic i mean

kindred maple
#

One message removed from a suspended account.

wary stratus
#

dum me

ashen dragon
dusky shale
#

Aurel messes up for the 4th time

#

Demote plz

wary stratus
#

shit yeah, when do I get demoted am bad mod

dusky shale
#

mmLol this became general-3

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.

wintry marten
#

all of it

dusky shale
hollow jacinth
#

anything related to top.gg open source things

dense barn
#

Open-Source Software

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hollow jacinth
#

library's, top.gg docs, all of it basically

surreal socket
#

Huh

wintry marten
#

if you wanna discuss prs, issues, and new features etc

dense barn
#

We just wanna make Open Source @ Top.gg more accessible and fun as a community

dusky shale
#

This is basically the github repo discussions section but in Discord

dense barn
#

yes

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wintry marten
#

had some discussions about the docs and the new repo we were working on and nowhere to talk about them

hollow jacinth
#

what about development channel

dense barn
#

development is any project

wintry marten
#

too much unrelated conversation

#

gets lost

hollow jacinth
#

ic

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

dense barn
#

no

kindred maple
#

One message removed from a suspended account.

dense barn
#

no

kindred maple
#

One message removed from a suspended account.

dusky shale
#

That repo is art

hollow jacinth
#

Yes

dusky shale
#

But could be better if the actual Luca's source is OSS

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

surreal socket
#

So lib dev was merged into this channel along with other OSS I assume

kindred maple
#

One message removed from a suspended account.

hollow jacinth
#

Sadly luca will not truly be open source cuz they wanna prevent luca clones

dense barn
#

Oui

kindred maple
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hollow jacinth
#

lol

kindred maple
#

One message removed from a suspended account.

dense barn
#

It's something we wanna test out

kindred maple
#

One message removed from a suspended account.

hollow jacinth
#

so less work for bot reviewers

dusky shale
#

Oh no more lib dev channel

#

Sadge

kindred maple
#

One message removed from a suspended account.

surreal socket
#

Sounds like an interesting ride

kindred maple
#

One message removed from a suspended account.

dense barn
#

but guys,

dusky shale
#

Wait, how do u get that role even wut

dense barn
#

can we avoid random convo here? move to #general if you want to discuss other stuff

wintry marten
#

oh sorry I forgot about you @dusky shale

dusky shale
#

Xet moment, aight moving to general for random convos

hollow jacinth
#

Do u get the role if you did a meaningful pull request to any top.gg repo?

#

lol

wintry marten
#

yeah preferably anything that wouldn't piss off maintainers in hacktoberfest

hollow jacinth
#

lmao ok

wintry marten
#

GreenTick fixing documentation
GreenTick fixing typos
GreenTick fixing bugs
GreenTick adding new features
RedTick adding a comma to README.md
RedTick bumping a year in LICENSE

#

you can use your common sense to fill in the gaps for everything else

worthy cypress
#

Oh hi

#

New channel?

surreal socket
jade cobalt
#

owo whats this

worthy cypress
tiny shard
worthy cypress
#

i will happily contribute even more than i already am if that's the case

#

there are numerous suggestions i would love to pitch in as PRs

dense barn
#

because xetera is stinky

#

Submission guidelines

valid fixing documentation
valid fixing typos
valid fixing bugs
valid adding new features
invalid adding a comma to README.md
invalid bumping a year in LICENSE

wintry marten
#

@high depot feel free to push your changes when you're done btw

void tulip
#

bumping a year?!?!1

#

:0

wary stratus
#

first pr's gonna be like:

#

,

plain storm
#

why bump the year though

wintry marten
#

oh? I didn't see it

high depot
#

pushing them rn

wintry marten
#

ah ok

high depot
#

just making sure that i deleted all links and tokens

wintry marten
#

haha

dusky shale
#

fin

high depot
#

final for today im bored

worthy cypress
#

let stringChangeAmount; if (eventsStructured.hasOwnProperty('string.updated')) {stringChangeAmount = JSON.stringify(eventsStructured["string.updated"].length)} else {stringChangeAmount = 0}

tiny shard
high depot
#

yeah

jade cobalt
#

probably isnt necessary but might be a good idea

tiny shard
#

also a bunch of weird formatting things going on there but

wintry marten
#

I'll polish the rest of it up, thanks Prayge

dusky shale
#
let stringAddAmount; if (eventsStructured.hasOwnProperty('string.added')) {stringAddAmount = JSON.stringify(eventsStructured["string.added"].length)} else {stringAddAmount = 0}``` :bruh-4:
jade cobalt
#

would make more sense to use ternary operators but it works Β―_(ツ)_/Β―

dense barn
#

ternary is not really readable for people other than you tho

jade cobalt
#

not if you use newlines?

high depot
dense barn
#

but for this i would just do

jade cobalt
#
let stringAddAmount = eventsStructured.hasOwnProperty('string.added')
  ? JSON.stringify(eventsStructured["string.added"].length)
  : 0```
worthy cypress
#

or or

#

it doesn't matter

dusky shale
#
const stringAddAmount = 'string.added' in eventsStructured ? JSON.stringify(eventsStructured['string.added'].length) : 0;```
misty shoal
#

a ? b : c ❌
(a) ? (b) : (c) makes it more readable if in one line

worthy cypress
#

in terms of code maintainability, it's fine, this is just formatting.