#development

1 messages · Page 44 of 1

lyric mountain
#

technically

#

but u shouldn't expect for those data to be useable on the other side (in the case of applications)

#

some apps have lots of roots in the user folder

#

idk why u bother tbh, it's supposed to be private anyway

#

it's just an id for that folder

#

so you risk krangling your system because of a folder name?

wheat mesa
#

sanest windows user

solemn latch
#

I'm looking for a managed postgres db, any suggestions?

spark flint
#

either Scaleway or DigitalOcean seem good

#

used both and had a good experience with both

#

or ovh

#

(never used for db but good host)

earnest phoenix
#

hi
how do I delete all the massages of a conversation?

lyric mountain
#

of a channel you mean?

earnest phoenix
#

Yes I guess

lyric mountain
#

your best bet is simply deleting the channel and recreating it

#

you'll quickly hit the ratelimits for big channels

earnest phoenix
#

It's not a channel. It's a direct conversation

#

No way possible?

lyric mountain
#

nope

earnest phoenix
#

Well... Thank you I guess

wheat mesa
#

bros got sus DMs

neon leaf
#

what would be the best way to make a request like this expire after 60 seconds?

lyric mountain
#

what language?

neon leaf
#

js

lyric mountain
#

timeout(() => stuff, time)

#

literally, the function is called timeout

neon leaf
lyric mountain
#

ms

neon leaf
#

what would stuff be? a function to send the original message?

lyric mountain
#

no, a function that'll run after the set time

neon leaf
#

ah, so I put that timeout thing after sending the original message?

lyric mountain
#

yep

neon leaf
#

k, thanks

#

what if someone deletes the original message, would the code error out trying to edit the msg?

lyric mountain
#

yep, u need to catch it

neon leaf
#

so, try timeout and function, catch error and just return so it doesnt log?

lyric mountain
#

dont use try-catch cuz both the timeout and edit are async

#

u need to use .catch on edit

neon leaf
#

like this?

lyric mountain
#

kinda, u need to write something inside .catch(error)

boreal iron
#

Do not edit interaction messages

#

Edit the webhook (message)

lyric mountain
#

ah true

#

fake still have a good eye for his age

boreal iron
#

I mean basically that should work, too as editing a message would never require permissions for the message owner

lyric mountain
#

they'd need to defer before for editing the message directly

boreal iron
#

But still, it’s a message webhook not a normal channel sent message

#

I would go with the interaction webhook edit variant here

neon leaf
#

on the side

boreal iron
#

Show the code please

neon leaf
boreal iron
lyric mountain
#

ah true

boreal iron
#

well that link to the code uses my screen size

#

That’s as bad as discords code blocks

neon leaf
boreal iron
#

Roger

neon leaf
#

I guess it just doesnt error know, but the code aint executing it seems

lyric mountain
#

add some logging inside it

#

like console.log("I was here")

quartz kindle
#

setTimeout(() => something(), 60000)
or
setTimeout(something, 60000)

#

() => something will not work

lyric mountain
#

why not?

#

like, it's an anon function

neon leaf
lyric mountain
#

also TIL timeouts are numbers

wheat mesa
#

I am stuff

neon leaf
#

next error (ignore the catch, i wanna get the other part done first), ig its because uh, idk. I should probably edit the webhook as someone mentioned, how would I do that?

wheat mesa
#

You need to set the fetchReply: true flag when replying to the interaction

#

Or whatever it’s called

boreal iron
#

Threat it as interaction webhook please

#

As I said before

#

interaction.webhook.editMessage(…)

#

To prevent fetching it for no reason

#

(if it’s still the original response to whatever interaction)

#

Also discord only edits parts of the message you actively specify

neon leaf
boreal iron
#

If you don’t wanna edit the embed(s) but only the components then pass them as option only

#

Show me what you did

neon leaf
boreal iron
#

Why are passing the message as json as embed?

lyric mountain
#

.catch((error) => {return}) can be resumed to .catch(() => {}) btw

drifting cairn
#

paypal is such a pain in the ass to set up on websites tfFaint

boreal iron
#

Don’t you wanna disable the components only?

neon leaf
lyric mountain
drifting cairn
#

i agree

#

took me almost 3 hours just to setup basic handling

boreal iron
#

How many are they?

neon leaf
#

there are two buttons in one row and I wanna disable them

boreal iron
#

No you don’t need to create the entire components again

#

You can just edit them

#

interaction.message.components[0].components[0].data.disabled = true;
interaction.message.components[0].components[1].data.disabled = true;
Then edit the message:
await interaction.webhook.editMessage(interaction.message.id, { components: interaction.message.components }).catch(() => {});

#

The message object already stores all action rows and their components

#

That’s why you can simply edit em

#

Then push them back as components when editing the message

#

These 3 lines will just disable the first two buttons of the first action row of your original interaction response

neon leaf
#

ah, next issue, can I somehow know if either the message was already edited by the bot or get the embed content? interaction.message.embeds doesnt exist in this case

lyric mountain
#

I believe messages have an edited property, or I'm mistaking with another api

#

check the docs nonetheless

#

the true question is, why?

neon leaf
#

to check if the user already said no

lyric mountain
#

simply cancel the timeout

neon leaf
#

yea but how do I know if he said no

#

its in a completely different script

lyric mountain
#

store the timeout in a globally-acessible scope

#

like in an array or map

#

preferrably a map

boreal iron
#

Either that or create a component collector

neon leaf
#

I just realised, an edited property wouldnt even work because the interaction var isnt updated, right?

lyric mountain
#

ye

boreal iron
#

Once the user presses your no button a new interaction is triggered

lyric mountain
#

we're talking from the inside of setTimeout

#

like, the code to process a "no" is in another file from what I understood

neon leaf
#

yu

lyric mountain
#

they want to prevent the timeout from doing whatever it'll do if the action was already processed

boreal iron
#

Does that actually matter?

neon leaf
#

For Looks, yeah

lyric mountain
#

pretty much, else it'll edit the message after the user already answered

neon leaf
#

for if the game started I already have a working check

boreal iron
#

Let the timeout does it’s job, catch nothing and if somebody presses no, disable the buttons immediately

lyric mountain
#

it'll still edit the message

#

and trigger any other processing they might have inside timeout

boreal iron
#

No if it is disabled already nothing will happen

