#topgg-open-source
1 messages · Page 5 of 1
yea
Xetera will fix that ig
how so Veld
eyes
Performance doesn't really matter
always optimize for the developer before optimizing for the program

It's not like a webhook needs to be ran 100/s
@tiny shard
imagine overengineering a webhook
yeah, so i don't see the prevalent need of ternary operations
btw
I would say just for readability and shortening lines lengths
the character thing was a joke, scrolling left to right isn't too difficult imo
i mean it cant hurt to add some simple ratelimit handling to make sure you dont miss something entirely
well there's no need in them since that thing is made for crowdin webhooks
I don't think crowdin will spam it out
if 6 people submit a string at the same time you'll lose one
no?
yes
const StringsAdded = "string.added";
...
let stringsAdded = 0;
if(eventsStructured[StringsAdded]) {
stringsAdded = eventsStructured[StringsAdded].length;
}
discord ratelimits
This is what I would do

or probably use Number
because JS handles str <> num
then again
fiiine I'll add them tmrw if Xetera will not do it before I do
I have too little context on the actual reason why we JSON.stringify it
yeah you can just put numbers in string templates lol
Doesn't that property already return a number
nope
it's not like we can re-use it if need be
wait a minute did you just stringify a number?
lol no
brup
Yeah I slept like 3 hours today
thats deep
@wintry marten
mind me fixing it?
or you already on it?
berry is doing a pr so....
Berry speedrunning
@tiny shard
you're late

sob

oh I didn't know you were already working on it lol
eez what it eez
lmao they both closed their own prs
since xetera pushed refactor
yea ik
who is going to be the "manager" of this channel? Xet or Veld? (who is going to review most of the prs)
3 diffrent fixes 
I'll take it
some typescript issues also needs fixing, would be a good idea to set up github workflows for building the project
Xet it seems liek something is broken
yeah
might want to just append lines to a base content string so you don't deal with 0 lines added.
Can't remember, but do webhooks support context being added too? Or possibly issues being created?
oh fuck wrong channel
or wait
is this for the crowdin webhook too 
ye we did it with cloudflare workers
did we not tell you im sorry
@tiny shard moment
Gave up after 5 minutes anyways, don't like js 
same
spent 3 hours on it

on that pr?
join me with the php lib hope
well actually 30 mins
WEFDLKJK
probably 90% spent reading docs
yep
docs for what?
learning new technologies gang
good job 
workers
@wintry marten string.updated isnt being counted properly idk why
Though referring to these webhooks, probably useful to include when context is being added and/or when a new issue gets created/resolved
try my pr
if crowdin supports that, can't remember
Its ok with delete and add
time to make a pr to add an extra space between a = in a function call kwarg
public JS and TS top.gg repos should all have eslint and prettier for standardization and readability tbh

smol
disgustang
alright I fixed the build errors
double quotes, tabs, and semis
funny meme caused by esnext
yeah we have topgg-eslint but I haven't pushed it to npm yet ugh
funni
urgent pr change all " to '
yes
dang that was funny lemme schedule in a laugh for you
thank you

i feel happy that you got joy
i don't
i hope you get the happy one day then
maybe the pluralization needs to be fixerino'd 👼
just add ()
(s)

unless you really care that much
we still need the project name to be fetched from query params btw
but other than that I think this one's ready to go pogger
"tabWidth": 2
"singleQuote": true
Cry about it
i can do that rq

now that we fixed the basic issues let's pr any new changes
merged
and now we're done
can you link to that repo
thats his prettier for his code 
When you're reviewing code or discussing contributions please be kind. Piling up on someone because of their code or belittling them is not acceptable. We want to create an environment where everyone feels comfortable contributing without the fear of feeling of being made fun of. If you have constructive comments to make it's up to you to make sure that does not come off as hostile, we're all learning here.
Why not move the github updates to this channel for the sdks?
my english is not very good im sorry if we had a misunderstanding situation i apologize.

wut?
😆


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.
why is this channel made?
It feels like a subset of library developer.
luca
New Channel Cool
and lib hunter
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
lib dev*
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.
is the translator role just a thank you card


