#development

1 messages ยท Page 148 of 1

lyric mountain
#

Like English and Spanish, both languages, different words

frosty gale
#

side note i was going to get contabo but i hate the fact they just add on random fees when youre just about to check out

rustic nova
#

You mean the setup fees?

spark flint
#

contabo network is slow

earnest phoenix
#

DigitalOcean and Hetzner my beloved

rustic nova
#

used hetzner for testing

#

love their dashboard ngl

frosty gale
#

might switch from galaxy gate

rustic nova
#

hetzner swag

frosty gale
#

thats arm though

#

wont that cause compatibility issues?

#

last time i checked arm and x86 are completely different instruction sets

#

shit ton of registers too

#

or cores dont remember

rustic nova
#

depends on language you're using

#

though most of these shouldn't affect them at all

frosty gale
#

like nodejs and npm for example

#

do i need arm specific versions

rustic nova
#

dont think so, apt and so on handles it themselves

#

unless you're literally coding discord bots in assembly

frosty gale
#

hope so lol

#

might get it then

#

at one point i actually had an interview with arm but i turned it down

#

wild

earnest phoenix
#

It'll setup both Node.js and npm for you and you can even manage multiple versions of them, run nvm install --lts to install the latest LTS release, or nvm install to install the latest non-LTS release (not recommended for production use)

frosty gale
#

nevermind

#

actually not sure if i can use arm

#

i have a c++ application that i need to run and its designed for x86

#

idk if i can compile it for arm/port it

#

actually should be able to

#

since its just linux so the system calls arent affected

thick path
#

Guys Ill verification my bot but I dont understand Presence Intent? Whats that?

rustic nova
sharp geyser
#

only fee they charge is a setup fee

#

and they do a lot of events where they just negate it anyway

#

I got mine when they charged 0 for setup

peak drum
#

i mean the setup fees aren't that bad

sharp geyser
#

its like 6$

crystal wigeon
#

hey has anyone used cloudflare?

#

to host their static site

#

Im basically having this huge issue with dumb cloudflare adding a trailing slash at the end of all my urls causing major SEO problems,

rustic nova
#

you mean pages?

crystal wigeon
#

so like im trying to remove it

#

yeah

#

cloudflare pages

rustic nova
#

page rules, dunno why you're getting that issue tho

crystal wigeon
#

i tried everything, i tried using _redirects and some page rules but when i do that it sits in an infinite redirect loop

#

yeah its fkin weird, it keeps adding annoying "/" at the end like this https://genprose.com/blogs/convert-audio-to-content-with-genprose/

#

if i remove the slash manually in browser it again redirects it to the url with a slash

#

any idea?, i checked their forums and i see a lot of bugs reported on this issue. and no workaround

sharp geyser
#

This is why I don't use cloudflare for static webpages

#

I just use a vps with nginx and have cloudflare's dns point to it

crystal wigeon
#

mm, its just so dumb why would they even do that

#

but im sure there are people who have solved this

sharp geyser
#

this might help

sharp geyser
crystal wigeon
crystal wigeon
#

but it keeps crashing with redirect loop for some odd reason

#

fkin stupid this cloudflare

#

horrible

sharp geyser
#

I can make a nginx config for your site all you gotta do is have cloudflare point it to my server's ip

crystal wigeon
#

nah its okay, this is a company's website so cant use yours, i'll have to create one,

sharp geyser
#

Ah

#

Well then I don't really know how to help beyond that as I dont use cloudflare pages

#

I can help you setup nginx though now that I know more about it myself

crystal wigeon
#

yeah its okay, i joined cloudflare discord server, lets see hopefully someone will help

sharp geyser
#

hope so ๐Ÿคž

crystal wigeon
#

or maybe i find a workaround with astro highly not possible cause its only serving static content

#

They even fkin support this themself in the _redirects file, yet so buggy, jesus

rustic nova
#

or your website is redirecting back to site/

crystal wigeon
#

nop, i ran the build myself locally

#

and there was no trailing "/" its coming from cloudflare

#

see, localhost serving from "dist" the build output dir, has no trailing slash

rocky turret
#

is it possible to send message on voting in top.gg with a bot

#

i want to send msg with bot

#

and add a role

sharp geyser
#

You can listen for the vote webhooks tuff

obtuse meteor
#

I have a simple bot that on join, it creates 2 text channels. Now tho most of the time 'everyone' ,as the default permission on join, cant create channels