lyric mountain
#

it will

#

you're misunderstanding the problem

boreal iron
#

Discord compares the old and new message state, if both are the same no edit will happen

lyric mountain
#

like if they wanted to add cash to user's balance or stuff

#

plus it's one extra request

#

and one extra async task

boreal iron
#

If somebody will press no, then immediately edit those buttons anayways… it doesn’t matter anymore if the timeout will try to edit the components (again)

lyric mountain
#

that considering if, and only if the sole purpose of the timeout is to edit

boreal iron
#

It’s just there to disable the buttons if I understood him right

lyric mountain
#

for now, yes

#

it'd still waste 1 task + request tho

#

you usually want to stop your cancelled tasks

boreal iron
#

True but that seems to be an issue how he has built up his code

#

I mean bind the timeout to the channel for example or to the message as property

#

That prevents you from unnecessarily creating a var in a global scope

#

Can’t think of an easier solution in this case to stop it then if you want to

lyric mountain
#

messages keep the property even on fresh events?

boreal iron
#

It’s cached

#

At least the channel is

lyric mountain
#

I was worried djs might cache messages

boreal iron
#

It does iirc

lyric mountain
#

tf

boreal iron
#

Only a few amount of messages

#

Fetching the message which hasn’t changed in a short period of time should get it from the cache

#

But anyways, he could also create a property to the channel

#

Or user

#

Or member

#

Etc

#

Depends on his needs and if somebody else can access or stop the timer or at least triggers a stop

neon leaf
lyric mountain
#

message must be fetched, and...why are u passing the id?

neon leaf
#

interaction.editReply works though

boreal iron
#

No this error means your interaction doesn’t have a message property

#

This is the case for command interactions for example

#

Since they CAN NOT have a message property

#

As it’s your job to respond with one or something else

#

You can respond with that to a button interaction for example which a message with its components (and maybe others parts) as reference

#

Which is assumed you would

#

If not we should begin by the start again

#

With you telling us in words what you actually wanna do

knotty quartz
#

Heyo!

boreal iron
#

If you want to disable the buttons after the timeout after executing the slash command, then yes you will have to fetch your reply

knotty quartz
#

Question?

If i had a list with user ID's, how would I call the list to check to see if the user is suitable for the command.

E.G:

if(list ect (interaction.user.id))
//execute command here
}```
boreal iron
#

You can still use exactly what I wrote above to disable the buttons

boreal iron
lyric mountain
#

depending on what ur doing, a database solution would be better

knotty quartz
lyric mountain
#

that's a dress

#

don't care if it's supposed to be a volcano, looks like a dress

boreal iron
# neon leaf huh

If your first reply is a response to the slash command then fetch your reply like so…
let reply = await interaction.reply({ …, fetchReply: true });
No in that scope you wanna disable the button if I understood you right, so you need the fetched reply

You can still use what I wrote above to edit the components
But the reply var now is your message object not interaction.message as it doesn’t exist (yet)

reply.components[0].components[0].data.disabled = true;
reply.components[0].components[1].data.disabled = true;
Then edit the message:
setTimeout(async () => { await interaction.webhook.editMessage(reply.id, { components: reply.components }).catch(() => {}); }, 60000);

#

Weow

#

Took ages to write

#

Builders and those var names are killing me

#

And collectors zoomeyes

boreal iron
lyric mountain
#

that's no corset, that's a literal PVC pipe

quartz kindle
#

although the old way might still work, didnt test

lament rock
#

djs truly has become prototype pollution

quartz kindle
#

truly deserving of the name dicksword.js

lyric mountain
#

dickscord.js

lament rock
#

classes to represent every tiny little thing is kinda dumb

quartz kindle
#

papi.giveMoneyPls()

boreal iron
#

I bet you can still (and hopefully always) just access the raw object structure

lament rock
#

facts

boreal iron
#

Oh man

quartz kindle
#

pretty sure you can

lament rock
#

all of the properties are actual members and not getters

quartz kindle
#

djs goes out of their way to create a gazillion classes for everything, but they dont go out of their ways to prevent people from accessing the raw stuff

boreal iron
#

Yeah…

quartz kindle
#

they use underscore private props, not es10 hashtag props

boreal iron
#

You just gotta respect their stupid camelCase etc transformation

#

But one more reason to not use this ugly builders

ancient nova
#

there is one more way to save my PC

quartz kindle
#

throw it in the garbage

ancient nova
#

a in place windows boot

#

🗿

lyric mountain
#

bae bae bae, what are you doing in system32 bae?

lament rock
#

Or wiping the drive

ancient nova
lyric mountain
#

that's not how u do it

quartz kindle
#

jenius

ancient nova
#

wdym

lyric mountain
boreal iron
#

Turning off system host process fixes any issue

quartz kindle
#

disabling windows fixes windows

boreal iron
lyric mountain
#

windows + R -> services.msc -> SysMain -> Startup type: disabled -> Stop

lament rock
#

cant have any errors if nothing ever loads

ancient nova
boreal iron
#

You can still access the services in your task manager to stop em at least

ancient nova
#

well the process was popping up in da task bar but the window never popped up

lyric mountain
ancient nova
ancient nova
lament rock
#

Here's a video for your travels into madness: https://www.youtube.com/watch?v=x0ZfwSQDLK0

Si tu donnes un morceau de pain à un pigeon, il faudra attendre un petit moment avant de voir une horde de pigeon s’abattre sur toi !!

C'est une animation que j'ai faite sur Flipnote Studio avec ma Nintendo DSi ! Je dessine tout dessus puis je transfère les dessins sur Windows Movie Maker =)

C'était vraiment fun à faire !

Watch out when you ...

▶ Play video
lyric mountain
#

tho at this point the pc is such krangled that ur better formatting it at once

ancient nova
#

idec about my games I'll just replay them from scratch

lyric mountain
#

enter recovery mode

boreal iron
lyric mountain
#

recovery disables almost all background tasks

lyric mountain
ancient nova
lyric mountain
#

now windows is having a seizure trying to stay upright

ancient nova
boreal iron
#

Can’t be so complicated to open the file explorer and save your stuff to an external storage or create a partition of your drive, install a bootable device and format the other partition with your system on it

ancient nova
solemn latch
#

uninstall them?

ancient nova
boreal iron
#

What?

lyric mountain
#

The pc fake, is krangled

#

The storage refuses to do any task

ancient nova
# boreal iron What?

the programs that cause the 100% usage are the programs that look for and install updates

lyric mountain
#

And he uses hdd

#

He managed to barely recover the pc from a catastrophic failure yesterday, windows is probably trying to recover consciousness

ancient nova
boreal iron
#

Then boot in safe mode, delete some stuff to get free storage, create the partition, save your files, reinstall the system

ancient nova
#

I think I did but I got any cause of the blue screen so I will continue this tomorrow most likely so wish me luck 💀

#

new SSD is already been orderee btw

solemn latch
#

boot off a usb drive, and get the files off

#

(imo)

boreal iron
#

Can’t be hard to figure out what’s so big on your disk reserving space in safe mode and delete it

ancient nova
#

usage too high hdd unresponsive

#

still takes about 1 hour from booting up into desktop for even the icons to load

solemn latch
#

your drive shouldnt even spin up if you're not booted off it

ancient nova
#

so gl copying the couple GB of files I wanna copy

boreal iron
#

hdd isn’t loading anything when booted from usb drive

solemn latch
#

^

#

it wont even turn on

boreal iron
#

Oh it will

solemn latch
#

until you go access the files

boreal iron
#

It will always spin

solemn latch
#

they stop spinning when not in use

#

unless its a super old drive from 2005

boreal iron
#

After a while yeah

ancient nova
#

they stilk spin but the pin inside it doesn't touch the hard disk

#

or do they actually stop?

#

hibernation?

solemn latch
#

they stop when not in use

boreal iron
#

Spinning or not doesn’t change anything in your case

#

Boot from a drive and perform your actions

#

OR

#

Boot in safe mode and do it

ancient nova
#

I still don't have any other drive

boreal iron
#

Issue solved

ancient nova
#

I will attempt booting a in place windows tomorrow

solemn latch
boreal iron
#

Then boot safe mode and REMOVE STUFF YOU DONT NEED, create a partition and SAVE YOUR STUFF ON IT

#

The 50th time

ancient nova
#

ok I will do that tomorrow

#

I am saying that

#

to boot into in place windows I need safe mode anyway

boreal iron
#

Remove anything you find which isn’t in the windows folders

ancient nova
#

🗿

boreal iron
#

You can’t break stuff just apps

#

And unnecessary services

ancient nova
#

we will see what happends tomorrow I'll share if snything happens 💀

boreal iron
#

For real… things aren’t that complicated

ancient nova
#

😔

lyric mountain
#

Sysmain coupled with antivirus + update working like crazy are taking 100% of disk time

#

That's why nothing responds

#

It happens when the pc recovers from a serious crash, especially noticeable on hdds

ancient nova
#

apart from that one time usage dropped to 50% for 10 seconds

#

my PC was so usable task manager opened instsntly

lyric mountain
#

Yes it won't, because it's working painfully slow due to all the stuff trying to run at once

ancient nova
lyric mountain
#

W10+ aren't really meant to be ran on hdds anymore, windows uses way too much disk time

#

Disabling superfetch/sysmain usually frees some of the burden, but u obviously cant do that rlly now

#

Open windows in recovery mode, disable sysmain, reboot

#

If there's any improvement, get your data

#

If not, adjust the partition size and install linux to get the files

#

After that, format the pc

lament rock
#

Windows 11 is pretty nice imo

#

Not too fundamentally different than Windows 10, but eh

quartz kindle
#

elevun

#

my next format is gonna be win11 but ghostspectres edition

#

even tho my cpu is not approved for win11 lol

lament rock
#

my pc isnt approved for windows 11, but you can bypass all of the stuff with the basic windows 11 installer, granted you need to use the command line and reg edit

quartz kindle
#

yeah

lament rock
#

Shocking how most of the stuff still works like core isolation even though my cpu barely missed the cut off

quartz kindle
#

their cpu approval thing was pretty random tbh

#

older cpus are not really lacking anything

solemn latch
#

its tpm that was the main thing right?

lament rock
#

power I guess

quartz kindle
#

also rufus has an option to disable win11 checks when making the bootable usb lmao

lament rock
#

tpm was the main thing

#

that's hilarious

solemn latch
#

which makes no sense, you can use windows 11 with your tpm disabled on a bios level no problem

#

I ran windows 11 for weeks without knowing

quartz kindle
#

i have tpm 2.0 but my cpu is gen 7

#

theres literally no reason at all to lock gen 7 out

#

the only reason is "we didnt test it so we cannot confirm it works"

solemn latch
#

5head

lament rock
#

The whole thing is shifting towards trusted computing which is its own can of worms

lyric mountain
lament rock
#

There's a difference between fucking with your os and fucking with microsoft

boreal iron
lament rock
#

not too much reason to tinker imo

#

unless you're a power user. Then, Linux would make more sense than Windows

boreal iron
#

v10 is far more modable than 11 without having another layer running on it trying to reinvent things and make anything fancy bling bling, being still the same shit under the hood

lament rock
#

the furthest I went is a clean install of everything and removing a lot of telemetry including with nvidia's gaming driver

boreal iron
#

Hmm I’m speaking about more deeper modifications you can do in the registry and group policy settings along with ui adjustments v11 simply hasn’t anymore

#

Also I don’t like the tendency to enforce the need of a Microsoft account

boreal iron
#

Also the enforcement you simply can access specific windows folder and files anymore

#

The system just doesn’t allow you to open the folder/file

#

There’s so much I need to do and can’t anymore

#

Even v10 “feature” updates were enforcing stuff like this already

boreal iron
#

Man… another day of 4G dying - back to EDGE

#

I can’t get enough of that

sudden geyser
#

Why are Discord tokens much longer now

sharp geyser
#

Probably the same reason ids got longer

shadow granite
#

Probably not exactly the same reason, but a similar reason, yes.

#

IDs get longer because more user accounts are registered

sharp geyser
#

I mean tokens are based on IDs a as well so

#

You use the user/bots ID in the generation of the token

shadow granite
#

Discord tokens have to be hashed so in order to maintain security, they probably changed the hashing protocol to ensure a longer output so that it's less vulnerable to brute force/combination attacks.

sharp geyser
#

I mean before they were using some flask hash thing that could be easily decoded if you had the token

shadow granite
#

If that's about public tokens that's not too big an issue, really. I mean yeah it's still a security issue of course but if it's private tokens that's absolutely unacceptable 😂

sharp geyser
#

Tokens should never be public

shadow granite
#

Depends.

#

Certain systems match a public token vs a private token.

sharp geyser
#

Discord tokens should never be public

lyric mountain
#

depends???

shadow granite
#

Discord tokens, maybe not, no.

sharp geyser
#

But yes discord was using a flask encryption thing

shadow granite
#

I'm not exactly sure. Not an expert on Discord API field.

sharp geyser
#

One of my friends figured that out and got the original content of the token

shadow granite
#

I would assume someone's UID == personal token

sharp geyser
#

No

lyric mountain
#

what kind of token would be fine to be public?

sharp geyser
#

That's public

shadow granite
#

public*

#

That's what I meant

sharp geyser
#

And it's not a tone.

#

Token*

boreal iron
sharp geyser
#

It's an identifier

#

As is in the name

#

User ID(Identifier)

shadow granite
boreal iron
#

It’s part of the snowflake

sharp geyser
#

Discord uses their epoch timestamp

shadow granite
sharp geyser
#

From when discord was created till now

shadow granite
#

Like GPG for example

#

Yeah honestly I wonder if it ever happens that a snowflake is assigned twice through sheer chaos and chance.

lyric mountain
sharp geyser
#

Discord takes the snowflake, current timestamp and worker/spawner and some random encryption junk at the end

lyric mountain
#

regardless of system or api

#

a token is a key, whoever has it can access ur stuff

shadow granite
#

Yeah token is prolly not the word I'm looking for.

#

I'm trying to look for the word but

#

Yeah anyway

#

Of course it's virtually impossible, yeah.

#

I just wonder if it ever happened and if Discord has any system in place to deal with those doubly assigned IDs.

#

Should there ever be one.

sharp geyser
#

There's the chance of system lag and the fact that their Internet might be slow

#

Plus a multitude of other technical nonsense

shadow granite
#

ye

boreal iron
shadow granite
#

Ah right

#

That would never be an issue. Clever.

sharp geyser
#

That's the whole point of a snowflake

#

It's to be as unique as possible

boreal iron
#

Should never be yes as each process is unique

shadow granite
#

M'yeah. I know that.

#

I just didn't know the intricacies of it (yet) haha.

#

I apologize if I'm not 1337 haxx0r enough to be part of the cool gang club.

boreal iron
#

lol

sharp geyser
#

I mean even without the worker and process IDs being incorporated it's still a time based id which i feel is relatively hard to get an exact match

shadow granite
#

Hard but not impossible. With so many API calls Discord has

boreal iron
#

Only bot devlopers here please!!1!

#

Misty out!

shadow granite
#

I'd be surprised if there would never be any mismatches.

boreal iron
shadow granite
#

Well I did develop bots technically speaking.

sharp geyser
#

I mean sure ig

#

But that won't really be an issue

#

There's a lot of technical stuff involved

shadow granite
#

Depends on how callbacks are processed, no?

#

I would imagine anyway.

sharp geyser
#

I just use UUIDs :^)

boreal iron
#

Man inconsistencies are discord’s last name

shadow granite
#

Lol if that ain't the truth.

drifting cairn
#

damn nvm pensive_cry

sharp geyser
#

Go take your night meds boomer

shadow granite
#

wow r00d

boreal iron
#

SHUT UP WHITR NAMR

drifting cairn
#

😦

boreal iron
#

OH NO WHERES MY AUTO CORRECT

sharp geyser
#

Okay watchlist

shadow granite
boreal iron
shadow granite
#

colorist? role-ist?

sharp geyser
#

Ima hop in unity

#

haven't done that in a while

boreal iron
#

Have already been called worse than racist

shadow granite
#

I mean you're on Discord so obviously.

boreal iron
#

lol true

shadow granite
#

Talk 'bout kicking in an open door

sharp geyser
#

I mean aren't you fake?

boreal iron
#

Not that the rest of the internets is much better

shadow granite
#

Nope, grew up on it.

shadow granite
#

Only got worse with time imo.

#

wow that looks trippy nowadays

boreal iron
#

I’m gonna replace it for your sanity

shadow granite
#

No it'd look even worse trust me.

#

Oh you meant-- Nvm LOL

#

For, not with 🤦‍♂️

#

Classic dev thing

drifting cairn
shadow granite
#

Okay devs

drifting cairn
#

spent 7 hours on understanding the paypal api, finally got it to work

shadow granite
#

Most annoying thing that is totally avoidable with zero/little risk by Discord, about the Discord API

#

go

#

Oh man PayPal API must be tough yeah.

drifting cairn
#

yeah

#

it is

#

gonna go sleep now, paypal's api has given me a migraine worry_mysleep

shadow granite
#

Sweet API-related nightmares dreams

drifting cairn
#

you've made me remember that i have to finish off working with the api when i wake up😔

#

not looking forward to tomorrow Capycry

shadow granite
#

👿

#

muhahaha

drifting cairn
sharp geyser
#

With all this api talk

#

you guys should ditch djs and other libraries

#

and make your own

drifting cairn
#

2 much effort

sharp geyser
#

Lazy bums

drifting cairn
sharp geyser
#

We already have one lazy bum

#

we dont need more

#

@boreal iron keep being a lazy bum

#

we only need you

boreal iron
drifting cairn
sharp geyser
#

:^)

#

Community better than the site

drifting cairn
boreal iron
#

And when it got created

drifting cairn
boreal iron
#

In other words thrrr have been quite a few timeouts today and yesterday (again)

drifting cairn
radiant kraken
#
hidden gorge
boreal iron
sharp geyser
#

Seems like your style fake

#

You love a good rp

boreal iron
#

Don’t reveal my dirty fetish in here please

#

We keep our role plays private Misty

sharp geyser
#

You are disgusting

lament rock
#

I'm about to just move all of my projects to node built in undici

quartz kindle
#

last time i tried it, it was trash

lament rock
sick agate
#

is there any golang USB event monitor libraries without any c dependcies

#

it needs to work on windows

#

i just need to detect if there is a new device (USB mass storage)

quartz kindle
#

but its been a while, its probably better now

lament rock
fleet plinth
#

Hi

#

Can anyone help me with python?

sudden geyser
#

Ask away.

lyric mountain
#

"And they, in fact, didn't ask the question"

boreal iron
#

What could cause that error?

message: 'Invalid Webhook Token', code: 50027

Background: I'm responding with a modal to a command interaction and sending a follow up message (using a timeout - after 45s) in the case the user just closed the modal without submitting it.

The follow up message however triggered that error which doesn't make sense for me.
How can token be invalid? I mean it's no inital reply, therefore no deferring no 3s timeout...

#

I'm guessing API inconsistencies or an issue with the guild the interaction got triggered but... hmm just guessing

eternal osprey
#

hey guys is there anyone here who had computing science?

#

If yes, i have a question

#

i have to find a function that's onto, but not one-to-one.

#

the function f : N → N is onto but not one-to-one, if we define it like
f (n) = n − 7. Would this be right?

wheat mesa
#

Huh?

#

Mathematically functions are essentially 1 input, 1 output

eternal osprey
#

yes

#

So now i need to find a function that's onto but not one to one

#
Give an example of a function from N to N that is
a) onto but not one-to-one```
wheat mesa
#