and just like that he influenced the lives of over 100,000 people
mhm
I think
One message removed from a suspended account.
sad
no copy pastas yet
ey

@high depot https://github.com/top-gg/crowdin-discord is this for workers.dev?
yes
Yes
👀
how do you write a comment in the exact same second as me on a pr that was created 4 hours ago
I'm starting to think berry is outside my window or something
the number of channels is increasing exponentially
How is it exponential
idk
everyday one new lol
I thought the role-hunters are gonna flood this channel too like #site-translators
But it's abnormally quite
Please keep this channel on topic ^^
you can mention voice channels??
You can now
Again please keep this channel on topic
Applause, you know how to mention a voice channel 
How
<#channelid> @pulsar coral
Just like a text channel
Everyone clearly just missing the point of this message

How to make a message which is sent when someone votes? Discord.js
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.
would be cool if we could give people access to this channel once they open a pr or issue but that's not really possible
Well technically
you could make it something someone could request. For example someone could go to top.gg/open-source or something and it would give them the role to see this channel. Then they don't need to really make a change if they want to know whats going on but it removes the people who don't realize what the channel is actually for
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
webhook magic
give me webhooks magical enough to find out people's discord ids from their github actions and I'll code it
they just give it in a field lol
I would just say use oauth
I'll think about some other way to make it work later
How do you get <@&844267965742186619>?
check pins
I already did
Does opening issues count? Cuz I have a few currently open
And if this contribution was really good
Sort of, yeah. The guideline really helps with what is considered a valid contribution
something like adding a comma doesn't count
Bumping versions 
has to be actual something useful
🤣 I mean...
What if the Version bumps are security patches
that fix major vulnerabilitys
lol
IDK, I don't really care either, I genuinely contributed because I wanted to
I don't see much I could contribute to honestly
although I do have an idea but idk if it would be useful at all
It's still recognition so @wintry marten could you give norizon the contributor role?
kek
if you have an idea pls open an issue first
So would these count as a "contribution"?
likely not
Well, it's just issue reports and not code contributions
since you aren't really contributing anything
I doubt that counts as contributing, yeah
@fair goblet all of the issues about a bug on the resign should get a redesign tag or something so users can search for an already-existing issue documenting the bug they found, which would reduce the duplicates
pretty sure there is
ah I see the beta label
oh i guess it wasnt applied to most of the issues
yeah only 8 or something
i was honestly thinking keeping this channel to the contributor role people so that spam can be avoided, plus a clear indication that those who get it actively wish to contribute to top.gg. i think everyone should be able to read this channel but only OSS role peeps can talk
alright, I'll do that. I don't mind counting valid bug reports as OSS contributions either
can u also merge #39 too plz 
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.
this is good enough imo
we just don't need random white names getting OT in here or shitposting
One message removed from a suspended account.
it creates an open discussion for users who might want to contribute but if you lock it now they can’t and those are the people who need the most guidance via discussion
xet's updated the channel desc already, so presuming people end up reading it they'll know how to get OSS access
One message removed from a suspended account.
One message removed from a suspended account.
oof
One message removed from a suspended account.
There are a series of Issues for the top-gg/issues repo that have yet to receive any labels about it being a bug or wontfix. Any clear info on these in particular?
#658-#661
#663-#675
#683
#686
#688-#703
#705
Some have discussion on them but badges/labels haven't been placed. https://i.imgur.com/enpa1RT.png
idk there's some people who are basically contributors but haven't ever actually contributed to any repo, like @jade cobalt @hollow jacinth @soft sorrel have all been helpful in this channel already but they're not actual contribs
oh xet hasnt actually locked it yet
im pretty sure Xetera did an overwite for me so I couldn't be doing it for the role
which is pretty smart
or just hasnt locked it yet idk
it was locked before so thats why I thought it was overwritten
ah
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
then Xetera is very smart
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.
stop talking to reaction faith
One message removed from a suspended account.
@dense barnsolved your issue with 45 symbols 
Yea I'm looking at it
I'm thinking whether this is a great solution though 🥺
The more we add to it, the more the string feels unreadable
regex is a programmer's way of sleeping in bed with the devil
or is this not regex 👀
not regex
oh no
Added my feedback
can't you make it a footer instead?
I'm making it an embed rn
Ah kk
@wintry martenBtw I just realized that we can catch project name from crowdin event itself without getting in from query params
oh?
that's cool
feel free to pr it, I'll add a github workflow later so we can autodeploy the changes
I have a pr about embeds
Will add it into this one then
Done
@wintry marten are people gonna reaction spam too?
Almost every message has a watermelon reaction now
i checked yesterday, xet disabled reaction perms for everyone after that
Pretty pog, good job
Literally re-implementing dict methods just to mimic a dictionary is such a pain
For the python lib?
Yeah
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I need to work with my object's __dict__ attribute
And not directly with the object's hash
@dusky shale let's talk here
And nah, I do this:
def __init__(self, **kwargs):
self.__dict__ = parse_dict(kwargs)
Why?
I think ```py
def init(self, *args, **kwargs):
self.dict = self
super().init(*args, **parse_dict(kwargs))
having a superinit clones the data, no?
I don't think so
I've gone over the attributes and only colours seems to be an alias I need to handle
Ah, so there are only 3 overridden methods, aren't there?
exdee, that's what you'd do if you don't inherit the dict
It's rather funny how the default JSONEncoder only supports built-in types
Default to str 

Was it the datetime messing it?
Yeah, but this is also why I wanted to subclass dict
I mean to be fair
I see, nested objects will still be fine ig
I don't have datetime object being sent to top.gg so if someone has an issue with it, they can technically Google it 
The only thing one would post is the stats which doesn't have the model, isn't it?
How's the API gonna be? Are users supposed to be able to pass the data on to the parameters directly as well as passing BotStatsData object?
Ah no, BotStatsData is for receiving bot stats. Parameters will stay
Ahh
@dusky shale guess who tests are failing
def test_data_dict_fields(data_dict: types.DataDict):
for attr in data_dict:
if "id" in attr.lower():
> assert isinstance(data_dict[attr], int) or data_dict[attr] is None
E AssertionError: assert (False or '264811613708746752' is None)
E + where False = isinstance('264811613708746752', int)
test_type.py:102: AssertionError
Oh hold on what
...???
>> from topgg.types import DataDict
... from tests.test_type import d
>>> dd = DataDict(**d)
>>> dd
{'def_avatar': '6debd47ed13483642cf09e832ed0bc1b', 'invite': None, 'website': 'https://top.gg', 'support': 'KYZsaFb', 'github': 'https://github.com/top-gg/Luca', 'longdesc': 'Luca only works in the **Discord Bot List** server. \nPrepend commands with the prefix `-` or `@Luca#1375`. \n**Please refrain from using these commands in non testing channels.**\n- `botinfo @bot` Shows bot info, title redirects to site listing.\n- `bots @user`* Shows all bots of that user, includes bots in the queue.\n- `owner / -owners @bot`* Shows all owners of that bot.\n- `prefix @bot`* Shows the prefix of that bot.\n* Mobile friendly version exists. Just add `noembed` to the end of the command.\n', 'shortdesc': 'Luca is a bot for managing and informing members of the server', 'prefix': '- or @Luca#1375', 'lib': None, 'clientid': 264811613708746752, 'avatar': '7edcc4c6fbb0b23762455ca139f0e1c9', 'id': 264811613708746752, 'discriminator': '1375', 'username': 'Luca', 'date': datetime.datetime(2017, 4, 26, 18, 8, 17, 125000), 'server_count': 2, 'guilds': [417723229721853963, 264445053596991498], 'shards': [], 'monthly_points': 19, 'points': 397, 'certified_bot': False, 'owners': [129908908096487424], 'tags': ['Moderation', 'Role Management', 'Logging'], 'donatebotguildid': None}
>>> dd.id
264811613708746752
>>> type(dd.id)
<class 'int'>
Literally ran this in Python Console
So, the attribute was int but not the item?
lmao
My test is failing because my ID attr is str for... whatever reason
What attribute was that?
oh oops
donatbotguildid 
I didn't unpack my dict
It's Optional[int]
Ya, nah. I rely on kwargs for parse_dict and I forgot to unpack it
did DataDict(d) instead of DataDict(**d)
Ah, since you only parse the kwargs but not if the dict was passed as positional argument
Maybe you also want to parse the args? But w/e it's not meant to be instantiated by users anyway
idec about args in the first place really
I'm thinking about removing *args altogether since I don't use it anyway
Ah true
Weee, tests pass

