#development

1 messages Β· Page 2012 of 1

hallow idol
#

A

#

And?

quartz kindle
#

and you are giving it this { client_id: string | boolean; client_secret: string | boolean; grant_type: string; redirect_uri: string | boolean; code: string; scope: string; }

earnest phoenix
#

can client secrets/ids be bools ?

quartz kindle
#

no idea

hallow idol
quartz kindle
#

the error you showed should have information about what file and what line that happened on

#

you didnt show that part

civic scroll
#

man gave boolean on string

#

@quartz kindle i love it when people don't understand type errors

earnest phoenix
civic scroll
#

but he doesn't understand

#

Β―\_(ツ)_/Β―

quartz kindle
#

i dont think thats it

#

i think hes trying to pass a full object to a function thats expecting a string

civic scroll
#

yeah

earnest phoenix
#

Well the error states it can take more than a string by the looks of it unless I am reading it wrong which I very well could be as the error looks weird on my device

quartz kindle
#

yeah it can, but by the looks of it its expecting some kind of url thing

#

url search params, query params, record<string,string> looks like it

earnest phoenix
#

Well he can pass in an object but the key and values MUST be strings

civic scroll
#

troll and put a Symbol instead

#

xd

quartz kindle
#

le

#

l

earnest phoenix
#

I might be reading the error wrong but I think all he needs to do is not set client_id and client_secret to be of type string | boolean and just be string

neat ingot
#

~ just seen the trailer/gameplay footage for the new harry potter game 'hogwarts legacy'. ngl, kinda hype for that! I didnt even know they were making such a game! πŸ™‚

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

neat ingot
#

they are developing it rn...

lyric mountain
#

Didn't u learn from the past hypes?

neat ingot
#

I was fortunate to avoid the cyperpunk hype, but that seemed like a rough one if you got caught in it

lyric mountain
#

The only game that survived the hype recently was elden ring

neat ingot
#

also escaped the ff7 remake hype lol

lyric mountain
#

Every other hyped game failed miserably

neat ingot
#

yea that seems to be holding up ~ not played it myself, but my young brother loves it

lyric mountain
#

It's an open world dark souls

neat ingot
#

i quite enjoyed legends arceus, until there was no story left lol 😐

#

have you need the footage for the new hp game though? it looks really nice. if it can do half of what they boast well, it should be a good game

lyric mountain
#

The only games I'm hyping but with a layer of guarantee are ksp 2 and poe 2

neat ingot
#

but ofc, they can ruin it just as easily

earnest phoenix
#

elder ring sounded interesting but was too expensive for me at the time

lyric mountain
#

Br?

earnest phoenix
#

?

#

my brain to slow to process what br means other than bot reviewer these days

lyric mountain
#

I mean, I thought u were cuz elden's price here is awfully expensive

earnest phoenix
#

It was 60$ when it first hit the steam market idk what it is now

lyric mountain
#

Now imagine here where our currency is $5 per R$

earnest phoenix
#

so like 300$ for you guys or?

#

oh no almost 300 tho

#

289

neat ingot
#

dang

#

thats pretty rough

lyric mountain
#

That's like 1/5 base salary

earnest phoenix
#

did u buy elden ring?

dry imp
#

why not pirate troll

lyric mountain
#

Where home gas is R$100, gasoline hitting $4/l

#

Everything heavily taxed

#

Our president doing coin devaluation speedrun any%

neat ingot
#

i live in the uk - here they tax our tax πŸ˜„

lyric mountain
earnest phoenix
dry imp
#

fair

neat ingot
#

sems fair

earnest phoenix
#

like i'd pay for fallout 4

#

but fallout 3 and 2 fuck that

lyric mountain
#

Fallout 3 is good

earnest phoenix
#

I pirated those two just to see what it was like

#

it was pain

#

I didn't like the mechanics they had

crimson vapor
#

Pirating is only okay from big corporations on overpriced shit

lyric mountain
#

Like any ea game

crimson vapor
#

Correct

earnest phoenix
#

Ima pirate among us /s

crimson vapor
#

a lot but not all

neat ingot
#

last ea game i pirated was some need for speed game, it was not worth pirating nvm buying πŸ˜„

crimson vapor
#

Among us is ok to pirate

lyric mountain
#

Need for speed only decayed after underground 2

#

Riders on the storm

neat ingot
#

og most wanted was nice

lyric mountain
#

I miss times when you bought the game and received the whole game

earnest phoenix
#

lmao

#

Buy this gamepass to get these features

lyric mountain
#

That's why I stick to indie games

#

Like, dlcs are fine

neat ingot
#

tbh, yea. companies are way too happy to ship barely coded proof of concepts to customers and call it a beta

lyric mountain
#

But damn fuck lootboxes and ingame purchases

earnest phoenix
#

I like games where they give you the full game but make addons to make it a bit more fun

lyric mountain
#

I like what poe did

#

Everything is only obtainable ingame

#

Micros are only cosmetic

#

And u can't buy any kind of advantage

earnest phoenix
#

Didn't microsoft recently acquire Bethesda?

neat ingot
#

best that way

lyric mountain
#

Nor trade skins for items

#

Plus they give skins if u hit certain achievements during challenge leagues

earnest phoenix
#

ye microsoft did acquire bethesda

#

welp say good bye to any good games πŸ˜”

#

I wonder what a game from elon musk would look like

lyric mountain
#

There's noita sir

#

Noita is worth every penny

solemn latch
#

Very development

dry imp
#

lmao

earnest phoenix
#

I am unsure if the game is breaking or if that is meantt to be a thunder storm

#

Can we all agree subnatica is a good game tho?

#

It takes the fear of the sea with open world + a damn good plot

lyric mountain
lyric mountain
quartz kindle
#

i tried noita but didnt really got into it

lyric mountain
#

Context: I shot 18 nukes at the same time

quartz kindle
#

lmao

lyric mountain
#

It's almost like coding, but with spells

earnest phoenix
#

Hmmm

#

Well I can't play games anyway

#

I am on linux

lyric mountain
#

Wine

earnest phoenix
#

I tried setting up wine and failed

#

It broke my system last time

dry imp
#

mac catalina also cant use wine

earnest phoenix
#

so I am good with just not playing games for now as I don't even have any games I wanna play anyway

dry imp
#

sad

#

had to install crossover

earnest phoenix
#

If I can get roblox to work on linux i'd be happy

#

there is this one game on roblox I play sometimes when im bored

lyric mountain
#

There's also proton

earnest phoenix
#

tf is proton

dry imp
#

i pirate crossover cus its 20 dollhair and im broke

earnest phoenix
#