Never heard that term before

eternal osprey
#

also better non as injective and sujective functions

#

known*

wheat mesa
#

Never heard those terms either

ancient nova
#

aight guys

wheat mesa
#

Perhaps this isn’t a question I can answer :p

ancient nova
#

booting into safe mode rn

#

😳

knotty quartz
#

hi

boreal iron
#

Does chaining catch() to an un-awaited promise still catches it? I'm curious

ancient nova
#

I had erorrs log into console from not awaited snippets

#

10 wot 😳

boreal iron
ancient nova
#

well that I cannot answer, I just know stuff that errored was logged by something

#

when I used catch I did a console log always

#

nah js I'm gonna attempt to get my hard drive back again today cuz I'm persistive

#

no need to help, at least not yet 😳

eternal osprey
boreal iron
spark flint
#

How can I consistently get the last monday and the next monday in JS? this is my current shitty method ```js
let prevMonday = new Date();
prevMonday = new Date(prevMonday.setDate(prevMonday.getDate() - (prevMonday.getDay() + 6) % 7));
prevMonday = new Date(prevMonday.setHours(6,0,0));

let nextMonday = new Date();
nextMonday = new Date(nextMonday.setDate(nextMonday.getDate() - (nextMonday.getDay() + 6) % 7));
nextMonday = new Date(nextMonday.setDate(nextMonday.getDate() + 7));
nextMonday = new Date(nextMonday.setHours(5,59,59));```