What do you guys think about having a slash prepended to the endpoints in top.gg docs?
For example:
I added a wrangler workflow to automatically update the bot with the new version
don't change crowdin-discord to yourname again otherwise it'll break the build
if we check to make sure the url isn't absolute first, sure
yeah ok
I noticed that it crashed
Decided not to ping you since I thought you already got a notif
Seems fine to me
@wintry marten #818685400667127808
pretty sure github bans for this behavior but we'll see
literally 0 value user account
Deleted them on GitHub, can’t do so in #818685400667127808 since I’m not mod heh
I’ll save a ss for veld
I have a fucking shitton of GitHub notifications on my email now 
What happened lol
Guy tried to promote using #818685400667127808
I’m banned from server he sent 
I will be pushing an update for the PHP library soon for webhooks to work, however for now they will be webserver in terms of implementation.
dude what do you want me to do

I just moved to webhook temporarily until his github account gets banned
I'll move it back
gonna go back to my project now
What happened
Someone spammed in 2 repos and got banned from this server
One message removed from a suspended account.
One message removed from a suspended account.
Xetera wanted you to ban the guy from the org
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.
I’ll dm u veld
oh ok
Bringing this up again in case it wasn't seen. @dense barn
reported this guy tho
they’ll get to it eventually they’re not gonna disappear overnight
plus i’m sure half of the issues you brought up were already known and were gonna be / have been fixed already
Poor GitHub webhook still hidden