you mean that steam play stuff?

lyric mountain
earnest phoenix
#

I tried that

#

got a bunch of errors

lyric mountain
#

Weird

earnest phoenix
#

Something bout DirectX 11 not being installed

lyric mountain
#

Did ya install dx11?

earnest phoenix
#

Idfk how

lyric mountain
#

Oh nvm, windows only

#

But u could try using that steam os

#

In dual boot

earnest phoenix
#

Also I can't even get into my steam account rn

#

2FA it and swapped phones

austere surge
#

f

dry imp
#

play roblox then

lyric mountain
earnest phoenix
#

I did but misplaced them sadly

lyric mountain
#

Tf

earnest phoenix
austere surge
#

this i swhy you keep multiple copies

lyric mountain
#

Make a private repo and store them there

dry imp
#

there is crossover for linux

#

for mac its pretty good dont know abt linux one tho

austere surge
#

buggy

dry imp
#

wine is always buggy

austere surge
#

yes

earnest phoenix
#

never heard of crossover

dry imp
#

its paid

#

its wine but better ig

earnest phoenix
#

60$ what a rip off

dry imp
#

i pirate troll

earnest phoenix
#

nice

dry imp
#

but it is much better than wine or playonmac

#

much much better

earnest phoenix
#

why even use crossover for mac

dry imp
#

easier aswell

earnest phoenix
#

a lot of games support mac now a days

dry imp
#

catalina

#

sucks ass

#

most app dont have 64 bit, while catalina only support 64bit now

#

like i dont want to use my other laptop just for a simple editing task

earnest phoenix
#

I almost asked what is catalina but forgot apple likes to name their os versions weird shit

dry imp
#

yea

earnest phoenix
#

Well idek where I would pirate crossover if I wanted to so πŸ€·β€β™‚οΈ

dry imp
#

i dont even know if it runs well on linux, try the trial version ig

earnest phoenix
#

I would but I gotta give em info I don't want to give

dry imp
#

understandable

#

have you tried playonlinux?

earnest phoenix
#

Yes

dry imp
#

same problem as wine?

earnest phoenix
#

I could really just swap back to windows there is no practical reason for me tot use linux

#

I just find linux nicer

dry imp
#

yea

#

i use crossover cuz my windows laptop loads hella fkin slow, like i might die first before opening the app

earnest phoenix
#

Should I swap back to windows πŸ€”

austere surge
#

mabe

earnest phoenix
#

I think I might

dry imp
#

then u should

earnest phoenix
#

Where does windows store ssh keys?

lament rock
#

does Windows even have a built in ssh client

earnest phoenix
#

I think it has one built in ye

austere surge
#

it do

earnest phoenix
#

it do

austere surge
#

never knew that

earnest phoenix
#

It uses openssh iirc

austere surge
#

is there any point in ssh to windows

earnest phoenix
#

Wdym?

austere surge
#

what can you do in the windows command prompt

earnest phoenix
#

I mean dont you need it to ssh into other things?

austere surge
#

i mean

#

going from a machine to windows

boreal iron
earnest phoenix
#

Hello everyone

civic scroll
boreal iron
# austere surge is there any point in ssh to windows

It’s usually being used in subnets only but editing a firewall rule and adding the remote system to the trusted host list allows you external access to the remote command prompt which actually is full access.

split hazel
onyx socket
#

Hello, so i want to make a error_handler file that handles the error that are not handled by local error handlers. ||so many handle|| Like i have a command called do_the_thing and it has a local error_handler to handle an error specific to that command. And i have a error handler file that handles more generic errors that may cause during the command execution. But the thing is i want global error_handler to only run for those error that are not handled by local handler.
For example error A is specific to do_the_thing command so its handled by its local handler. But DisabledCommand error is also possible. So i want if error A is raised, its handled only by local handler and if DisabledCommand error is raised then its handled by global error_handler.
Ik there is a way to check if local handler if present then don't executed the global handler but thats not what i want, cz then it will then don't handle the unhandled exceptions by the local_handler.

#

Here in the cry command, if any argument is missing then i want to send an embed explaining about the error. This explanation is different for each command. But there are some errors like DisabledCommand, NotOnwer that i want to be handled by the global handler cz adding those to every local handler feels odd.

daring cedar
#

Guys guys how do I check if a category exists in discord js ?

sharp saddle
#

well

daring cedar
#

hm?

sharp saddle
#

I've been looking right now, and I haven't found anything about it.

daring cedar
#

Yeah lmao

sharp saddle
daring cedar
#

Google has about channels

sharp saddle
#

oir

#

oir

#

or*

daring cedar
#

Hm should I try the channel method for category lol ?

#

.equals(channel)

#

This one

sharp saddle
#

wait a sec

daring cedar
#

Oki

sharp saddle
#
var category = message.guild.channels.cache.filter(c => c.type === "GUILD_CATEGORY").get("<category_id>")

if(!category) return console.log("category does not exist");

console.log("category exists")```

I think it works, I haven't tested it, and I won't test it ![KEKW](https://cdn.discordapp.com/emojis/727825308404940800.webp?size=128 "KEKW") ![KEKW](https://cdn.discordapp.com/emojis/727825308404940800.webp?size=128 "KEKW") πŸ’€
daring cedar
#

Hm I think in type we only use category

#

Nvm I will try both

#

Oh um

#

Nvm

#

Did not work ooff

sharp saddle
#

oif

#

oof

#

let's wait Tim appear

daring cedar
#

Β―_(ツ)_/Β―

bright hornet
#

console.log the category

near stratus
sharp saddle
#

I always did this

near stratus
#

it might return true to anything

near stratus
sharp saddle
hybrid cargo
#

Could someone help me with this and explain what's wrong please? New to Py and trynna do a project for my uni
I am trying to install pystan pip intsall pystan and I am facing this error

lyric mountain
#

install cython first

#

every single time something appears here you need to install it first

dry imp
#

true

lyric mountain
#

idk if there's an automatic way, but may odin save you should you need to install a lib with many dependencies

dry imp
#

wait i thought pystan is for linux and macos

hybrid cargo
sage bobcat
raw nest
#

How can I stop a map?? I thought it work if I just return if true but the map keeps still going.

#

in JS*

arctic solar
#

i got a question

#

how to fix this?

civic scroll
civic scroll
arctic solar
#

do i need to sign out?

raw nest
civic scroll
raw nest
#

that means?

civic scroll
#

the predicate function didn't return anything

raw nest
#

how to fix it then?

civic scroll
#

consider using a loop for this instead

raw nest
#

aight

arctic solar
#

how many times do i reload?

civic scroll
#

also

#

i just noticed

#

you have a syntax error

raw nest
#

what?

#

you mean because of "&" and not "&&"?

civic scroll
#

yeah

raw nest
#

no it's right

#

it's about bitewise operators

civic scroll
#

ah bitwise?

raw nest
#

yes

civic scroll
#

you use AND?

raw nest
#

exactly

civic scroll
#

ah i see

#

but

#

perm is surely a string of numbers right?

#

then good to go

raw nest
#

yes it works now! Thanks alot <3

civic scroll
#

yw :)

quartz kindle
#

array methods (such as map filter forEach reduce) can only be canceled by throwing an error inside them

carmine summit
#

hello! does anyone know why my for loop doesnt change the original array?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

carmine summit
#

logs the changed player

#

but didnt change in the original array

lyric mountain
#

please, send the whole thing

carmine summit
#
blue = data.players.blue.sort((a, b) => a.party_id.localeCompare(b.party_id));

      for (let i = 0; i < blue.length; i++) {
        player = blue[i];
        party = seenParties.find((a) => a.party_id == player.party_id);
        if (party != undefined) {
          player = { username: `${player.name}${player.tag}`, party: seenParties.indexOf(party) };
          oldplayer = blue[i - 1];
          oldplayer = { username: `${oldplayer.username}`, party: seenParties.indexOf(party) };
        } else {
          seenParties.push({ party_id: player.party_id });

          player = { username: `${player.name}${player.tag}` };
        }
        console.log(player);
      }

      console.log(blue[0]);
lyric mountain
#

man lemme format that because reasons

sharp saddle
#

Hey goys

#

Doing this here, is it legit?

const message = JSON.parse(d.config.welcome.message);
		message.split("{user.username}", member.username)```