ancient nova
#

will my game be aight if I do that?

#

what does it mean by personal files

#

the source code for my game is in the desktop of my pc

spark flint
#

personal files = all your files

ancient nova
#

fr???

#

omg

spark flint
#

yes...

lyric mountain
ancient nova
#

what about programs and games like gta v warzone etc?

lyric mountain
spark flint
#

EVERYTHING is deleted BRUH

lyric mountain
#

think OOP

ancient nova
spark flint
ancient nova
#

only after I login the high usage starts

#

so why not

spark flint
#

i use that code atm and it still fetches last monday SCsobbing2

lyric mountain
#

...because when u login the stuff start running

#

at login screen, barely anything is running

#

if ur gonna format do it right

ancient nova
#

ye so why not reinstall? if sumn broke and it starts breaking my disk so when I reset it will go back to the way it was?

earnest phoenix
#

Oh God, we're still at Bae's Windows situation?

spark flint
#

yes

ancient nova
#

yes lol

spark flint
lyric mountain
earnest phoenix
#

It's been 2 DAYS

ancient nova
spark flint
#

no

ancient nova
#

🧐

spark flint
#

the pic says it removes personal files

#

i said what personal files was

#

removing personal files = removing all files

#

it doesnt pick and choose like "hmm thats not personal to bae, delete!"

ancient nova
#

it says it lets me choose

spark flint
#

sorry the cameras not quite close enough to the screen

ancient nova
#

🗿

#

u can read what it says

lyric mountain
ancient nova
#

why

#

it reinstalls the entire thing..

lyric mountain
#

no it doesn't

ancient nova
#

then why does it say it reinstalls windoes

lyric mountain
#

it just does a "dirty" reinstall

ancient nova
#

what does that mean😩

lyric mountain
#

like, whatever stuff u did will stay at the new install

#

so the problem will stay there

ancient nova
#

well I'm now in recovery mode so I can do whatever you wish me to

lyric mountain
#

you don't need recovery mode to format

#

you need either a pendrive or a disk

ancient nova
#

I need, because otherwise my PC too slow

#

I got none

lyric mountain
#

well, then u cant format

#

because windows cant be running to...well...reinstall

ancient nova
#

well what do I do then

lyric mountain
#

get a pendrive

ancient nova
#

it's night all shops are closed now

#

the only one I got is too small

lyric mountain
#

there's not really anything u can do without one, windows built-in reinstall usually just fixes corrupted system files

#

not anything else

lyric mountain
ancient nova
#

yeah whatever causes my problem is 100% corruption

#

t

#

when I sent screenshots yesterday programs like settings, chrome or wifi window were crashing

lyric mountain
ancient nova
#

ok should I at least try

lyric mountain
#

well, you'll lose a lot of time

#

but sure

ancient nova
#

I don't think I have much other alternatives right now

lyric mountain
#

u can sleep and leave that for tomorrow

#

how small is the pen u got?

#

windows needs around 4gb iirc

spark flint
#

8gb

lyric mountain
#

for formatting?

spark flint
#

im literally installing windows on a pendrive rn

lyric mountain
#

lmao why

spark flint
#

restoring 3 pcs

#

to sell

#

because stonks

ancient nova
#

it's 16gb.. doesn't windows need 32gb???

lyric mountain
#

businessman

lyric mountain
#

but ur installing the image

spark flint
#

for 3 for £40 from a charity i love and have bought like £1k of pcs from, refurbing and selling for £50 each

solemn latch
#

I thought it was 8gb for an install drive

lyric mountain
spark flint
#

yes it is

ancient nova
#

well how will I even install windows onto that usb drive if I can't open chrome

spark flint
#

8gb for w10, 4gb for w7

ancient nova
#

I have win 10

spark flint
#

i used to install w7 on pcs in the good old days

lyric mountain
#

u can try using explorer

#

or (if windows has one), wget