nah not broken
Let xet have his weekend
let's just say intentionally broken
Yeah xet moved it to mod channel Bcuz guy was spamming
What weekend? /s
maybe make it only viewable to open source contribs cuz i use it to see stuff tbh
@dense barn what do you think? 👀
Be sure to follow consistent formatting, kids
@dusky shale Does :meth:WebhookManager.run is now awaitable make sense 
It's always been awaitable 🔫
What about "can optionally be awaited"? Lmao, I suck at wording tbh
@surreal socket shiv xd
Eh I'll probably add additional ratelimiter for specific routes and update that
v1.1.1 changelog: update examples

LMAO, it's on me tbh, forgot to delete it 
Nah it's okay
I kinda forgot about that example trying to figure out all the DataDict crap

@wintry marten Can you update the docs URL for the Python SDK repo to topggpy.rtfd.io?
No problem
PR up for documenting error handling
I mean it's a one-and-done kind of deal; very old related information that I don't think we have to bring up anymore
Webhook for Python SDK when
@surreal socket wdyt of making topggpy PEP 561 compliant?
You mean adding stubs?
Um, not really. Just make it so that mypy can detect the lib types
Inline annotations is fine imo, since we're working with python 3.6+
Essentially, adding an empty file named py.typed in the package dir
Sounds good to me
Oh yeah, another thing, is this intended to be 500?
Yeah, I'm not sure if the search endpoint is fixed yet but when I wrote that, it allowed max 500 results at a time
Yeah. Say, CF errors
Cuz 😅
Yep, you do
Refusing to claim to be smart was a rather good idea, it seems
Yeah that annotation should be changed
There's no endpoint that returns an invalid JSON
So, would you rather check the type at runtime or just lie to the type checker by casting it? The former might/might not add an overhead while the latter should be just as fast
The latter sounds more appropriate in this case imo
Tried to use AsyncMock from the mocker fixture as mypy screamed at me doing mock.AsyncMock for whatever reason. Turned out, it's not compatible with 3.6
Let's just # type: ignore them
🤣
Well, I think my dumb way of implementing ratelimiters into the request method should work
async with (global_ratelimiter, bot_endpoint_ratelimiter
if route.startswith("/bots") else global_ratelimiter):
because we can 
Multiple global ratelimiters? Wouldn't it cause issues as the lock is waiting for itself? Not sure 
It works
Oh well, if it works it works 