lyric mountain
#
blue = data.players.blue.sort((a, b) => a.party_id.localeCompare(b.party_id));

for (let i = 0; i < blue.length; i++) {
    player = blue[i];
    party = seenParties.find((a) => a.party_id === player.party_id);
    
    if (party) {
        player = {
            username: `${player.name}${player.tag}`,
            party: seenParties.indexOf(party)
        };

        oldplayer = blue[i - 1];
        oldplayer = {
            username: `${oldplayer.username}`,
            party: seenParties.indexOf(party)
        };
    } else {
        seenParties.push({
            party_id: player.party_id
        });

        player = {
            username: `${player.name}${player.tag}`
        };
    }
    console.log(player);
}

console.log(blue[0]);
#

way better

sage bobcat
lyric mountain
carmine summit
#

shouldnt it be a reference?

sharp saddle
lyric mountain
#

not really the way you think

#

this isn't "valid" in the way you expect

#

when u do that ur just replacing the variable

sage bobcat
#

One message removed from a suspended account.

civic scroll
#

i mean @carmine summit

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

civic scroll
#

blue[i - 1] = ...

sage bobcat
#

One message removed from a suspended account.

civic scroll
#

i know

#

mentioned by mistake

#

sorry

sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

kekw, she mentioned mine cuz I reformatted it

civic scroll
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

carmine summit
#

is there any reason it copied instead of referencing?

lyric mountain
#

because arrays are...well...arrays

civic scroll
lyric mountain
#

by changing one variable you don't change the whole codebase

sage bobcat
#

One message removed from a suspended account.

carmine summit
sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

it's like doing ```js
let a = 50
let b = a
b = 20

console.log(a) // will output 50 not 20

civic scroll
sharp saddle
carmine summit
dry imp
#

grats

sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

arrays hold references, but (ik this is a thing in C++ tho) you can't replace the reference with a new reference

#

that's something to be done with pointers

sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

πŸ‘‰πŸ‘ˆ

civic scroll
#

final code, with optimisations

blue = data.players.blue.sort((a, b) => a.party_id.localeCompare(b.party_id));

for (let i = 0; i < blue.length; i++) {
    const { party_id, name, tag } = blue[i];
    party = seenParties.find((a) => a.party_id === player.party_id);
    
    if (party) {
        const party_index = seenParties.indexOf(party);
        player = {
            username: `${name}${tag}`,
            party: party_index 
        };

        blue[i - 1] = {
            username: `${blue[i - 1].username}`,
            party: party_index 
        };
    } else {
        seenParties.push({
            party_id,
        });

        player = {
            username: `${name}${tag}`
        };
    }
    console.log(player);
}

console.log(blue[0]);
#

@carmine summit

lyric mountain
#

bro tip: use and abuse formatting, longer (as in, more tabs and newlines) code won't make it slower

#

source code is for humans to read, computer will see only bytes anyway

cinder patio
#