#

don't u have any other pc to install on the pen?

ancient nova
#

chrome took 10-20 minutes to open before crashing so😔

lyric mountain
#

because it'll take a loooong time on ur current state

solemn latch
#

go to a public library

#

or take the usb drive to a pc repair shop, they will probably put it on for free

lyric mountain
#

it's night there

#

ok, there's a way to solve that

#

first, go to storage management and free around 16gb or smth skip this

#

then download the smallest linux distro u can find around

#

install on ur pendrive and use it to download windows 10

#

then restart the pc in recovery mode and execute the installer

#

install it on the pendrive, then boot the pc from it

ancient nova
#

oh man this sounds complicated... i will have to dual boot there is 199% I will break my entire PC

lyric mountain
#

no, no dual boot

#

you'll boot from the pendrive directly

#

linux doesn't need to be installed on the pc to run

#

I dont remember if the w10 installer comes ready for offline install or not tho

#

if it has an online installer then u can skip the whole linux step

#

oh, and there's that, before u return to windows, disconnect the internet cable

#

so the updater & background tasks that rely on internet dont run

ancient nova
lyric mountain
#

they cant run without internet

#

I mean, they'll execute, but do nothing else other than staying there

ancient nova
#

then why the fuck do they take my disk usage second my pc starts up

lyric mountain
#

because ur connected to the net

ancient nova
#

oh shit shojld I try connecting to wy wifi before I log in?

ancient nova
lyric mountain
#

weird then

ancient nova
#

..

lyric mountain
#

but well, tl;dr: u need a windows pendrive

#

without it u wont go anywhere

ancient nova
#

what about safe mode man..

lyric mountain
#

try it and see if u can download & install windows

#

u cant use safe mode forever, it's just a failsafe boot mode

ancient nova
#

honestly fuck it, I will try resetting with the keep my files option

#

if it doesn't work I will just remake the game

lyric mountain
#

how exactly will u do it?

ancient nova
lyric mountain
#

the whole topic here is making ur pc usable again

ancient nova
#

this button

ancient nova
lyric mountain
#

u have another pc?

ancient nova
#

no I'm going to have to buy one

#

I don't have a lot of money saved up but at this point idfk I need a pc to study as well so I'm just gonna do whatever

#

I didn't even apply for student loans cuz I thought I wouldn't need it xd

lyric mountain
#

the suggested solution would cost $0 tho

ancient nova
#

cloud???

#

they will automatically install new windows???

#

🧐🧐🧐

lyric mountain
#

does it offer an option to install on an external drive?

#

if so, do the pendrive step from there

ancient nova
#

nope those are the only options I see

lyric mountain
#

see cloud download

#

if it has any further options

ancient nova
#

says it will take 4gb

lyric mountain
#

yes, that's the download size

ancient nova
#

might take a while since my current wifi speed is 2mb/s 😂

#

at least it's an upgrade from my old modem

#

they had me live at 10kb/s

boreal iron
#

Go to a train station or mc Donald’s and use their WiFi