Oh God, you're right
... or not. I should probably test with a period that isn't equal to a second
If that's the case, I think https://docs.python.org/3/library/contextlib.html#contextlib.nullcontext is the way to go
Nah, it was ratelimiting at half the max_calls
ratelimiter = (global_ratelimiter, bot_endpoint_ratelimiter) if route.startswith("/bots") else global_ratelimiter
for _ in range(200):
async with ratelimiter:
print(_)
:)
exdee, yeah that's basically the same as else (global_ratelimiter, nullcontext()) with less import
Yeah, I didn't want to do it with nullcontext
@wintry marten im gettin a bit of an issue with the topgg-autoposter that im not sure how to deal with in typescript, i did a stupid thing and made the AutoPoster and all of it's properties export via an index.js because i wanted normal js users just to be able to do const AutoPoster = require('topgg-autoposter'), but now im stuck in a pickle because i want to fix this by making it export via const { AutoPoster } = require('topgg-autoposter'), but i don't want it to be a breaking change, so i tried something like this
module.exports = AutoPoster
export { DJSPoster } from './structs/DJSPoster'
export { ErisPoster } from './structs/ErisPoster'
export { DJSSharderPoster } from './structs/DJSSharderPoster'
export { RosePoster } from './structs/RosePoster'```
Which WOULD work, but typescript exports the bottom part as defineProperty to `exports` rather than `module.exports` which makes it not work :/
As you know export default makes it define the `default` property which is super duper annoying now but e, i'm just trying to remove the js part, and also trying to make it actually pass along typings because typings would not work when im exporting it via an index.js file.
Why not let it be a breaking change?
because i don't want to bump for a stupid export change
Long life to this channel
We are superior
Well it's locked for people without the role
So now we can feel like mods in #general

not sure how you would be able to fix this one without a breaking change tbh
Well since all chat channels are locked, I'm gonna ask here
Does anyone know if the @everyone role has the same ID as the guild itself for new servers?
ty
alright its breaking, so https://github.com/top-gg/docs/pull/42 if you could
Why not put notis in here and just remove comments from the webhook responses?
no point
@dense barn @royal breach
out of curiosity, did you make this a breaking change?
thanks
sounds good 
Docs change faster than my github issues 
One message removed from a suspended account.
One message removed from a suspended account.
types would never work because its it would use module.exports
and there's no real way to export as everything in typescript
it'd be export default but it sets default rather than the base of the export 
One message removed from a suspended account.
imagine
_ _
you use module.exports on a ts project?
hmm
@wintry marten Any news on the slashes PR? 😛
oh I thought I responded to that
I did some changes regarding the review
One message removed from a suspended account.
@dense barn sorry to ask, but what's the Top.gg code stack you guys employ again?
As well, are there plans in API/1.1 to support endpoints to DSL?
Thank you Berry
they plan on combining bots and servers so likely yes
pepega
@wintry marten so do you think you can do the docs strategy this week?
me when semicolons and double quotes in top-gg eslint config 
does it really matter
I don't use semicolons myself but it's like such a meaningless thing
like ill work with them i dont really care thaat much they're just stinky to look at for me atleast
the only thing I don't like about semicolons is when I want to refactor f(x); into f(a(x)); I add the opening parentheses f(a(x); and after I press shift-A to go to the end of the line to add closing parentheses it turns into f(a(x);) so I have to delete the semicolon which is very annoying
I mean personally it's just a configuration, as long as some standard is being kept then imo no reason to worry
also
@wintry marten
We need a fucking bot that generates these memes, like "I am once again asking for you to merge PR #x in top-gg/docs"
this is honestly a pretty bad system I mean I don't know any of these libraries how am I supposed to approve them or why do they even belong in the docs in the first place
tbh, i feel like it'd be better if the different libraries on the docs just redirected to the docs for that library and just keep them separately hosted and everything
that would make autodocs much better as well
yes
@fair goblet could you give @sacred belfry the oss contributor role
where did they contribute?
node-sdk
done
thank
thank
@sacred belfry
i am now contributor
One message removed from a suspended account.
where new color?
One message removed from a suspended account.
frick
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
It really shouldn’t. Top.gg isn’t trying to make people want to make contributions, they just want to be open to it. If the role was hoisted then people would be doing it only for the role
This
sadly we can't have nice things in topgg because people ruin it for everyone else
https://img.marcorennmaus.de/tev3aPwH how to get this role @mods
how to become more weeb than @fair goblet atTeam
its literally impossible
not every role is supposed to be collected 
collecting muted role
Rules Only
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.
sigh looks like I might have to fork nextjs soon lol
https://github.com/vercel/next.js/issues/21693 why isn't this added already? so stupid
my god this code https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/i18n/normalize-locale-path.ts
true
Vue 3 > React


@wintry marten docs PR #48 merge plz
ok this is a really stupid system this is the last library related pr I'm merging
LMFAO
auto build for docs when
One message removed from a suspended account.
One message removed from a suspended account.
thats stinky
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.
we dont even
its all pr based and thats how it is and always should be with out-of-company contributors
One message removed from a suspended account.
Y’all just need a NDA
Veld make NDA and give library devs to sign it
||add a line that they should pay you $1000 monthly||
what does an nda have to do with it
Non-disclosure agreement
Mark in it info you can’t disclose and responsibility for prohibited actions (like filling docs with hentai), etc
That’s how NDA works
why would you need to write to the topgg docs? Does discord.js put examples in discord's dev documentation?
I think yall just need to have the docs set up in your own Readme or a separate markdown file instead
NDA would be a disastrous idea
I think having one common-ground place to find all of the documentation for each API wrapper would prove more efficient than having the detriment of each of them having their own docs page that you have to go to. While it is probably better that way, it's easier for people to remember "oh go to docs.top.gg for the API docs"
people won't remember "okay JS is topgg.rtfd.io and python is ..., etc."
big fancy words to come out of me, but probably easier to remember the top.gg url than each individual one
but wrappers are not topgg documentation. If you need to find js docs for python you Google that
like 3 people in total are going to use more than one api client
why do I need to make my life harder for 3 people
i don't think that's necessarily it
it's just a good idea imo to have a place to organize all of them under 1 source that can easily be remembered and referred to
that's the gist of my thoughts at least
I'll add links so people can discover api clients but I'm not gonna be adding documentation for it under the topgg docs anymore. This is for the top.gg api so I just don't see why any library developer should be trying to keep a 3rd party docs up to date or have write access.
If we get new clients I'm happy to add them to the docs so people can go to one place to discover what they need
understood, i'll begin moving all of my lib documentation off of the docs page and refer to it on the website as a link to my own docs page
should be a happy compromise that way
sounds great. I'm not gonna be doing that this weekend but probably sometime next week
no rush 👍
@wintry marten well the conversation initially sparked from me asking veld about domains for the node-sdk typedoc change, he said to use docs.top.gg, so i asked him then you about an auto-build strategy that could centralize the library docs for auto-generated documentation, because obviously we shouldn't just be copy and pasting an entire typedoc into a single md file in a pr. we can stepback that and i can go get something like topgg.js.org for the node-sdk
@dense barn this is not a sustainable way to do documentation and I don't think it's worth my time to work on a generic autobuild solution for documentation either
he never said thats what we should do i just thought that would be the only feasible way to get auto-generated docs onto the docs.top.gg page
food for thought but maybe like a libs.top.gg or docs.top.gg/libaries could be a directory of autogen docs
shrug
if you have websites for library docs it could be ok to lease something like js.docs.top.gg I suppose but getting pinged about accepting random PRs for libraries of languages I've never used before is pretty ridiculous
if someone has the time to work on that, maybe but I'm not gonna be doing it
if you have a solution that works on github actions and works generically for every language then feel free to make something like that
it'd be neat but feels like centralized docs in the first place brings like no foreseen advantages tbh
yes
clicking on a link that brings you to a different repo vs clicking a link that opens a different page on the same domain to show docs that could possibly be stale. One is about 10 minutes worth of work the other is like 10 hours
i think editing the docs.top.gg library mds is fine how it is right now
but it shouldnt be like filled with documentation, just common examples
i mean i have no issues with migrating my docs honestly
it supersedes the write access issue we have
and takes off the workload of them having to check our PRs all the time for changes to doc
maybe fine for you writing the docs, but not me who has to read them and accept changes
idk the workload xet has outside of our docs writing
but i'm sure it's not out of pure laziness
otherwise it would not be such a prevalent complaint
shruggy
plus honestly not our judgement call.
fair
i'm here just so that there is a wrapper for their API
and nothing more
so whatever changes they make, i'm only for adapting to them
there's not much else to be asked out of that tbh
there's just no reason for these docs to be in the api documentation for the exact same reason why discord doesn't have d.py in their documentation
i mean xet has a point
alot of companies do the sdks on their docs all the time
the docs should be solely about their API
we're only offering the means of substitution and pre-written code for use
i can't really argue against that stance because there's no fallacy to it
if we were random developers just making wrappers of your api i'd agree
but all of these sdks are atleast approved by employees or whatnot, and some maintained by them
of course but it's still an official sdk
not just some random wrapper like d.py and djs
no discord developer is approving prs on d.js repo
if i was being paid, i think i'd likely have some arguing point
i don't think our work is official SDK
i think it's open-sourced, volunteered wrapeprs
after all we got our own channel archived in favor for an open source channel
which is more like private source now

its on the top-gg repo i mean like we have #topgg-api too its safe to say its official
feel like its a moot point
ig declaring it an official top.gg library makes it sdk

I'm not against the idea of having docs in one place but I can't be spending time accepting prs of things I literally do not know like golang into the documentation
then trust us with the PRs and accept merging since we're the ones maintaining our own wrappers

i mean they shouldn't be happening so often
easy solution
the main job with you approving prs at this point is like spelling mistakes and stuff lmao
im not sure who is making sporadic PRs for doc changes either
because you just have to trust the maintainer
I guess I did, but I think I had a 3 week window between mine
or well
you could just let us directly commit
but 
also inb4 berry kills me
is there a need for our lib dev role anymore? maybe it makes us stand out in #topgg-api sure but feels cosmetic now
like js docs were edited 2 weeks ago, and 2 months before that
both were just for updates to the examples
i think that's how it should be
mm idk xet wasn't arguing about how consistently updated the docs are
xet was simply arguing their ignorance about what languages the API was being wrapped for
it's not an entirely invalid thing to stand on, but at the same time, at some point, i feel that you've gotta trust the lib devs
could also just iframe the repos README ez
wouldnt be a bad idea just to like do that and display the readme or something tbh
tbqh i don't like the idea of migrating our docs to our own sites
because what if those sites go down?
there go your docs.
they have their own generated docs right?
I don't see a problem. Just have an introduction on the API on our actual docs page
If that's too much manual work, then I am quitting with all the manual work I do every week for top.gg 
I'm just not interested in maintaining this and keeping up with changes to libraries on top of everything else
The library maintainers can PR it
I still have to go through the prs and check them
Feel free to reach out if you don't have time for it
It's a 5 minute PR review
not worth the extra effort when we can just link to the docs of the library and never have to keep up with it
sure we can have a libraries index in the docs for useful clients
what abt what i said before and just using the sdks README as the page instead
no i mean like the page on the docs.top.gg use the source for the README.md so you don’t have to go to a different site maybe
or maybe some custom thing like DOCS.md on each of the sdks
if you can set up the build for it with gatsby it's possible
i’ll take a look
One message removed from a suspended account.
tomorrow
One message removed from a suspended account.
@wintry marten for docs autobuild what should i do for this?
should i just keep it my info
what do you need this for
we do have topgg bot
.github/workflows/docs.yml
name: Build Docs
on:
push:
branches:
- 'master'
jobs:
Docgen:
name: Docgen
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore CI Cache
uses: actions/cache@v2.1.4
with:
path: node_modules
key: ${{ runner.os }}-14-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
run: npm i --also=dev
- name: Build documentation
run: npm run docs
- name: Publish Docs
run: |
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
echo -e "\n# Checkout the repo in the target branch"
TARGET_BRANCH="docs"
git clone $REPO out -b $TARGET_BRANCH
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed"
rsync -vaI README.md out/
rsync -vaI docs/ out/
echo -e "\n# Commit and push"
cd out
git add --all .
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_EMAIL}"
git commit -m "docs: api docs build for ${GITHUB_SHA}" || true
git push origin $TARGET_BRANCH
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_ACTOR: jpbberry
GITHUB_EMAIL: jb@jt3ch.net```
got all this stuff
what's the info or is it in a team secret etc? what should i put basically
i need to generate the docs to a diff folder so i thought might as well
idk I'll look at this tomorrow
alr
@wintry marten i looked into the build error im getting and apparently the eslint report thing you got goin only works for contributors who have full write perms, so it doesnt work for anyone without them and fails on build
top-gg-bot is such a good bot
do you know what the github secret names are for it? so that we can push docs to a diff branch with the bot
One message removed from a suspended account.
@tiny shard did you
yeah i did and i’m still trying to learn the full thing before i try implementing it
One message removed from a suspended account.
Ah ok
also considering maybe waiting for v1 before implementing them because there’s no major changes happening rn
and v1 will have those
v1 graphql maybe 