Error creating channels: DiscordAPIError: Missing Permissions
    at RequestHandler.execute (/home/ubuntu/discord/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
    {
  method: 'post',
  path: '/guilds/947687169647054869/channels',
  code: 50013,
  httpStatus: 403,

even thou the bot is invited with enough perms:

#

mainly this one

#

im trying not to 'admin' perms

#

coz that would work

#

but is there another way arounnd

strange wind
#

I would use a /setup command and check for the permission there

#

Also don't think many would appreciate 2 channels being created on invite

real coral
#

hi how do i fix this error, i finished coding my bot but it keeps giving me this error

tacit briar
#

Don't use replit

#

There's ur fix

quartz kindle
#

meaning you're either using an outdated discord.js or following an outdated tutorial/guide

#

or you copied code designed for a different discord.js version than the one you're using

earnest phoenix
#

how could this happen?

deft wolf
#

Discord api moment

earnest phoenix
deft wolf
#

I have same errors so nothing wrong with your bot in my opinion

earnest phoenix
earnest phoenix
real coral
#

14.10.0

deft wolf
quartz kindle
#

the guide you used or the code you copied is outdated

real coral
#

oh

#

how do i import my project to github im trying to change it from replit to glitch.com

quartz kindle
#

that wont fix the issue

#

also pretty sure glitch.com does not allow bot hosting

#

unless you use the paid plan

earnest phoenix
#

fr

oak tide
#

Hi

deft wolf
#

Yo

oak tide
#

Yo

tulip ledge
#

is it possible to make a button (messagecomponent) go to a link?

deft wolf
#

That's probably the only option

lyric mountain
#

I mean, the button is made for that

tulip ledge
#

Ah alright thank you

frigid robin
#

Trying my luck again

lyric mountain
#

does deleting messages create an audit entry?

#

check the audit logs to see if they're there

wheat mesa
#

Deleting OTHER peopleโ€™s messages counts. Deleting your own does not

#

Keep in mind that if you wanted to track deleted messages, you would use the messageDelete event

rustic nova
#

iirc messages deleted by bots dont show up either?

#

doesnt matter if own or another users messages

wheat mesa
#

Yeah they donโ€™t

proven lantern
#

Is there anyway to post a custom audit log?

rustic nova
#

nope

proven lantern
frosty gale
#

deleted by bots dont show up, deleted by the author themselves dont show up,etc

#

you have to use messageDelete and make an educated guess

rustic nova
frosty gale
#

oh they dont even include the message id so you cant be sure an audit entry actually belongs to the message lmfao

#

not sure if that changed though

rustic nova
#

it hasnt

tacit briar
#

Ur bot won't be able to log it again if it stacks, meaning if 2 messages were deleted in general and it stacked in logs, only 1 would show

rustic nova
#

and that too

tacit briar
#

I was messing with it and was confused why it only logged once

rustic nova
#

audit logs come with ids though

#

so the way I've tried to do it was:

  • Keep a list of already processed audit logs
  • check if that id is already processed, if it is, check if a new message was added to it (if a message audit log)
  • fetch the user who has done said audit log (aka the moderator)
#

and shit still doesnt work

#

so i gave up

frosty gale
#

audit logs are also quite delayed ๐Ÿ’€

#

its advised to wait half a second or something before querying audit logs for messages

spark flint
#

There is an audit log event though

#

Which afaik also passes stuff like msg content

#

I would cache msg on delete, on audit log event find that message in cache

#

Same with ban events

#

Instead of scraping audits which 1. Isnโ€™t accurate and 2. Is not advised

rustic nova
#

As if discord gives luxury like that

rustic nova
spark flint
rustic nova
#

Watch them introduce audit logs that have everything user-related stripped

#

Fun times

earnest phoenix
#

Fr

proven lantern
#
{
  status: 400,
  statusText: 'Bad Request',
  guild_id: '-------------', // removed
  data: {
    name: 'test title',
    description: '**Description:** \n' +
      'test desc\n' +
      'Tournament starts in <t:1688945497:R> at <t:1688945497:t>',
    privacy_level: 2,
    scheduled_start_time: '2023-07-09T23:31:37.641Z',
    scheduled_end_time: '2023-07-09T23:41:37.641Z',
    entity_type: 3
  }
}
{"code": 50035, "message": "Invalid Form Body", "errors": {"entity_metadata": {"location": {"_errors": [{"code": "BASE_TYPE_REQUIRED", "message": "This field is required"}]}}}}

any idea why i get this error with the above request?
https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event

#

i need entity_metadata

#

now i'm getting a permission error even though i invited the bot with create event permissions.
{"message": "Missing Permissions", "code": 50013}

#

is create events even a real permission? it's not showing up under role permission at all

proven lantern
#
        const response = await fetch(`${URLS.api}/webhooks/${application_id}/${token}/messages/${message_id}`, {
            method: 'patch',
            body: JSON.stringify({"content":"Test!"}),
            headers: {'Content-Type': 'application/json'}
        });

why would this give me a 400 error?

<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
#

the message_id comes from the ${URLS.api}/webhooks/${application_id}/${token} post request

earnest phoenix
#

does anyone know why this is?

[ERROR] TypeError: Cannot read properties of undefined (reading 'cache')

This happened I guess because I wanted to get the channel error logs but before that this was normal

craggy pine
#

well that means you tried reading "cache" likely <something>.cache and it was undefined.

earnest phoenix
#

I mean when it is turned on normally just a few hours or days it will be like that.

#

if it's a normal error I'll ignore it but it interferes with the bot process the bot will automatically shut down

craggy pine
#

If you know which line of code it comes from I'm sure that'll lead to answers aswell if posted here. I'm not exactly the person to assist with it as I've been slacking on the discord development side for a bit.

proven lantern
proven lantern
#

maybe the version of discord.js updated on you

earnest phoenix
#

I still use discord.js@12.5.3

tribal belfry
#

why??

craggy pine
#

also just refresh it. The website loads fine for me.

tribal belfry
#

i have done the voting but it doesnot say to mission

warm surge
tribal belfry
#

Ok

hasty nest
#

ugh, i hate container orchestration

#

Kubernetes + Postgres + Rust + Redis

#

all together painful

proven lantern
rustic nova
rustic nova
#

Skill issye

#

Issue

warm surge
#

im using 14 dev

proven lantern
earnest phoenix
warm surge
earnest phoenix
#

For me discord.js@12.5.3 is pretty good compared to v14 which is very complicated

warm surge
peak drum
#

Youโ€™d need to upgrade to v14 to get slash commands xD

warm surge
peak drum
#

True but if you are going to upgrade you may just as well go to the newest version KEKWSlide

wheat mesa
#

that is an awful idea

warm surge
quartz kindle
#

windows 7 is also better than windows 10/11

#

but what can we do

lament rock
#

Why limit yourself to a shitty interface that's unpredictable? Just use the raw api and build your own interface

#

Years of discord.js, but many major breaking changes involving rewrites

neon leaf
#

why am I getting this error? my code hasnt changed at all for that in the last week and it worked fine like 2 days ago

#

Im doing this

#

(from the discord-oauth2 npm package)

sharp geyser
#

is it a valid refresh token

neon leaf
#

Yes, should be

#

Unless refresh tokens can expire

pale vessel
#

yes, it can if the user revokes the oauth application

sharp geyser
#

Yea

#

Make sure they havenโ€™t revoked the application

neon leaf
#

Can I somehow know when the user revokes the app? Like a webhook

#

Except with just catching errors

sharp geyser
#

I donโ€™t think discord notifies you

#

In any way

#

Youโ€™re kinda just left hanging on that iirc

wary vortex
#

um

#

it says my app is not public

#

but it is

sharp geyser
#

You sure?

wary vortex
#

nvm it finally updated or smh

spark flint
#

an API that gives you API ideas

sharp geyser
#

an api that gives you no context of steve

tacit briar
#

Cats!

digital swan
#

Ai generated animals

rustic nova
#

An API that does API things

#

An API that responds with 200

lyric mountain
#

I'd not say no to yet another animal http status api

#

now that capy is down it only remains cats and dogs

rustic nova
#

Bold question

#

Actually nvm

spark flint
#

i dont think i have a copy anymore

#

also the domain expired, but porkbun is funny

#

usually, expired domains change nameservers to Porkbuns, but for some reason the domain is expired and has been renewed (auto by porkbun) for another year, and the nameservers are still mine

pale vessel
spark flint
#

this was just a folder of images

#

and it used a shit vps which i stopped paying for when its network kept dying

frosty gale
#

ill copy some template and put somethingcool on it

neon leaf
#

could the reason for buttons having 500ms delays be that I have 50 active react hooks on the page?

peak drum
#

maybe KEKWSlide KEKWSlide KEKWSlide

neon leaf
#

well, makes sense. what should be the max?

peak drum
#

no idea KEKWDisco

solemn latch
peak drum
#

Me tooKEKWSlide

rustic nova
#

there you have it

frosty gale
#

i should make something like setup a local stable diffusion instance and have it generate a custom image of my choosing on any topic every time someone visits

#

it would have to run on my pc though i cant imagine vps instances with good gpus are very cheap ๐Ÿ’€

#

providers absolutely love to overcharge for relatively basic features

flat copper
#

i want to make a npm stat card, any way i can get my user info from npm like username and pfp and all the packages i have, downloads if possible

lament rock
#

check the npm api

flat copper
lament rock
#

then have fun web scraping

flat copper
lament rock
#

The npm cli has to do it somehow and I doubt they'd use web scraping

#

but lol I scrape just about everything

earnest phoenix
sharp geyser
#

Love when I can't connect to my own vps for some reason

#

๐Ÿ˜”

#

connection keeps getting refused

lyric mountain
#

Did u lock urself outside?

sharp geyser
#

No idea

#

I dont think I did

lyric mountain
#

Like, did u mess with ufw?

sharp geyser
#

Oh god

#

๐Ÿ‘€

lyric mountain
#

Lmao

sharp geyser
#

Welp time to VNC into it

#

cause pretty sure the ssh port I use isn't open

lyric mountain
#

U can also use contabo recovery feature

#

It's made for just that lul

sharp geyser
#

I can just VNC into it and do it that way

#

all I gotta do is open the ssh port

#

I think its 109

sharp geyser
small tangle
#

isnt ssh on 22?

sharp geyser
#

it doesn't delete any files right?

sharp geyser
#

I change my port for ssh tho

lyric mountain
sharp geyser
#

bet

lyric mountain
#

Sda2 or smth

sharp geyser
#

doing that then

#

fuck this vnc bs

lyric mountain
#

See their tutorial on how to find your files, as you'll be in another partition

#

The files are in sda1

sharp geyser
#

ic

small tangle
#

i see

#

im just glad i finally understood ssh lmao

sharp geyser
#
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
someKey
Please contact your system administrator.
Add correct host key in C:\\Users\\dyeaaronjr/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\dyeaaronjr/.ssh/known_hosts:1
ECDSA host key for 154.53.57.218 has changed and you have requested strict checking.
Host key verification failed.```
#

gotta love this

#

๐Ÿ˜ฉ

lyric mountain
#

Locking ssh is something everyone eventually does on mistake

#

Good thing most hosts are expecting it

small tangle
#

we do a little ssh trolling

sharp geyser
#

Why the fuck is it telling me my password is incorrect

#

tf did the system rescue do

#

did it delete my user entirely?

lyric mountain
#

Try root login

sharp geyser
#

root login worked

lyric mountain
#

Remember ur in a separate partition

#

System rescue doesn't boot from your main OS

sharp geyser
#

yea it completely removed my fucking user

sharp geyser
lyric mountain
#

It's like installing windows in dual boot, the users won't be the same on both sides

sharp geyser
#

How is this useful?

peak drum
#

to restore your password etc

#

reinstall an os

sharp geyser
lyric mountain
#

U can go to ufw files and disable it

#

Just need to find it

peak drum
sharp geyser
#

that sounds like a pain in the ass

small tangle
#

whats ufw pikathink

sharp geyser
#

At this point ima just re-install the entire vps

lyric mountain
#

Ur currently in sda2, so first thing u need to do is mount sda1

sharp geyser
lyric mountain
#

To access the original files

sharp geyser
#

bascially allows you to manage the firewall rules easily

peak drum
lyric mountain
#

The files are in /etc/ufw

#

Just nano the rules and add ssh

small tangle
#

but looking at the convo it looks more complicated KEKLEO

peak drum
#

he probably forgot to add to allow port 25 for ssh before turning the firewall on

sharp geyser
lyric mountain
#

Again, mount sda1

#

Ur in recovery partition

small tangle
#

looks like "locking the door and throwing the key away" to me

sharp geyser
#

no idea how to mount man Im a linux noob

sharp geyser
peak drum
sharp geyser
peak drum
#

nice KEKWDisco

lyric mountain
#
Blog

Many of you have already heard about it or even used it once in a while, but most of you have probably not been introduced to it yet: Our rescue system! While hopefully not being needed at all, it provides many possibilities to fix certain problems and to bring the machine back online as soon โ€ฆ System Rescue CD: First Steps Read More ยป

sharp geyser
#

Forgor to fix my mistake

lyric mountain
#

Just follow that guide, it's not very complicated

#

Ah the main partition is the one called sda2

frosty shuttle
#

nice

sharp geyser
#

cant be asked to fuck with this shit

lyric mountain
#

Lmao but it was a good opportunity to learn it

sharp geyser
#

it was but I dont know what im doing

lyric mountain
#

Mount, edit, reboot

#

3 commands

sharp geyser
#

I mounted the sda3 partition which has all my shit

#

but after that no idea

lyric mountain
#

/etc/ufw

#

There's a rules file there, simply add ssh port to it

sharp geyser
#

it already has an ssh port

lyric mountain
#

Then how did u lock yourself outside?

#

Are u using a diff port?

sharp geyser
#

Im using the one listed there

#

it shows port 22

#

after the system recovery

lyric mountain
#

System recovery doesn't change any files, it just installs a minimal OS into another partition so u can access the files again

sharp geyser
#

im just telling you what I saw

lyric mountain
#

Then you could've tried restarting it

sharp geyser
#

I did try rebooting it

lyric mountain
#

Or just deleting ufw from bin

sharp geyser
#

and then it wouldn't even allow me to connect from 22

#

So im just reinstalling the OS and calling it a day

lyric mountain
#

Eh

sharp geyser
#

I'd rather re-setup everything then deal with the bs of ufw

lyric mountain
#

Did u pick the nginx config file?

sharp geyser
#

I should have a backup of my nginx and mailcow stuff on my pc somewhere

#

if not then shrug

#

I know how to do it now so its not a big deal and it'll give me practice if I did end up not backing up the latest

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

soft laurel
#

Can a StringSelectMenu have it's value "selected" when built? Or does it have to reset on every edit?

earnest phoenix
#

Okay so I am only slightly going insane SMILERS

I am following a tutorial for Next.js 13 (because I am dumb and watch tutorials, cry), and while trying to create a "blog" of sorts, I am getting a 404 error when I try to open a specific post.

The API endpoint is just fine, all the content is there when I fetch the data from the API (i.e going to http://localhost:3000/api/posts/somerandomidhere), but when I try to "open a post" (via the blogs route) it's giving me a 404 (i.e http://localhost:3000/blog/somerandomidhere)...

I have my source code below... And any help is appreciated

Thanks in advance!

https://srcshare.io/64acf46f5a4f12298cd1a5b6 <-- Src code

quartz kindle
#

yes

slender wagon
#

anyone got some nice font suggestions

#

@frosty gale any suggestions?

sharp geyser
#

@slender wagon webdings

radiant kraken
slender wagon
frosty gale
#

idk ๐Ÿ˜”

slender wagon
slim dirge
#

Hey everyone! I'm not sure if this is the right channel as its more of a statistics question, so feel free to point me in the right direction if so.

I'm curious to know if its possible to find out what the average server count is for bots? I know some are in 10k plus servers and some are in 100 so it would probably skew, and then there is also the fact that there are different categories of functions (e.g., moderation, information, games).

Its certainly not a straightforward question to answer but I am interested to know if anyone has tried to tackle this at all and, if so, how far they got?

slender wagon
#

ofc this is for the bots listed on top.gg

#

most of them are tho

delicate zephyr
#

I can probably do a db fetch and get the average for you

#

probably better you join the support server though, be easier for me to post it there than here (since this channel is fairly active)

slim dirge
#

Very cool! Thank you both! I shall have a read and a dabble ๐Ÿ˜ ๐Ÿ‘

pearl smelt
#

will top gg have an autovote feature for premium?

spark flint
#

no

#

that defeats the point of voting lol

pearl smelt
spark flint
#

but like

#

the point of voting is you supporting the bot and by autovoting you are only voting for the bot

#

also it just seems wrong

#

not a good feature to add

pearl smelt
#

not me personally but i understand ur POV

lyric mountain
#

disboard doesn't have autovote, it has autobump

#

they're quite different in purpose

bleak egret
#

๐Ÿ’

tulip ledge
#

anybody got a good npm package or function to return the next x dates of a cron expression?

lyric mountain
#

why do u need a package for that?

#

just split by space and add to new Date()

#

first value is seconds, then minutes, then hours

tulip ledge
#

ah yeah

#

I'm stupid I suppose

#

thanks

frosty gale
#

js ecosystem encouraging developers to use packages for every little problem instead of writing a solution in one line

#

I used to be in that trap so I had a shit ton of god forbidden npm packages ๐Ÿ’€

#

that did one thing

#

it's a canon event I suppose

earnest phoenix
quartz kindle
#

fixes the annoying "cant read x of undefined" problem

frosty gale
#

bro really defined undefined

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

proven lantern
#

i think the webhook patch endpoint is broken. it's not my fault
${URLS.api}/webhooks/${application_id}/${token}/messages/${message_id}

#

lol

wheat mesa
#

something about intellij is off-putting for ts/js

#

just feels weird

sick agate
#

@proven lantern i would check every variable that is used i guess

#

i have no idea other than that

pale vessel
#

what's that last message_id for?

#

that's only for getting/editing/deleting

#

if you want to post a followup to the original message, use ${URLS.api}/webhooks/${application_id}/${token}

lyric mountain
proven lantern
sick agate
proven lantern
#

i think discord is broken or doesn't support what i'm doing for some reason

#

no way i could be making a mistake

lyric mountain
#

what error are u getting again?

sick agate
#

400 bad request

#

from cloudflarr

proven lantern
lyric mountain
#

did u attempt printing the url?

#

to see if u didn't forget the s in https

proven lantern
#

i will check now

#

https://discord.com/api/v10/webhooks/[BOT_ID_HERE]/[INTERACTION_TOKEN_HERE]/messages/[MESSAGE_ID_HERE]

#

looks good for https

sick agate
#

yup

lyric mountain
#

send a message or edit it?

proven lantern
#

edit an interaction response

lyric mountain
#

then it's an easy solution

lyric mountain
proven lantern
#

i save the message_id from that

#

and then try to patch and it fails

lyric mountain
#

hm idk then

#

double-check whether u didn't miss a field from the docs

proven lantern
#
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>

isn't this a weird error though'?

sick agate
#

yup

proven lantern
#

usually it's json

sick agate
#

cloudflare does some fuckery

#

it may send html while it's supposed to send Json

proven lantern
sick agate
#

so it narrows to likely JSON body

proven lantern
sick agate
#

I would try treating it as a dict and stringifying it

lament rock
sick agate
#

I think there is already that

lament rock
#

Would be in the headers so no

proven lantern
#

i'll give that a try

lament rock
#

Need User-Agent header and Authorization

#

User-Agent needs to be a specific format

proven lantern
sick agate
#

yup

proven lantern
#

the bot token header didn't fix it. still getting a 400 html error

sick agate
#

posting it without the user agent is already there

lament rock
sick agate
lament rock
#

You absolutely need to have a good base and all of the actual route docs should be built on top of the base

#

Alternatively, I've done all of the hard work for people in a low level wrapper called snowtransfer. (Discord REST is really hard) you can either use as reference (MIT) or just install it

proven lantern
sick agate
#

yup

#

(not sure about auth stuff but yeah)

proven lantern
#

maybe i need to do multipart data

#

i did try that a bunch already

lament rock
#

Have you looked at the request handler request method

proven lantern
#

yeah

#

const FormData = require('form-data');

lament rock
#

multipart is only required for files

#

multipart shouldnt be used unless files are present

proven lantern
#

makes sense

#

i tried adding that user-agent header, but no luck

lament rock
#

Then I'd just install an already existing library

proven lantern
#

i think the issue is with discord api

#

my code is perfect

lament rock
#

Before you claim that, I'd try another library

proven lantern
#

i haven't used a library yet

lament rock
#

snowtransfer or some other rest only lib is good

proven lantern
soft laurel
#

What is the proxy icon url of a discord icon?

lament rock
soft laurel
#

oh ok. Are you familiar enough with the JDA discord api library in Java to tell me how to get that proxyUrl from the User interface?

lament rock
#

Why do you need the proxy url specifically

soft laurel
#

I'm trying to create an AuthorInfo object to use in a MessageEmbed

lament rock
#

The proxy url is optional

soft laurel
#

beauty, ty

proven lantern
#

thanks!!!!

#

discord made a mistake imo

lament rock
#

What was the issue

proven lantern
#

i needed to uppercase the word patch

#

PATCH

#

lol

lament rock
#

Yeah. global.fetch/undici doesn't do that for you for patch only

#

all other methods are fine

#

Don't ask why

soft laurel
#

follw-up question, what about the discord user url? Is that the same as the avatar url?

proven lantern
#

i blame Voltrex

lament rock
#

?

soft laurel
#

I mean, I guess so. There's a setAuthor() method that takes as parameters (userName, userUrl, iconUrl)

deft wolf
#

It can be any link

soft laurel
#

as defined by the Javadoc

url โ€“ the url of the author of the embed 
iconUrl โ€“ the url of the icon for the author```
lament rock
#

Would be to make the author text clickable

lyric mountain
soft laurel
lament rock
#

You don't need it, it's optional

#

alternatively, make the embed objects yourself

deft wolf
#

I use this to link reddit profiles

lament rock
#

using builders is cringe

soft laurel
#

If it's optional I'll just leave it out. I was under the impression that was something provided by the Discord API somewhere and could be added easily. but if it's something I'd need to manually provide I'll just omit it

#

ty guys

lyric mountain
#

ur supposed to use the builder for embeds, not the constructor

soft laurel
#

My curiosity was about the url parameter being linked to a discord user

#

I couldn't find a method in the User interface that provided such a url.

#

It sounds like I'd have to manually create one or something similar. If you know of another place I could get that url though that would be super helpful ๐Ÿ™‚ otherwise I'll just keep it null.

lyric mountain
#

going by the documentation, proxyUrl is the cdn url

soft laurel
#

I'm not familiar with the cdn url. Where did you see the documentation?

lyric mountain
#

like, instead of making a request to discord, getting the url from cloudflare

soft laurel
#

lol like the JavaDoc? Or the wiki?

#

ohhhhh

lyric mountain
#

yes, the javadoc

#

however

#

it's likely not used for anything

#

here the actual usage for it

soft laurel
#

I see that method's name is for an icon, what about the user url? Or am I just mistaking the 2nd parameter of setAuthor()

#

public EmbedBuilder setAuthor(@Nullable String name, @Nullable String url, @Nullable String iconUrl)

#
url โ€“ the url of the author of the embed 
iconUrl โ€“ the url of the icon for the author```
lyric mountain
#

the second param is the redirect url when someone clicks the icon

#

don't bother with it

soft laurel
#

cool cool. I assume that url isn't provided by the Discord API anywhere?

proven lantern
lament rock
lyric mountain
#

like, if I wanted to redirect you to google when u pressed on the author avatar

#

as I said, just ignore it unless you have an actual use

#

if u dont define an iconurl, the url will be the iconurl

soft laurel
#

ok cool. ty for the help

lyric mountain
#

yw

frank horizon
#

is it possible to see if a specific user id has left a review for the bot?

spark flint
#

Nope

#

Only votes

wheat mesa
#

When you receive an interactionCreate event, how do you tell if the interaction is a subcommand or a normal command?

lament rock
wheat mesa
#

And I assume that subcommand groups cannot have the same name as a normal command

lament rock
#

Why would that be the case?

hasty nest
wheat mesa
#

I mean that it wouldn't make much sense to allow a subcommand group to be named like permissions and then also have a command named permissions

pale vessel
#

it's still allowed regardless

wheat mesa
#

is it?

hasty nest
#

nope you can totally do that lol

wheat mesa
#

well that kinda sucks for processing

lament rock
#

Sub command groups are children of commands and have no direct relation to the commands themselves

wheat mesa
#

basically I'm trying to route commands to the correct method when I receive an interaction

lament rock
#

Yes. Sub commands are just options of root commands

#

the interaction should still be routed to the main command it's under

wheat mesa
#

oh?

pale vessel
#

it wouldn't be hard to check if the first option has type 1/2 and if it's a group, iterate through that option's options

lament rock
#

You can use multiple sub commands at the same time

#

trying to do separate logic is a fallacy

pale vessel
wheat mesa
#

wait wtf that's annoying

pale vessel
#

how do u do that in the client I suppose I misunderstood

lament rock
#

nvm I lied. I thought you could

wheat mesa
#

yeah I was gonna say that doesn't make much sense

lament rock
#

mb

#

It would be similar to the way you do multiple options

#

they're not in any particular order

#

and don't need to be linked to other options

wheat mesa
#

this was my general idea

#

this is similar to how detritus worked, I'm kind of trying to recreate it in djs since detritus is no longer actively maintained

lament rock
#

rip in pepperoni

#

Sub commands could technically be re-routed, you'd just have to check if the command has sub commands and if the sub command option is present and if there's a handler

#

const sub = interaction.options.filter(o => o.name === "subcommandname")
if (sub) reroutetohandler(sub)

#

something like that

#

idk if DJS indexes command options like I do in a Map

#

because having to filter every time is dumb af

wheat mesa
#

I would imagine they do since they have a get method for options

lament rock
#

Ok

#

I use the raw gateway and rest so like

#

Writing my own stuff

wheat mesa
#

Yeah I'm beginning to understand the appeal after working with djs

pale vessel
wheat mesa
#

djs has a method for getSubcommand() on the options prop, but annoyingly enough if there's no subcommand it throws an error

#

feels like it would be wrong to use a try catch for that sort of logic

pale vessel
#

provide false as first parameter to suppress the error

wheat mesa
#

ah

#

fair enough

#

I think that'll be enough to get the job done

#

thanks guys

sharp geyser
#

Then you dont have to deal with the idiocy that is djs

lament rock
#

There are plenty of good libs to make it happen for js.
A little sad that ditritus isn't being maintained anymore. They were the main people I was going up against with my npm libs

wheat mesa
#

Yeah it's sad

#

It was a great lib

#

Hoping cake will revive it someday

sharp geyser
#

Apparently using yarn makes it so discord.js can't be found thinkEGG

frosty gale
#

discord lib is a lot of work

sharp geyser
#

It is

#

which is why I opted to use discord.js for my current project cause I don't wanna deal with the voice gateway

frosty gale
#

esp since discord loves to push breaking changes to their apis often so you don't even know if it'll keep working

sharp geyser
#

ong

#

Love how discord still hasn't documented on receiving voice data

frosty gale
#

have they still not done that

sharp geyser
#

nope

frosty gale
#

I swear vcs are a big part of bots now

sharp geyser
#

just found out that its technically against the tos to receive voice data and use it but i've been told I won't get in trouble so shrug

#

only reason its considered against the tos cause they say you can't use any undocumented features

frosty gale
#

but I'd imagine it's similar to how it's done with the normal user account api so you'd have to analyse the network tab on how they do it

#

probably an opus stream or something knowing discord

frosty gale
sharp geyser
#

lol

#

its just an opus stream that I can convert to a mp3 file somehow

#

Thats the thing I can't figure out

#

not good with audio stuff

frosty gale
#

ffmpeg can probably do it lol

#

it can do just about anything video or audio related

sharp geyser
#

true

sharp geyser
#
        (async () => {
            const files = await this._getFiles(commandsDirectory, true)

            for(const file of files) {
                if(!file.endsWith('ts') || !file.endsWith('js')) continue;

                const commandPath = resolve(commandsDirectory, file);

                try {
                    let importedCommand = new (require(commandPath).default)

                    if(importedCommand instanceof Command){
                        this.commands.set(importedCommand.name, importedCommand);
                    }
                } catch (err: any) {
                    throw new Error(err)
                }
            }
        })()

@radiant kraken how well do you think this will work trollface

radiant kraken
#

looks good to me

radiant kraken
#

there are synchronous fs methods

sharp geyser
#

Cause I have no idea how to use those

#

so

#

don't really feel like converting my old code to use those synchronous methods

#

although I probably should

#

๐Ÿ˜ฉ

uneven violet
#

Hey..

#

Anyone wanna be friends??

deft wolf
#

Not really

uneven violet
#

Ok bye bye โค๏ธโค๏ธ

#

Feel loved forever please

deft wolf
sharp geyser
#
const commandsDirectory = resolve(join(__dirname, '../', '../', 'commands'));


        const files = this._getFiles(commandsDirectory, true)

        for(const file of files) {
            console.log(file)
            if(!file.endsWith('.ts') || !file.endsWith('.js')) continue;

            const commandPath = resolve(commandsDirectory, file);

            try {
                let importedCommand = new (require(commandPath).default)

                console.log(importedCommand instanceof Command)

                if(importedCommand instanceof Command) {
                    this.commands.set(importedCommand.name, importedCommand);
                }
            } catch (err: any) {
                throw new Error(err)
            }
        }

I am obviously doing something wrong because its not populating the commands collection

#

๐Ÿ˜”

radiant kraken
#

does it log

sharp geyser
#

fixed the issue

#

it was my if statement for checking if the file ends with .ts or .js

#

now I have a new issue thats related to yarn itself

#

๐Ÿ˜”

frosty gale
#

yaaaaaarn

sharp geyser
#

I like using yarn

#

but currently hate it

#

Error: Error: Your application tried to access src, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. this seems to be a yarn error but I don't quite know

#

all google searches result to it being a yarn error

#

yea wtf is going on with yarn

#

I can't even require my own folders/files

#

๐Ÿ˜”

#

Actually bout to make me give up on this shit can't be asked to swap to npm

frosty gale
#

pretty sure thats what yarn does

#

it also manages your project

#

not just your packages

sharp geyser
#

Yea but like

#

how tf do I solve this

#

Cause I have to require command files to load them

#

๐Ÿ˜ฉ

earnest phoenix
quartz kindle
#

last time i tried using anything thats not npm it just caused more issues than it solved

earnest phoenix
#

^

sharp geyser
#

well I swapped to npm but now im even more confused

digital swan
#

why not use pnpm

sharp geyser
#
/home/aaron/conference/src/core/structure/ConferenceClient.ts:40
                throw new Error(err)
                      ^
Error: Error: Cannot find module 'src/core'
Require stack:
- /home/aaron/conference/src/commands/public/PublicGroup.ts
- /home/aaron/conference/src/core/structure/ConferenceClient.ts
- /home/aaron/conference/src/core/structure/index.ts
- /home/aaron/conference/src/core/index.ts
- /home/aaron/conference/src/index.ts
    at new ConferenceClient (/home/aaron/conference/src/core/structure/ConferenceClient.ts:40:23)
    at Object.<anonymous> (/home/aaron/conference/src/index.ts:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module.m._compile (/home/aaron/conference/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Object.require.extensions.<computed> [as .ts] (/home/aaron/conference/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at phase4 (/home/aaron/conference/node_modules/ts-node/src/bin.ts:649:14)

this makes no sense.

#

I am not even requiring src/core

#

I am requiring commandPath which is /home/aaron/conference/src/commands/public/PublicGroup.ts

sharp geyser
earnest phoenix
sharp geyser
earnest phoenix
sharp geyser
earnest phoenix
real coral
#

can someone tell me what this means

#

i didnt quite understand it

earnest phoenix
real coral
#

ohh

#

alright

#

thank you so much

earnest phoenix
#

You're welcome

sharp geyser
# earnest phoenix What's the contents of that file?
import { Command } from "src/core";
import { SlashCommand } from "src/core/decorators/SlashCommand";

@SlashCommand({
    name: 'public',
    description: '',
    options: []
})
export default class PublicGroup extends Command {
}
earnest phoenix
earnest phoenix
sharp geyser
#

๐Ÿ‘€

earnest phoenix
#

You're basically importing a directory

sharp geyser
#

yea I figured that out just now aha

#

Although I am curious why my class decorator isn't doing anything

#

I am most definitely doing something wrong

earnest phoenix
#

Which actually resolves to index.js if it exists, though I think you have an incorrect path, you probably want to jump back a directory?

sharp geyser
#

they were auto imports

#

vscode fucked up the paths it seems

sly trellis
#

Opaa

earnest phoenix
#

Auto imports be messing things up as usual

sharp geyser
#
@SlashCommand({
    name: 'public',
    description: '',
    options: []
})
export default class PublicGroup extends Command {
}

now it seems the decorator isn't actually doing anything sadly

#

๐Ÿ˜”

#

I really dont understand decorators

radiant kraken
sharp geyser
#
import { ISlashCommandMetadata } from '../'

export function SlashCommand(metadata: ISlashCommandMetadata) {
    return function (constructor: Function) {
        for(const [key, value] of Object.entries(metadata)){
            constructor.prototype[key] = value
        }
    }
}

this definitely isn't the way to do it aha

earnest phoenix
radiant kraken
sharp geyser
#

or just code your own package manager and make it even more blazingly fast

#

just hire tim

#

he can make anything more performant

civic scroll
#

๐Ÿ’€

earnest phoenix
# sharp geyser ```ts import { ISlashCommandMetadata } from '../' export function SlashCommand(...

Today weโ€™re excited to announce the release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript smaller, simpler, and faster. Weโ€™ve implemented the new decorators standard, added functionality to better support ESM projects in Node and bundlers,

radiant kraken
civic scroll
#

i don't even know rust

radiant kraken
civic scroll
#

i don't know it enough

radiant kraken
civic scroll
#

nice

sharp geyser
civic scroll
sharp geyser
#

Im just trying to make my own class decorators ๐Ÿ˜ฉ

radiant kraken
#

but its a bit overkill

sharp geyser
#
Collection(1) [Map] {
  '' => PublicGroup {
    name: '',
    description: '',
    type: 3,
    nsfw: false,
    options: []
  }
}

I don't understand why the name is empty

#

the decorator clearly states that the name should be public

#

and I am adding onto the constructor prototype like everyone else does

#
Command { name: 'public' }
Command { name: 'public', description: '' }
true
Collection(1) [Map] {
  '' => PublicGroup {
    name: '',
    description: '',
    type: 3,
    nsfw: false,
    options: []
  }
}

I see its not actually being assigned to the PublicGroup class

#

its being assigned to the Command class

earnest phoenix
#

Hoho

pale vessel
#

@lavish fern test

lavish fern
#

?

pale vessel
#

nothing :)

#

if you need help you can just ask here btw

#

a lot of people will help

lavish fern
#

Oh thanks for knowing me about that

pale vessel
#

no problem

quiet flame
#

Quick q for fellow devs

#

how many of you have monetized your discord bots? And how's your experience been

#

I'm thinking of using Patreon just not sure if ppl will subscribe

lyric mountain
#

if u plan to give rewards for donations, patreon is the worst option

#

their api is just too bad to work with

quartz kindle
#

i've been using patreon for about 3 years now

#

but i dont use their api

#

i do everything manually

#

i will eventually move into something else in the future tho

quiet flame
#

They haven't rolled out Discord bot premium yet, it's currently in closed alpha. Once they do (if lol), then its better to do that without going anywhere external

quartz kindle
#

im planning on going full business mode with a dashboard and a payment gateway for subscriptions

quiet flame
#

but im more worried about the business side, if people will actually pay

#

so far my bot is on 250 servers and no patreon subs yet for premium features

quartz kindle
#

on average you will have 1 paying user for every 1-5k users

solemn latch
#

users are probably more likely to use discords built in feature.

quiet flame
#

1-5k users you mean users as server owners, or regular members?

quartz kindle
#

regular members, if you offer user-based premium

#

if its guild-wide premium, then its different

quiet flame
#

it's guild-wide premium, for more commands & customizations for server owners

#

maybe I should think about user premium

quartz kindle
#

well, i guess you can expect around 1 paying guild for every 1k guilds

quiet flame
#

ouch

#

thats a very low conversion rate

#

thanks for letting me know

quartz kindle
#

well, it depends a lot on the quality of your features

#

and how much people desire them

#

my bot is on 10k guilds, im getting like 25 bucks a month from patreon

quiet flame
#

@quartz kindle Are you advertising on top.gg? That's where most of my bot growth has been

#

but I think those might be low-quality users, hence not paying as often

quartz kindle
#

i dont pay for ads no, but i do have a bot page there

#

im not really interested in growing my bot at the moment tho

#

i have so much other things to do that i dont have time to manage my bot

#

so i rather it stays as it is

quiet flame
#

@quartz kindle I see, thanks. So it seems like a discord bot is not a very viable business

lyric mountain
#

it's not a reliable business, but u can make money off it

#

just don't hold your breath for it

quartz kindle
#

if you want to make a living with a discord bot, you need well over 100k guilds

proven lantern
#

premium bot subscriptions should make it easier once they release that

proven lantern
#

@solemn latch

solemn latch
proven lantern
#

why did you delete it!!!!

slender wagon
#

took me long enough to figure out that i couldn't log into postgres via the normal cmd

slender wagon
#

Lots of the bots are being replaced with what discord is implementing in discord

#

such as timeouts

proven lantern
#

is there a reason that setTimeout returns an object in nodejs? is there a way to serialize the object and save to a DB and then deserializing it later and call clearInterval?

solemn latch
proven lantern
#

that looks promising, thanks!

#

many success!

wheat mesa
#

anyone know of a free API to access real-time stock data? all of the options I've found suck ass for information that I would figure would be easily accessible to everyone

solemn latch
# wheat mesa anyone know of a free API to access real-time stock data? all of the options I'v...

This looks like it has a lot of info.
https://www.alphavantage.co/

wheat mesa
#

I got suggested Oanda

#

I think I'll go with oanda because this api above has a ratelimit of 5 requests per minute and 500 per day

#

Whereas oanda has 120 req/second

wheat mesa
#

welp turns out I can't use oanda because they only do forex and crypto, not real stocks

solemn latch
wheat mesa
#

Yeah, standard stock market data (preferably live data)

#

All of the APIs I've seen have some really shitty ratelimit

#

Either that or they're not free

#

I don't see why it's so hard to obtain public information like this

sharp geyser
#

Make your own api

#

You could even offer it to others and charge a price for higher limits smirk

wheat mesa
#

I can't make my own api without the actual data, I literally cannot find any api that doesn't have shitty ratelimits or doesn't cost 10 trillion dollars

#

Is this not publicly available information? Come on man

solemn latch
wheat mesa
#

wow that is absolutely ridiculous

solemn latch
#

They are a company, so I guess its not that insane.

wheat mesa
#

yippie guess my idea is dead now

#

what a giant waste of time

#

you would think that there would be some sort of api out there with a half decent free plan

#

most of them have limits of 250-500 requests per day which is absolute garbage

sharp geyser
#

were you trying to make a stock bot?

wheat mesa
#

A paper trading bot yeah

#

but this is what most free tiers look like

solemn latch
#

Would 300/10s 2000/10m 50,000/d work?

wheat mesa
#

unbelievably useless

#

Yeah

solemn latch
#
Nasdaq Data Link Documentation

When using the REST API for Time-Series, the following rate limits apply: Users who are not appending any API key to their Time-Series or Tables API call (ie. โ€œanonymous usersโ€) have a combined limit of 20 calls per 10 minutes and 50 calls per day. These limits are applied globally to all anonymous ...

#

Not sure if its real time however

sharp geyser
#

it seems to have a real time api endpoint tho idk if falls under the same rate limits and or is accessible without paying

wheat mesa
#

unfortunately this is only for access to their data tables

#

the real time data requires you to "contact a sales representative" aka 10 billion dollar fee

sharp geyser
#

tf is Visual C++

wheat mesa
#

same as C++

sharp geyser
#

bout to say

#

im about to just use Visual Studio for game development, jetbrains is wonky with Unreal

wheat mesa
#

man this is just capitalist inception, monetizing access to stock data

sharp geyser
#

welcome to america

#

surprised you're surprised

#

@wheat mesa I have a bot idea if you wanna do it, I was going to do it myself but I lost motivation already

wheat mesa
#

๐Ÿ‘€

sharp geyser
#

I can dm it to ya

wheat mesa
#

sure

soft laurel
#

When responding to a ModalInteractionEvent that originated from a ButtonInteractionEvent in the JDA library, should the deferReply() or deferEdit() method be used to defer?

#

And then when responding, Will it be just a reply() or a getHook().sendMessage()?

lyric mountain
#

Depends on what you'll be doing

#

Reply is for when you plan to send a message, edit for when you plan to edit the message

lyric mountain
tulip ledge
#

What is the maximum amount of options you can put in a select menu?

pale vessel
#

25

tulip ledge
#
    console.log(statusEffects.get(victim));
    console.log(statusEffects.get(victim).push({ effect: "sleep", turns: 3, startTurn: 1 }));

Anyone knows why this is happening???

#

I push to an array and it converts it into a number?

earnest phoenix
tulip ledge
#

yeah I just found that out aswell

cursive musk
#

how can i fix this nextjs issue? ive checked on multiple different sources and cant find the solution

#

and i cant even figure out what file or line is affecting this

solemn latch
#

Hydration issues happen when things differ between the server render and the client render.

For example if you have a date/time rendered that time might be different for the server and client.

Things like jsx errors can cause it, or time could render different on the server.

It can be hard to find what causes it, typically the browser console is your best option.

cursive musk
#

hmm, i can see the error but theres no way for me to find out which <a> tag lmao

solemn latch
#

๐Ÿ‘€ thats something I've never seen

Typically any IDE would be screaming about that

sage bobcat
#

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.

peak drum
sage bobcat
#

One message removed from a suspended account.

peak drum
#

Share your issue and someone who knows something about it will probably help you

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

sage bobcat
#

One message removed from a suspended account.

small tangle
#

๐Ÿง‚ there you go

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

frosty gale
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
sage bobcat
#

One message removed from a suspended account.

frosty gale
#

not sure if that's what you're doing

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
#

@wheat mesa gotta love some backus-naur

wheat mesa
#

Damn

lyric mountain
#

need to learn how to work with ASTs to be able to parse my card formulas into readable descriptions

wheat mesa
#

ASTs my beloved

#

CSTs my unbeloved

spark flint
#

LAST

uneven tartan
#

TRUE

spark flint
#

xwass smells

uneven tartan
#

better than u

frosty gale
#

what is ast

wheat mesa
#

Abstract syntax tree

lyric mountain
#

but I think I confused ast with parser tree

#

the latter is what I technically need

wheat mesa
#

Itโ€™s the same thing

lyric mountain
#

ah, some people in SO were like "ast and parser tree are different yada yada"

proven lantern
#

what would be a good way to visualize a tournament bracket using discord embeds?

#

i guess the whole thing doesn't need to be shown like this. it could just show the current matches and wait until all matches have been recorded, then show the next set of matches until the tournament is over

slender wagon
#

ayo guys i am working on my first webhook

#

crazy right???

frosty gale
proven lantern
#

lambda should suport it though

solemn latch
solemn latch
#

what?

#

๐Ÿ‘€ that image has nothing to do with dangerouslysethtml

spark flint
#

and like woo said has nothing to do with that image lol

proven lantern
proven lantern
#

i cant really test this, but it should work hopefully

frosty gale
tulip ledge
#

Is there a way to like map a parent method?
eg.

class Parent {
  public foo() {
    return 2;
  }
}

class Child1 extends Parent {
  public foo() {
    return Parent.foo() * 3;
  }
}

class Child2 extends Parent {}

console.log(new Parent().foo()) // 2
console.log(new Child1().foo()) // 6
console.log(new Child2().foo()) // 2
sharp geyser
#

I mean

#

thats not how that works

tulip ledge
#

I know

#

but i'm asking if there's a way to do that

sharp geyser
#

pretty sure yea

#

tho that might just be my C#/C++ talking

tulip ledge
#

because I have a parent class that has a method that runs a formula and in one of the child classes I want to double it

#

ah I asked good old gpt and apparently you use the super keyword

sharp geyser
#

yea

#

I was just trying to figure out how it works in js

#

I wasn't sure if it was super().foo() or super.foo()

#

or if its done differently

tulip ledge
#

yeah so It's like

class Parent {
  public foo() {
    return 2;
  }
}

class Child1 extends Parent {
  public foo() {
    return super.foo() * 3;
  }
}

class Child2 extends Parent {}

console.log(new Parent().foo()) // 2
console.log(new Child1().foo()) // 6
console.log(new Child2().foo()) // 2
#

but yeah thank you!

sharp geyser
#

yea

#

tho

#

doesn't js require you to have a constructor that calls super as well?

tulip ledge
#

mmmmh don't think so actually

sharp geyser
#

weird

#

I haven't used js in a while