hidden gorge
#
print ('Starting BOT')
print ('Finnished importing Discord, Discord.ext, OS , Keep_alive and Music')```
lyric mountain
#

finnished 🇫🇮

#

ye, python is really, really, REALLY strict regarding spaces

#

tho idk any lang that'd allow separating the method name from the parameters

wheat mesa
#

Also I highly recommend not printing “finished importing” that stuff, it happens at compile time afaik and you are doing nothing but clogging your logs

lyric mountain
#

"And they, in fact, didn't read the suggestion after getting the solution"

ancient nova
#

"there was a problem reseting your pc no changes were made" 😁👍😁👍😁👍😁👍😁👍

lyric mountain
#

He can't make a windows pen

#

And doesn't want to wait till tomorrow

#

Browser crashes after starting + disk refuses to do any task + 2mb internet

#

He needs some way to manage to make a windows pen

#

Idk, he didn't try

#

"too much hassle, I'll try this instead"

#

"this instead" apparently didn't work, I was waiting for further input

ancient nova
#

BRUUUUH DOES DOES MY SHIT LAG IN SAFE MODE TOO

quartz kindle
#

does does

solemn latch
#

Atleast it doesnt do do

boreal iron
#

Begin to delete stuff you don’t need or know what it is outside the windows folder

#

As long as the drive is 100% full you will always experience issues since windows having issues in the background, too

#

If any non-system service still causes that much disk usage then kill it in safe mode

#

If your system reboots or crashes then check the service properties and change the dependencies for the service as well as other system services and make sure they don’t rely on that service

#

Also run msconfig and check if really any non-system service known as such is - regarding to the shown service list - disabled

earnest phoenix
#

@ancient nova I figured out why your Windows installation is all acting up, it's nothing related to Windows itself, your HDD is dying which results in Windows trying to do read/write operations but getting extremely stuck, causing corruption and extreme slowness

#

The same thing has occurred to multiple people

wheat mesa
#

cough cough use ssd for your OS installation please

ancient nova
#

fucking cheap ass HDD decided to die randomly for no reason

#

makes me mad

earnest phoenix
#

If you're able to plug the HDD as an external drive to another PC and try to extract the data then sure, with your PC this is impossible because your OS' won't allow it

ancient nova
#

I been going around tryna switxh the tasks that create disk usage off for ages BUT THEY TURN THEMSELVES BACK ON

earnest phoenix
#

Even if you plug your HDD to another PC, it would be extremely slow to extract the data because of it dying

ancient nova
#

I can't open services.msc so I cannot even disable them fully

earnest phoenix
#

Those services aren't the issue

quartz kindle
#

if your hdd is dying, no matter what you do there will always be something using 100% of it

ancient nova
#

yeah I went to task manager -> performance and it only writes and reads a couple kbs

quartz kindle
#

when the hdd is dying, the slightest task will be enough to make it lock at 100% usage for a while

ancient nova
#

0-100kbs

earnest phoenix
#

The same happens to me, my HDD is dying as well

ancient nova
#

average response time 5000 ms

#

kek

earnest phoenix
#

So go get yourself an SSD like I'll be

quartz kindle
ancient nova
#

yeah but all my data lost anyway so fuck this

quartz kindle
#

you can check its status with a program like hdd sentinel

ancient nova
#

thanks for claryifing this for me

earnest phoenix
#

You're welcome

ancient nova
#

at least I can feel at peace since I found the cause

quartz kindle
#

hdd sentinel is my favorite disk analysis tool

wheat mesa
#

I wouldn't store sensitive data on an HDD. They're bound to break at some point, considering they work on physical disks

#

And are therefore more prone to physical damage

ancient nova
#

yeah I didn't think it would just randomly decide to full on 100% brick itself I more thought it would become slow overtime maybe

wheat mesa
#

I've never had an HDD brick on me quite yet

ancient nova
earnest phoenix
#

Even the smallest of scratches on the HDD's disk can make it fuck up entirely

wheat mesa
#

I have had an SSD die once though

quartz kindle
#

also, when buying hdds, check out WD Reds, these disks are amazing

ancient nova
#

clean it prob every yearish

wheat mesa
ancient nova
wheat mesa
#

My pc has traveled literally hundreds of times in my car without any extra protection other than throwing in in the trunk

#

Never had the HDD break

quartz kindle
#

i've had this hdd for like 5 years now

wheat mesa
#

It's just probably an unlucky scratch or something

ancient nova
#

:/ sucks, mannnn I literally just got my game looking so perfect

#

the animations took me a whole ass hour to make

earnest phoenix
#

Should've pushed the data to a remote repository

ancient nova
#

then I was imaging the whole ass map was excited for tomorrow lowkey and it died the next day

wheat mesa
#

pixar animators laughing in 27 hours of rendering time per frame

ancient nova
#

literally next day

#

when I get my new PC I'm smashing the HDD so hard

quartz kindle
#

best hdd i've ever had ngl

boreal iron
#

Eww WD

wheat mesa
#

I'm running a Seagate 1tb HDD rn

#

I think

lyric mountain
wheat mesa
#

Actually no I'm running a WD

#

Shit has lasted me nearly 4 years

boreal iron
#

Iron Wolfs are the way

quartz kindle
#

Wd blues are bad, they last 1-2 years
but Wd blacks and reds are amazing

lyric mountain
#

tbh, most life-estimate benchmarks are done with intensive I/O ops every second

wheat mesa
quartz kindle
lyric mountain
#

unless ur purposely trying, it's hard to outlive a home hdd

quartz kindle
#

its paid (but i hav crcked lul)

boreal iron
#

Evil boy

quartz kindle
#

best hdd analysis program i know

ancient nova
#

😂😂

#

surprisingly easy to disable signature checks

#

without even the need to decompile fully

#

just edit the smali

#

^ on android

boreal iron
#

Probably installing tons of malicious shit killing your drive or taking 100% usage

#

*incl.

ancient nova
#

24/7 adblocker, most of the time a VPN, my modem has builtin HTTPS filtering as well

quartz kindle
#

my hdd will outlast my ssd lmao

boreal iron
ancient nova
#

everything I download I scan through virustotal

#

😁👍

boreal iron
#

Tf is this again

wheat mesa
#

13k hours of life

#

more than 1300 boots

boreal iron
#

How does Adblock and a vpn save you from installing malware?

#

Oh no, fake don’t , no no

#

Don’t get into it

quartz kindle
boreal iron
#

It’s Bea

quartz kindle
wheat mesa
#

I'm only like 200 days behind you!

ancient nova
wheat mesa
#

(I've only had this pc for 3 years and 2 months)

quartz kindle
#

xD

ancient nova
#

also scan everything I download with virustotal

#

my hdd was barely 5 years old

wheat mesa
#

unfortunately I cannot say the same for my SSD

#

The old one died at about 6k hours iirc

#

Well, doing the math that's about right actually lol

ancient nova
#

💀

quartz kindle
#

rip

wheat mesa
#

new ssd in top tier condition however

ancient nova
#

well I'm going to sleep

#

good night

boreal iron
#

Speaking about hdds

lyric mountain
wheat mesa
#

I have a WD blue that's lasted me for a long time

#

(I think it's a blue?)

boreal iron
#

Blue is bad

wheat mesa
#

yeah it's a blue

boreal iron
#

I agree to Tim here

#

If you wanna choose WD then better choose red

quartz kindle
#

still not as bad as seagate barracudas

#

:^)

boreal iron
#

True

boreal iron
wheat mesa
#

(Rough car rides too)

boreal iron
#

The Iron Wolfs and WD reds are the best consumer rated hdds on the market I’ve seen so far

#

And after many many years in my server the raid is still running

#

Even the much older 10y SAS raid is still alive after a lot more than their estimated TBW lifetime

#

Saving fotos and videos of security cams 365d around the clock

quartz kindle
#

👍 agreed

boreal iron
#

Unfortunately it’s complicated to check the sas smart data

#

I wonder how it now looks year(s) after I checked the TBW the last time

#

I mean depending on how much the cameras been triggered I sometimes see more than 400GB of files transfered via ftp to the drives within a month

#

But sadly raid controller doesn’t report the smart values to the system

#

Barracuda

#

_until it dies unexpectedly _

#

If you have m.2 then sure utilize it

#

Can’t say much about crucial

#

My choice is and will be Samsung drives for ssd consumer hardware

#

Using evo and pro line also for … idk forever already

#

Not one dead drive yet

#

While I had deaths for others like Kingston and asperia

#

Dunno why I bought that trash many years ago

#

I mean yeah the first generation of ssds years ago had many many issues

quartz kindle
#

crucial is also alright

#

not as good as samsung but decent

#

i usually check ssd benchmarks and aim for the ones that have the highest stable r/w performance

#

an m2/nvme ssd can have anywhere from 0.5 to 3.5 gbps reads and writes lol

#

some have 2gbps read and 1gbps write or other weird ass configurations

#

if your hdd is in good shape, i would go a full wipe and reinstall from scratch

#

oh wait, you're not bae

#

nvm

#

good stats tho 👍

boreal iron
minor olive
#

@quasi depot

quasi depot
#

I needed help self hosting a discord bot.

minor olive
#

Okay. Do you have a raspberry pi out of curiosity?

quasi depot
#

Respiratory?

quartz kindle
#

lmao

minor olive
#

No, it's called a raspberry pi. So I'll assume you don't have one. Have you looked into https://replit.com/

#

It's a free python hosting service. With a few tweaks, it can keep your python code running 24/7

#

If your bot reaches more than 100 servers though, you might want to look into something more powerful, but this can get you started

graceful veldt
#

Lol what 😂

quasi depot
#

Huh, I don't need a coding software, I just need help determining if this open source code is scripted right or nothttps://github.com/JaceMMbot/Bloxlink.git

GitHub

Roblox Verification bot written in Python. Open-source as of 12/19/2020. - GitHub - JaceMMbot/Bloxlink: Roblox Verification bot written in Python. Open-source as of 12/19/2020.

minor olive
quartz kindle
#

thats literally a 1:1 fork from bloxlink with zero modifications

quasi depot
#

...

sturdy lodge
minor olive
#

yes

quasi depot
#

I tried self hosting, But kinda kept giving me errors, Thats why I need a python coder.

minor olive
#

well, a different coder isn't going to fix the errors

quartz kindle
#

so you want to run a bloxlink clone?

oak cliff
#

itd probably be easiest to ask in the bloxlink discord server if they have one

#

theyd know the common errors and how to fix them

quasi depot
quartz kindle
#

did you check the dependencies and configuration instructions from their readme?

#

for example installing mongo and redis

minor olive
#

Also what "errors" are you getting?

quasi depot
#

Yes, I was close to starting the bot, But was unsuccessful, As of I managed to load the commands.

#
C:\Users\rudei\Bloxlink-2>python src/bot.py
Bloxlink | INFO | Loaded cache
Bloxlink | INFO | Loaded utils
Traceback (most recent call last):
  File "src/bot.py", line 7, in <module>
    from resources.structures.Bloxlink import Bloxlink # pylint: disable=import-error, no-name-in-module
  File "C:\Users\rudei\Bloxlink-2\src\resources\structures\__init__.py", line 7, in <module>
    from .Arguments import Arguments
  File "C:\Users\rudei\Bloxlink-2\src\resources\structures\Arguments.py", line 6, in <module>
    from config import RELEASE # pylint: disable=no-name-in-module, import-error
ImportError: cannot import name 'RELEASE' from 'config' (C:\Users\rudei\Bloxlink-2\src\config.py)```
quartz kindle
#