Anyways anyone knows why this doesn't work:

        readline.cursorTo(process.stdout, 0, -lines, () => {
            readline.clearLine(process.stdout, 1, () => {
                res();
            });

It's supposed to clear the last lines lines but it's not doing anything

quartz kindle
#

Call rl.commit() to see the effect of this method, unless autoCommit: true was passed to the constructor.

cinder patio
#

I haven't passed it, no

#

but what constructor is it talking about πŸ€”

#

oh that's for the promise API only

#

and I'm not using it cause it's experimental

quartz kindle
#

ah

stone wharf
#

hi can someone help me to use the top.gg api for a "premium" command im trying to make
in discord.py

delicate sky
#

Lol

boreal iron
#

Imagine if you send your phone to a repair service, tell them explicitly only to change to display and when issue occurs, contact me.
With some notes, the private and business data on that phone is fucking important - why I can't send an unlock code tho - which isn't needed to replace a screen.
And the stupid repair service happily annouces your phone is on it's way back to you...
You open the box and see the note, "Your phone got replaced and your new phone get successfully tested"
And imagine the service provider tells you, "We're sorry but it's how it is, now - your data is gone, your old phone got reset already"

sudden geyser
#

You have an iPhone or something

#

If so that's common

boreal iron
#

Well it's not, it's not really an issue to replace parts, at least in older phones, which is one I have

sudden geyser
#

It's because it's easier to automate and manage

#

For the company

#

They don't give a shit about you or your data

boreal iron
#

Dude you don't seem to get the issue, the old phone got reset

#

It got reset to get repaired and/or use the parts in other phone

boreal iron
#

That's just breaking the law, not more or less

quartz kindle
#

sue them

#

claim 100k in damages due to loss of important business data

boreal iron
#

I do... but that's just an ongoing process which can take years in my country

#

ffs

#

I could cry...

quartz kindle
#

extra 100k in legal fees and lengthy processing

#

extra 100k for emotional distress

boreal iron
near stratus
boreal iron
#

I haven't send the phone to a manufacture

#

But to a repair service station which means we actually had a contract about what to do and what not

#

I wasn't able to backup some data encrypted in specific apps due an app issue

near stratus
#

ff

quartz kindle
#

most phones are impossible to backup with a broken screen

#

because they require you to unlock it to allow usb connections for example

#

and sometimes you cant unlock it if screen doesnt work

boreal iron
#

nah that wasn't the issue

#

The app had an internal issue

#

The encrypted data in the app can only be transfered to a different phone directly, not through clouds etc.

#

And it was literally 22GB of data

quartz kindle
#

dafuq kind of app is that lol

boreal iron
#

a specific app respecting privacy and important data to not be shared anywhere

#

I mean I've got a 2nd phone here laying around and whenever and issue happens with phone nr. 1 I always transfer the current data

#

didn't really have an issue the last 10y or more I can think of

#

phones don't actually die instant if you don't drop them from floor 15 to the ground

cinder patio
#

man lost 22GB of porn

near stratus
#

true pain

boreal iron
#

if it would only be porn...

#

wouldn't be that sad

cinder patio
#

that's so annoyint

wheat mesa
#

ok so I kinda like the way C is structured

#

I feel like it’s a lot easier to pass data around for certain things (in this case chunks of opcodes) and see the flow

#

(Don’t judge replit, I took the screenshot from my phone and I only use it so I could work on it everywhere)

#

Although C seems to let you get away with things that you probably shouldn’t be allowed to get away with, and only gives a warning for it

cinder patio
#

Looks like standard C-like syntax to me Β―_(ツ)_/Β―

wheat mesa
#

I meant more or less passing the Chunk to the functions instead of instantiating it like a traditional object and using accessor/mutator methods on it

#

Something about it just feels kinda nice

cinder patio
#

You can do this in every lang tho

#

This is just a more functional approach

wheat mesa
#

But it’s more standard when you don’t have the option to use OOP

#

In most languages that have the ability to do OOP, I choose that

#

I’m not really used to writing functional

#

But I kinda like it

cinder patio
ancient nova
#

hi people

#

does anyone have an idea for a cool project I could do πŸ€”

earnest phoenix
#

A cool project idea generator that gives you cool project ideas

wheat mesa
#

write a complete Rust compiler faster than the current one

wheat mesa
ancient nova
wheat mesa
#

Nah it’s probably like 10 lines of code tbh

ancient nova
#

for an entire compiler?

wheat mesa
#

An entire rust compiler

ancient nova
#

whaaat

wheat mesa
#

:troll:

#

That’s not even the compiler, that’s just the grammar

cinder patio
wheat mesa
#

It’ll require quite a bit of research depending on how complex you want to make it but I would highly recommend it

cinder patio
#

It can be either really easy or really hard deoending on how far you want to go with it

#

interpreted language? Pretty easy
interpreted language + JIT? Yeah this is hard.
compiled? Even harder

wheat mesa
#

And if you want to delve really deep into the concept, the Dragon Book is a classic resource for doing so

sudden geyser
#

Make a lisp IruSmile

cinder patio
#

ew :c

willow aspen
#

Is there a way to sync permissions with the parent category when using https://discord.com/developers/docs/resources/guild#create-guild-channel ? I am passing the permissions overwrite for the user permissions I want applied which is working but the permissions are not synced with the parent.
Essentially doing exactly what the Sync Now button does. https://chicksgold.gyazo.com/9a3fb6b60a8fd29d8e654a5d5c289100 but with the API request , or a subsequent one if needed.

Discord Developer Portal

Integrate your service with Discord β€” whether it's a bot or a game or whatever your wildest imagination can come up with.

proven lantern
#

Has someone made a tool that registers and updates slash commands in bulk? I have a json file for each slash command grouping. Whenever I make a change to the json files I manually do a GET of my commands to find the current ID for that command. Then I do a PATCH to that command with the new json for that command. I'm thinking about building a tool that will read all my json files and synchronize them with discord using the above method. Has someone already made this?

lament rock
#

Sounds like that would be heavy towards rate limit buckets if you have to restart multiple times

#

Also, that code could run on each shard/cluster which can overlap

#

I just have a REPL function that PUTs all of the commands

proven lantern
near stratus
lament rock
#

PUT all updates all

#

and deletes unused

near stratus
wicked pivot
#

Possible to edit a response to an interaction?

proven lantern
lament rock
#

Do you need it to be instant?

proven lantern
split hazel
#

sometimes there are some things you need to do that you cant do in higher level languages like c++

split hazel
#

i was afraid you'd ask that

#

i dont have an example rn

#

but i ran into that situation once

#

i had to use hacky c++ syntax to be able to do something where the alternative was worse performance

#

such as transforming pointers multiple times in a line so the language still compiles

cinder patio
#

I think you should ask yourself if you should do something like this in the first place

#

99% of times you don't

split hazel
#

i'll try find it tho

#

i dont usually run into situations like this

#

i think it was with templates

#

ah i found it

#

the alternative was another similar class but i got lazy

#

basically theres a template which takes in either primitive types or pointers

#

if its a pointer, do something special with it

cinder patio
#

I see

split hazel
#

but templating doesnt really discriminate

cinder patio
#

you could use a std::variant

split hazel
#

no std library present

#

my operating system

cinder patio
#

you could write an implementation for a type-safe union yourself then

split hazel
#

i'll add that to my list

cinder patio
#

Though there's always a little memory overhead when using those. Depends on the types stored in it really

#

But if it's only primitive and pointers then it should be minimal

split hazel
#

yeah what i thought

#

function call overhead too right?

cinder patio
#

Like setting and retrieving the value? I wouldn't worry about that

split hazel
#

i worry about that kind of stuff especially if it can be called many times in a single second

#

yeah function calls are very optimized and have virtually no overhead but still something to think about

#

it all adds up

#

though i can imagine that is something you can inline easily

cinder patio
#

not if they're inlined and the compiler is more likely to inline them if they're short + get called a ton

#

yeah

split hazel
#

can i just vent something

#

i hate looking up support for problems with windows on google

austere surge
#

ye

split hazel
#

you either get people who dont know what they're talking about offering help and/or get directed to a massive article that might as well be its own book

sudden geyser
#

have you tried installing linux

austere surge
#

^ much easier than fixing windows

split hazel
#

im locked in 😠

#

on my pc i have linux but i also have windows for games and office

sudden geyser
#

or mac if you're rich

split hazel
#

and on my laptop i need windows because of various features + office

#

the surface pro was kinda designed to run on windows

#

so features such as infrared face ID probably wont work

#

not as important but an example

sudden geyser
#

yes and touch id + touch bar on my machine won't work if I install any linux distro

#

kind of a known price you pay for running other os's

split hazel
#

drivers not being standardized really sucks

lyric mountain
white fossil
#

why am i getting this error when connecting with topggpy?

  File "main.py", line 3, in <module>
    from helpers import constants, embeds, helper
  File "/home/runner/scare151/helpers/embeds.py", line 1, in <module>
    import discord, time, datetime, main
  File "/home/runner/scare151/main.py", line 28, in <module>
    client.topgg_webhook.run(4355)
  File "/home/runner/scare151/venv/lib/python3.8/site-packages/topgg/webhook.py", line 161, in run
    return self.bot.loop.create_task(self._run(port))
  File "/home/runner/scare151/discord/client.py", line 110, in __getattr__
    raise AttributeError(msg)
AttributeError: loop attribute cannot be accessed in non-async contexts. Consider using either an asynchronous main function and passing it to asyncio.run or using asynchronous initialisation hooks such as Client.setup_hook```
white fossil
# dry imp code?
client = commands.Bot(intents=discord.Intents.all(), help_command = None, command_prefix = get_prefix, case_insensitive = True) 
topgg.DBLClient(token=os.environ.get("DBL_TOKEN"), bot=client).set_data(client)

async def load_cogs(cogs):
  for cog in cogs.items():
    await client.load_extension(cog[1])

@client.event
async def on_dbl_vote(data):
  user = await client.get_user(data['user'])
  embed = discord.Embed(color=color.color, description=f"new vote from **{user}**")
  send_to_webhook(embed, ping=False, webhook_url=os.getenv('VOTE_LOG_WEBHOOK'))
  try:
    await user.send('thanks for voting for **scare**, you recived `25,000 πŸ’΅`')
    mongo.update_coins(user.id, mongo.get_bal(user.id) + 25000)
  except:
    pass```
timber fractal
#

I'm using discord-rpc to try and connect to a local device with rpc, but it keeps giving an error: connection closed. Any ideas? I tried bot of these:

const rpc = require('discord-rpc');
// I tried this
const client = new rpc.client({transport:'ipc'});

// And I tried this
const client = new rpc.client({transport:'websocket'});
``` Any ideas?
wheat mesa
#

because you're using websocket

#

websocket doesn't work

#

only ipc works

neat ingot
#

speaking of rpc...

#

I'm trying to pick a license for my rpc app project so i can upload/release it

#

but idk which license i should pick 😦

#

which license would be: do what you want except sell the software, and keep original copyright notice and attribution in tact?

neat ingot
#

~ ended up just adding a 'dont sell' clause to the bsd 3 clause license πŸ˜‚

sudden geyser
#

can you even call it bsd by including that?

neat ingot
#

i dont have to call it anything, its the license. now, weather it would stand up in court is another story. idk, im not the best with license type things πŸ˜„

#

you can just roll your own if you want

#

but it may not be as legally binding as you hoped

sudden geyser
#

yeah, rolling / including your own clause in there was the best option

#

given there's no oss license that actually prohibits commercial use

#

at least commonly used

neat ingot
#

yea lol. like, im more than happy for someone to download the code, edit, use it, whatever, ilearn from it idk, just dont try sell it as your own app πŸ˜„

sudden geyser
#

then again, I've seen people flat out alter their licenses to exclude certain individuals/companies from using their software

neat ingot
#

imo a lot of people assume open source = free to use commercially

#

lmao yea, i have heard of such. specifically large companies freeloading from open source community ran projects

sudden geyser
#

the one I have in mind included microsoft

#

later that day or a few days later someone from microsoft actually pulls up an issue on the repo since they use it

neat ingot
#

lmao nice

wheat mesa
#

didn't microsoft edit someone's copyright out of their code lol

#

the only change in a pull request

neat ingot
#

tbf, theres evidence to support og windows was basically a rebranded os

sudden geyser
#

yeah that was a mistake

#

was a bot

quaint rampart
#

how can i make my node-fetch requests faster?

earnest phoenix
quaint rampart
#

and ill let you know

boreal iron
bright hornet
neat ingot
#

I'm bored. whats folks upto? πŸ™‚

sudden geyser
#

crying over university tuition

neat ingot
#

want some help? I can hold the tissues! πŸ™‚

sudden geyser
#

sniffs

civic scroll
#

AMONG US

neat ingot
#

never tried that game 😐

#

i did however code a js lighting system exactly like the one they use πŸ˜„

lament rock
#

light mapping

#

fun

boreal iron
#

if(!data == …)

karmic oasis
#

^

#

Was just gunna say

boreal iron
#

Try to think of what that would mean

karmic oasis
#

What’s data

#

Line 7 & 9 conditionals are sus

boreal iron
#

As long as data exists and isn’t 0 you’re always creating a new array

#

See line 10

karmic oasis
#

Could try === if they correct

#

Really depends what data is meant for

#

But the ! Indicates it’s bool

#

So false data == item literal

#

Idk

#

Gl

bright hornet
#

its not bool

craggy pine
#
if(!data == `${item.id}`)

This line doesn't make a lot of sense to me.

karmic oasis
#

The ! Confusing

boreal iron
craggy pine
#

if not data is equal to item.id -> do thing?

#

shouldn't it be...

karmic oasis
#

Yea it’s weird to me too

craggy pine
#
if(data !== `${item.id}`)
karmic oasis
#

^

craggy pine
#

ill clean it up a tad just because idk ur code 100%

boreal iron
#

If his database result == his item that message would make sense

karmic oasis
#

Should check if data has val && same

craggy pine
#
if(data && data === `${item.id}`)
#

is that what you're refurring too?

karmic oasis
#

That’s better

#

Better to check for val first

#

Then check if same

boreal iron
#

===

karmic oasis
#

^

#

Yus this too

boreal iron
#

Respect his message

craggy pine
#

ah i see now.

boreal iron
#

!== doesn’t make any sense regarding that message

craggy pine
#

ya i see his return msg

bright hornet
#

uhh

karmic oasis
#

Yea I agree he saying if they same already have

craggy pine
#
    if(data) {
        data.items = []
        data.items.push()
        data.save()
    }
#

Then you have this.

karmic oasis
craggy pine
#

Each time data exists, it creates a whole new array each time.

karmic oasis
#

^

craggy pine
#

data.items needs to be above the code if you don't want it to be always empty atleast in the beginning of the code

karmic oasis
#

Probably wanna declare above that’s good assessment too not in loop

#

Been min since use JS the arrays dynamic right ?

craggy pine
#
  economy.findOne({
    guildID: message.guild.id,
    items: {
        item: item
    }
}, async(err, data) => {
    if(data && data === `${item.id}`) {
        return message.reply("This item already exists!")
    }

    if(data) {
        data.items = []
        data.items.push()
        data.save()
    } else {
      new economy({
        guildID: message.guild.id,
        items: {
          item: item,
          itemName: itemName,
          itemPrice: itemPrice,
          itemDescription: itemDescription
        }
      }).save()
    }
  })
#

best that I can do since idk how ur code works 100%

boreal iron
#

Was about to cough

craggy pine
#

sh.

karmic oasis
#

Beautiful

craggy pine
#

since you return in your first check you don't need to do an else if

#

it'll just ignore the rest of the code below it if it gets that check and is true

bright hornet
#
 data.items = []``` why this line is outside of ```async(err, data)```?
#

im confused

craggy pine
#

bec each time it runs that line of code...

#

it'll set that array to be empty each time

#

wasn't that another question you had

#

why it keeps creating new data instead of pushing it to the exisiting array?

bright hornet
#

wait

karmic oasis
#

It reinstates array each time enter the if

boreal iron
#

It’s part of the callback

craggy pine
#

ah idk shrug

#

i just assumed he didn't want it to be empty each time

boreal iron
#

And the parameter data being defined inside

karmic oasis
#

Pass it in?

craggy pine
#

i put it back in the block

#

lol

karmic oasis
#

It’s still an issue

#

It’s new empty array

craggy pine
#

ye

boreal iron
#

Why do you even fetch items and push an empty array into the database?

craggy pine
#

it will always be that way it's set up

karmic oasis
#

Not pushing anything

craggy pine
#

Also because it's kinda triggering me, I went ahead and changed his first return msg

karmic oasis
#

pat pat

#

I’ve been workin in c++ all day

#

I don’t know why I’m still here

#

🀣

craggy pine
#

lol

boreal iron
# bright hornet uhh

Is it necessary for you the database contains an empty array when no items exist?

boreal iron
#

Ok and when fetching any guild from your database, data contains a property items (if it exists)?

#

data.items

#

Means your first check should be if(!data) return new economy(…);

#

Second statement would be a check if that item already exists in that guild

bright hornet
#

im listening

boreal iron
#

if(data.items && data.items.includes(item.id)) return reply(item exists already);

bright hornet
boreal iron
#

That’s it

boreal iron
bright hornet
#

im avoiding confusion so yea

boreal iron
#

If you do need it why not creating the array when adding the record into the database?

bright hornet
#

i see i see

boreal iron
#

new economy creates a new record in your database when that guild doesn’t exist already

#

When creating that new record for the guild then push an empty array to the database

bright hornet
#

ohhh okok thanks!

boreal iron
#

Wouldn’t make sense to add a new record to the database for the guild without any data

#

I mean even an empty array is data

bright hornet
#

so i dont need to add this js data.items = [] to push an array?

craggy pine
bright hornet
#

...

karmic oasis
#

You don’t wanna push a empty array to the database

bright hornet
#

okok thanks

karmic oasis
boreal iron
karmic oasis
#

Maybe I miss understood ur response

boreal iron
#

But Im not helpful with that sort of database anyways

karmic oasis
#

Maybe safer to check if data present and not empty

#

Better practices if need to do

#

Expecting and getting not always the case

#

Can see what saying tho

bright hornet
#

it works

#

but the thing is, this code if(data.items && data.items.includes(item.id)) { return message.reply("This item already exist!") } didnt response

karmic oasis
#

Hrm

boreal iron
#

At the moment he checks if a document for this guild already exists in his database, which isn’t the case, he’s creating a new document with the guild ID and the items structure
That’s the moment he needs to push an empty array to items when later expecting in his code items always is an array

karmic oasis
#

First check in the if conditional should be one that errors out if has no value

#

Not read after &&

#

So if data not empty

#

&&

#

They the same

boreal iron
karmic oasis
#

Then run if brackets

boreal iron
#

It’s not required to repeat anything 10x times, he really needs to read answers carefully

karmic oasis
#

Exactly what said above

#

I should have read farther

#

Excellent

boreal iron
#

Also do us a favor please and log data so we can see it’s exact structure

#

Dunno that database type, so wildly guessing around is just… eww

karmic oasis
#

Im new here but saw the discussion

#

I was excited to try to help xD probably added to confusion

boreal iron
#

nvm

#

Found it

neat ingot
#

whats good folks πŸ™‚

boreal iron
#

That statement can’t work then

#

It’s an array of objects

karmic oasis
#

πŸ‘€

#

Run away

neat ingot
#

lol, is it that bad? πŸ˜‚

karmic oasis
#

Naw we just confused

#

Cause grasping at straws in dark

#

Several issues

neat ingot
#

oh yea, i seen that code earlier and just nawwd tf outta here πŸ˜„

#

i couldnt even begin to describe the things that confuzed me about it πŸ˜„

karmic oasis
#

Need to .get from object??

boreal iron
karmic oasis
#

Oh I see

#

Now

neat ingot
#

what is this mongoose code actually trying to do?

karmic oasis
#

We could be respectful here I think

neat ingot
#

πŸ˜„

karmic oasis
#

They making some common structure mistakes

#

And flow

boreal iron
#

if(data.items && data.items.length && data.items.find((i) => i.item === item.id.toString())) return exists already

karmic oasis
#

πŸ‘

bright hornet
#

thanks for fixing it

#

lmaoo

#

and its working 100% now

#

thanks!

karmic oasis
#

Good

#

Do you understand why works?

#

πŸ‘€

#

That’s important too

boreal iron
#

Didn’t see that picture when I was talking a shower

#

Shame on me

neat ingot
karmic oasis
#

Shower good way to decompress when stuck

boreal iron
#

English very gooood today

bright hornet
bright hornet
#
const ShopSchema = new mongoose.Schema({
    guildID: { type: String },
    items: { type: Array, default: [] }
})```
boreal iron
#

My gosh if you would have shared this 30 mins ago

neat ingot
#

data.items will always exist and be an array, you dont need to check that, or its length in your if statement

#

you should make guildID both required: true, unique: true

karmic oasis
#

Yea that’s my bad I didn’t know what was passing for data

#

I default to check val before comparing

neat ingot
#

@bright hornet here is some item type code mongoose/mongodb objects that may be useful to you.

boreal iron
#

That’s what I meant with consistency regarding expecting what type of this var is

neat ingot
#

i'd recommend learning from it, not trying to copy paste it (the code there i mean)

karmic oasis
#

Oooo hasItem()

boreal iron
neat ingot
#

honestly havent checked performance on that, probably should πŸ˜„

boreal iron
#

Makes sense tho if you use two different methods to perform the same action

neat ingot
#

potentially different return value though

boreal iron
#

Where’s Tim

neat ingot
#

i c him type!

quartz kindle
#

pretty sure there is no performance difference, only different return value

neat ingot
#

πŸ˜›

boreal iron
#

OMG

#

He’s typing lmao

neat ingot
#

we summoned the almighty!

boreal iron
#

When it comes to benchmarking a big red light is blinking in Tim’s room

#

I guess

neat ingot
#

sounds about right πŸ˜‚

#

i bet he woke from his slumber ~ his benchmarking sense a tingling ~ just to tell us there was no difference πŸ˜„

boreal iron
#

Time to sleep now

#

This wildly guessing and assuming stuff makes me tired

neat ingot
#

I should probably eat 😬

karmic oasis
#

Thanks for the learning

neat ingot
#

skipped dinner to work on getting my app out lol

karmic oasis
#

Nice to meet y’all briefly

neat ingot
#

you too! πŸ™‚

karmic oasis
#

Need food Yus go eat

neat ingot
#

the code is a snippet from an rpg like discord bot πŸ™‚

civic scroll
#

i remember when

bright hornet
#

not gonna expand more

karmic oasis
#

Pretty sure meant that as saying if take a look at the functions maybe good idea to make some so don’t have to figure out the if conditionals repeatedly

civic tiger
#

hey, is there an guide or an example for creating a command which requires a user to vote in-order to use it?

I am using discord.js v13

austere surge
#

||simple explanation i think||
if you have a database you can store bot related user information along with if they have voted and check for if they have voted when they want to use a restricted command

civic tiger
austere surge
#

i dont know how the top.gg voting system works but i believe theres packages and explanations there

civic tiger
#

mhm okay, i'll check it out

#

thanks

bright hornet
pearl trail
#

i bet the exist does not actually returning the user ID

#

it returns something like this {guildID, userID} depend on how you make the schema

bright hornet
#

wait

dry imp
#

ew java

arctic solar
#

how to add a text to the middle of this image in html
Image
i want the home thingy to come down

hollow depot
#

you could use margin-top, or even position-y

arctic solar
hollow depot
#

in ur css

.home-thingy-class {
margin-top: 20px;
}

(this makes the margin at the top bigger)

or:

.home-thingy-class {
position-y: 50px;
}
(i dont remember if this is in pixels, check on the internet, this brings down at the position specified)

timber fractal
neat ingot
#

please do not use 'uwu' in your error response. πŸ˜‚

quartz kindle
#

uwu

neat ingot
#

morning tim πŸ˜„

#

i finally released my rpc app yesterday ~ if your seeking some code to critique, it'd be appreciated πŸ˜„

quartz kindle
#

nice

#

i dont know anything about rpc so i cant comment much

neat ingot
#

fair enough πŸ˜„

#

I'm happy I can actually get back to creating my bot. stupid app was such a distraction, but I really needed the ability to poll a url so I can set the activity details to be the number of players/servers my bot is in πŸ˜›

#

needed πŸ˜„

wheat mesa
neat ingot
#

oh, that dude is still struggling with rpc? use my app πŸ˜„

timber fractal
wheat mesa
#

And you need to be running the code on the same machine you have discord open on

neat ingot
#

and you cant be invisible/offline, and need to enable activity status in user settings on discord

timber fractal
#

Yes I have.

wheat mesa
#

From what I’ve seen, you haven’t sent pretty much any code or any errors, so everything I’m saying is speculation

timber fractal
#

It was working perfectly, until it just randomly stopped gave an error and never worked again.

neat ingot
#

were you logging in a bunch?

wheat mesa
#

Then do

wheat mesa
timber fractal
neat ingot
#

rpc will time you out if you login too squickly too many times

wheat mesa
#

Yes

#

Ratelimits are fairly strict for rpc

timber fractal
#

Probaly, how long will they last?

neat ingot
#

at least a few minutes if you open like 3 times within 30 seconds

timber fractal
#

And wouldn't it give an error specifying ratelimits?

neat ingot
#

idk how strict they get if you persist

#

no its just a connection timeout error

timber fractal
wheat mesa
#

Again, no code, just speculation

neat ingot
#

i'd make a new app and be more cautious with the connections πŸ˜„

timber fractal
#

Can't be the app id, cause the error occurs with the extension too, wich should be a different app.

neat ingot
#

dunno, maybe the discord application itself has imposed connection restrictions

#

rather than like, the application id having a restriction

wheat mesa
#

(It would be useful to see some code!)

neat ingot
#

πŸ˜‚

timber fractal
#

Sorry, almost forgot that.

#

Console: ```PS C:\Users\Luckie\Desktop\presence\sb> node .\index.js
Client is ready.
C:\Users\Luckie\Desktop\presence\sb\node_modules\discord-rpc\src\transports\ipc.js:32
reject(new Error('Could not connect'));
^

Error: Could not connect
at Socket.onerror (C:\Users\Luckie\Desktop\presence\sb\node_modules\discord-rpc\src\transports\ipc.js:32:16)
at Object.onceWrapper (node:events:514:26)
at Socket.emit (node:events:394:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)Code:js
// start.js
const RPC = require('discord-rpc');
const config = require('../config.json');

module.exports = {
start: async function () {
const client = await new RPC.Client({ transport: 'ipc' });

    await client.login({ clientId: config.id });
    
    return client;
}

}
//index.js

const Discord = require('discord.js');

const rpc = "./presence/";

let rpcClient;

const songjs = require(rpc + "song.js");
const startjs = require(rpc + "start.js");

//login stuff and client ready event

client.on("messageCreate", async message => {
if(!rpcClient) {
rpcClient = startjs.start();
}

//other irrelevant code

});```

wheat mesa
#

Uh... what on earth

timber fractal
#

?

wheat mesa
#

I’ve never used RPC for anything other than status, not sure why you’d have an entire messageCreate event on it

neat ingot
#

beautiful πŸ˜„

timber fractal
wheat mesa
#

It’s relevant if it’s related to your RPC

timber fractal
#

But this is everything for the connection.

wheat mesa
#

There’s several questions I have

#

1, await does nothing on a constructor, so why are you using it?

neat ingot
#

^ this

timber fractal
#

Β―_(ツ)_/Β―

#

I suck at Promises.

neat ingot
#

a constructor is not a promise

#

i promise πŸ˜‚

wheat mesa
#

A constructor can never be a promise

#

Though it would be interesting to see

#

Although I’m sure there’s several reasons for that not being a thing

timber fractal
#

I mean, iirc await has something to do with promises?

wheat mesa
#

Yes

#

Await waits for a promise to resolve

timber fractal
#

Yeah, so that's what I meant.

wheat mesa
#

I don’t see how that still means anything when you’re calling a ctor though

timber fractal
#

Alright, but can we stick to the problem?

wheat mesa
#

Yes

#

Let me get on my pc rq

timber fractal
#

Alright.

wheat mesa
#

Ok, I don't really see anything wrong with your code, but try putting a .catch() on your client.login() so you can log the error if one occurs

timber fractal
#

Alright.

timber fractal
wheat mesa
#

I'm thinking that you're either banned by discord for some reason, or your application id is incorrect

timber fractal
#

Probaly the first, cause the second can't be. Weird that it doesn't notice in any way if so. Would I get unbanned soon?

wheat mesa
#

Wdym "the second can't be"?

#

Try logging your config.id

#

it might not be what you think it is

timber fractal
#

I'll try, but it worked fine before didn't change anything.

#

Logged it, it's exactly what it should be.

neat ingot
wheat mesa
timber fractal
#

No.

wheat mesa
timber fractal
#

You mean, quickly after the login or quickly change status and again and again?

wheat mesa
#

can you show what you're trying to do with the client after it's connected?

#

just because it's not directly related doesn't mean it's not useful to the problem

timber fractal
wheat mesa
#

ok, that doesn't help me

timber fractal
#

No, but it won't even log in so it's not useful.

#

Cause the error occurs at the login

ancient nova
#

okay, so now I have a working API, how would I make something to check how many active programs are opened?
want to make something along the lines of a statistics, to check how many users currently have my program opened

wheat mesa
#

seems like it connects then dies after connecting, it might be related to some sort of invalid api operation you're trying to do

ancient nova
#

it seems possible in my head but I have no idea how to actually go about this

wheat mesa
#

the discord rpc is buggy as well

#

so Β―_(ツ)_/Β―

ancient nova
#

what's discord rpc?

timber fractal
ancient nova
#

I haven't made a bot in ages so idk

wheat mesa
#

and your dev portal application looks like this?

neat ingot
#

client id is potentially sharable info

wheat mesa
#

yeah, just didn't want to

neat ingot
#

fair πŸ˜›

timber fractal
boreal iron
#

Redirect to localhost

#

πŸ‘

wheat mesa
#

don't know, when I was learning how to use rpc that's what I was told needed to be set

timber fractal
#

But other than that it looks the same/

wheat mesa
#

try setting that, idk

timber fractal
#

Also I just tried with a different application, same error.

wheat mesa
#

do you have a bot on either of those apps?

timber fractal
#

Yes on both.

#

Would that make sense?

timber fractal
wheat mesa
boreal iron
neat ingot
#

you dont need to set redirect url for rpc

#

~ at least, i havent.

neat ingot
timber fractal
#

Yeah, as I said it worked completely fine earlier today.

neat ingot
#

can you show your code?

timber fractal
neat ingot
#

only the code you'd like help with πŸ™‚

neat ingot
#

you havent changed anything from this code?

timber fractal
#

No.

neat ingot
#

Well, assuming this is all one file as you have not said otherwise...
you are exporting a module that is never used.
You should define all requirements at the top of your file
You cannot await a constructor. (ie, await new ~ wont work)
You never create a discord.js client, so you cannot listen to its events
There is no need to include '.js' in your require's, it assumes its a js file already.

Theres probably more, but i gotta go out now 😘

#

oh nvm you did indicate them as separate files ~ my bad

#

still though, your not requiring your rpc client file, and then again, you cannot await a constructor.

crimson vapor
#

you can await a constructor but it doesn’t do anything

neat ingot
#

i mean, ok, it wont kill everything, but it doesnt do anything except confuse people trying to understand how promises/async works πŸ˜„

timber fractal
neat ingot
#

anyway, i actually gotta run πŸ˜„

timber fractal
#

Yeah, bye.

#

Also, I did create a d.js client, forgor to include it.

livid arrow
#

zoomeyes should I use local database? Is it a good idea to store some basic information in a json file? Or should I use db for everything

wheat mesa
#

do not use json as a db

#

plain and simple

earnest phoenix
livid arrow
earnest phoenix
#

i am using localhost mongodb

wheat mesa
#

mongodb is easier if you don't know sql

livid arrow
wheat mesa
#

cloud probably

#

unless you need to store a lot of data

livid arrow
#

I mean the free version of the mongodb cloud

livid arrow
earnest phoenix
#

mongodb free version gives 512MB so you can use mongodb atlas

#

Or localhost

#

Β―_(ツ)_/Β―

livid arrow
earnest phoenix
livid arrow
#

I want to pay with crypto and found that only namecheap have the best offer so far that accepts crypto

earnest phoenix
livid arrow
earnest phoenix
wheat mesa
earnest phoenix
#

i agree

wheat mesa
#

I pay nothing per month and I get more storage, bandwidth, and 1gb ram 1 cpu core

earnest phoenix
#

i pay 8 dollars per month and i get R9 5900X cpu 8gb ram 120gb ssd vps lol

wheat mesa
#

oracle

livid arrow
#

πŸ€·β€β™‚οΈ I don't have a card

wheat mesa
#

everything is going to require a card

livid arrow
#

but yeah, oracle is epic :)

ancient nova
#

const something = await fetch(website); sometimes get's stuck on certain websites and never returns

#

how do I fix it?

lyric mountain
#

But quicky becomes a snowball unless you invest time into properly learning it

lyric mountain
#

As someone who use Java everyday, you don't know how twisted oracle business is

ancient nova
#

yeah so no fix then?

raven holly
#

Can somebody help me``` <p class="card-title" style="font-size: 50px !important;line-height: 15px !important;letter-spacing: -0.06em !important;font-weight: bold !important;" data-target="<%= client.guilds.cache.size %>">0</h1>

wheat mesa
#

Means not all the guilds are cached

raven holly
#

how to cache it all

ancient nova
#

looks like using await actually broke it rather than fixing it for some reason

#

instead I've added an async delay

ancient nova
#

it look like this

#

ignore how massive this is

#

would also be nice if I could just grab the first 3 results but it's difficult if all of them have the same name

atomic kindle
#

No problem, one sec.

ancient nova
#

really?

plucky imp
#

Ah yes

ancient nova
#

thanks I couldn't figure it out

plucky imp
#

1k message latency

ancient nova
#

over 100,000 sometimes

plucky imp
#

Lol

atomic kindle
#

So, this is the schema of your JSON object.

plucky imp
#

The highest i got was like

#

5k