One message removed from a suspended account.
probably not but it's on the table
One message removed from a suspended account.
you figure out the top-gg-bot credentials?
idk I'm working on something else atm
prolly the best way to do it is to define an org secret with like BOT_TOKEN BOT_USERNAME BOT_EMAIL, and then can just use those
alr lmk
im not sure idk about topgg bot maybe ask veld about it
@dense barn
whats up
can you add org secrets for the credentials of top-gg-bot?
well it still is public access
github actions stuff
yes
i mean everything uses it would need approval from trusted people
they couldnt be accessed out of workflows yknow
pushing docs for github pages to a docs branch
this
need to replace
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_ACTOR: jpbberry
GITHUB_EMAIL: jb@jt3ch.net```
https://github.com/jpbberry/node-sdk/tree/docs so like on my fork it does this
its a secret
so its defined in the repo
and then i generate a token and add that to repo secrets
but i dont really want to use my own github token for the pushes unless ig i have to, i also dont think i even can cuz i dont have full write perms
its already kinda weird that it uses my npm token to publish but
interesting
@dense barn
?
still looking for an answer to this
oh i haven't had time to look into this yet
hey
for vote webhooks
is the "type" property right now either "bot" or "guild"?
cc @worthy cypress @kindred maple @surreal socket @tiny shard
I saw for test webhooks we handle it as "test" type
but that seems kind of intuitive
“upvote”
Oh i see
yeah it’s like extremely useless but
How would you know whether the type is a guild or bot though

OK
understood
I wanna do some layout adjustments
as we move into our new backend for things
yeah for sure
so what I propose is
type WebhookPayload {
guild?: string; // @deprecated - use entity.id instead
bot?: string; // @deprecated - use entity.id instead
type: "vote" | ...,
entity: BasicEntity {
id: string;
name: string;
avatarUrl?: string;
url: string; // e.g. https://top.gg/bot/miki
}
user: string;
}
I don't want to break it, but i want to expose a bit more data for the entity
However as you can see we no longer would send "test" in type
instead we have a header
X-TOPGG-TENANCY: "live" | "test"
so any payload would be the exact same for webhooks
e.g. a test vote would show as a vote
right right, hm
One message removed from a suspended account.
we can add a version header
ye just default to v0 and then libs can implement v1 and just pass the header
i thought for the webhook payloads you were gonna do something like...
this is still for v0
to expose a little more data
most likely for v1 it'll look more like this
{
type: "VOTE"
body: {}
}
is v1 that far off lol






np
sorry I haven't been working on