also

We do not provide support for self-hosting! This package has been made open-source to aid with contributions, not so you can run your own Bloxlink for private use. If something breaks or there's a vulnerability in a version you use, then you're on your own.

For this reason, we recommend using the official hosted bot at https://blox.link which is given regular updates.

Also, keep in mind that we use the AGPL-3.0 License, which means you're required to keep your local version open-source and state all changes that you have made to it.

quasi depot
#

Thats the whole point on why I am here,,,

#

If they had a support channel, I wouldn't be here.

minor olive
#

They are already hosting it. They just posted the source code.

quasi depot
#

"Self-Host"

#

Trying to use that code to "SelfHost" my own version of the bot.

minor olive
#

why do you want to selfhost it?

quasi depot
#

.,.

#

you can run your own Bloxlink for private use

boreal iron
#

Looks like there’s some constant called RELEASE missing in the config.py

minor olive
quasi depot
#

That’s not the topic.

#

I am trying to self host the bot for personal use.

#

And for practice.

boreal iron
#

Add the following to your config:

#

RELEASE = LOCAL

quartz kindle
#

constants.py contains this ```py
RELEASE = env.get("RELEASE", "LOCAL")

boreal iron
#

Oh

minor olive
#

Oh yep

boreal iron
#

Weird

#

Ah reading the configuration notes

quartz kindle
#

but according to the error, its trying to load RELEASE from config

boreal iron
#

They can be defined in your config and as env vars

quartz kindle
#

so yeah try doing what Fake said

#

add RELEASE = "LOCAL" in your config

minor olive
boreal iron
quasi depot
#

Will do, I will let you guys know the results, But it’s quit late, So won’t be able to try today.

#

But thanks for all help.

boreal iron
#

lol

quasi depot
#

Not a waste of time.

boreal iron
#

Why didn’t you ask tomorrow then?

quasi depot
#

Well I was going to get back on, But don’t feel like it.

boreal iron
#

We wanna know the results or we can’t sleep

#

Errr not today!

#

That’s more important

quasi depot
#

Tomorrow…

boreal iron
#

Alr im sleeping now, too

lyric mountain
#

Damn that's more cliffhanger than mexican novels

sharp geyser
#

explain this

lyric mountain
#

They'll try the solution tomorrow

sharp geyser
#

Lmao

sharp geyser
lament rock
#

wakey wakey. It's time for school

topaz portal
#

Can someone suggest me a road map to build bots on my own

civic scroll
#

just think about what you want to build

#

like "what do you want your bot to do?"

raw nest
#

I'm in Laravel and I don't know how I can do that.
This works:

    Test::with("test1", "test2")
      ->where("id", $this->id)
      ->get();

How can I specify the column in the where statement? Like this:

    Test::with("test1", "test2")
      ->where("test1.id", $this->id)
      ->get();

If I execute that I get the error that he doesn't know column "test1.id"

rich flume
#

Hi, does bot need some extra permission to send ephemeral message as reply to click on button? that is not included in the following list of permissions: View Channels, Change Nickname, Send Messages, Public + Private Threads, Embed Links, Attach Files, Add Reactions, Use External Emojis + Stickers, Read Message History, Use, Application Commands, (Connect, Speak, Video and Use Voice Activity in Voice Channels)

neon leaf
#

does someone know how to add cli commands to a bot? something like setbal, addbal, rembal (js) because if I currently type anything while the bot is running it just shows in the console, nothing more

rich flume
#

I just run commands from script file (.sh) executed from the bot

boreal iron
rich flume
boreal iron
#

Is there any error regarding the ephermal message?

rich flume
#

no it just dont send it

boreal iron
#

I assume you're just responding wrongly

rich flume
#

well it works in other servers

boreal iron
#

Is the ephermal message the first (initial) response to a button interaction or a follow up message etc?

rich flume
#

first - it is response to button

boreal iron
#

And how do you it's not working in some servers?

#

*know

lyric mountain
rich flume
#

it doesnt work in the top.gg testing server according to the bot reviewer

lyric mountain
boreal iron
rich flume
#

component is: SocketMessageComponent component

boreal iron
#

oh uhm...

neon leaf
lyric mountain
rich flume
#

no lol

lyric mountain
boreal iron
#

maybe accidentaly whitelisted to one guild only?