#development
1 messages ยท Page 228 of 1
what kind of info are you looking for?
wdym by stream data
thats literally the file itself?
its a discord attachment
when you said "without download" i though you meant like, metadata or something
the stream is literally the download
I was trying to see if I can avoid downloading the file to get the raw data of said file
yea well tim, here's the thing I am not smart
lmao
I just didn't want to download the file only to upload it using minio to a nother location on the same server
๐
you cant not download the file, what you can is not wait until the download is complete before uploading
Honestly, I wonder if I can download the file to my minio bucket folder and just have minio fetch it

Im not sure how minio works internally if it stores any kind of data to easily find the files or not but im sure it just reads through the dir (bucket) until it finds the file it needs
if you pipe the download stream into an upload stream, thats basically redirecting the download to the upload
its still downloading the file, just immediately uploading it again as the download comes in
without saving the file
How does that even work
you know how streams work right?
ok so
a stream is like an event emitter but also a data manager
a stream object can receive data and can emit data
so for example, a network connection uses a stream object to emit data events as the data comes in
you can also create a write stream to send data through it
the thing about streams is that the data always flows in pieces
small parts at a time
thats why its like an event emitter

when you open a file on your pc, the program creates a stream of that file
and slowly reads it from disk
you get data events for each piece that it reads
and you can do things with it as it comes in, withou waiting to load trhe entire file at once
I see
so do I have to build those pieces together as they come in then upload, or do I just upload the pieces as they come
you can upload the pieces as they come, that way you dont need to store them nor assemble them
youre basically proxying the download
Icic
time to figure out how to do this in C#
so you can pipe from one stream to another
and it takes care of doiung it for you
for example in js:
const abc = fs.createReadStream("somefile")
const xyz = fs.createWriteStream("newfile")
abc.pipe(xyz)
that is the same thing as:
const abc = fs.createReadStream("somefile")
const xyz = fs.createWriteStream("newfile")
abc.on("data", chunk => {
xyz.write(chunk)
})
so what you want is to get the download stream and pipe it into the upload stream

Yea so thats all fine and dandy
but doing this in C# is going to be painful if idk the classes to use.
Googling gives me shit from 10 years ago that are now deprecated and no longer work
rip
MinIO API responded with message=Data read 0 is shorter than the size 5077 of input buffer.
wtf is this even supposed to mean
maybe discord wont let me read the data from it
theres no such thing
well
now im getting a new error
[2024-06-22 21:08:14 -04:00] [0 /Showcase ] [Crit ] Cannot access a closed Stream.
for some odd fucking reason the stream is closing

check connection status
also, if you want to use the stream, you cant do anything else with it
stuff like reading headers or body will automatically download the stream, which closes it
using (var client = new HttpClient())
{
using (var response = await client.GetAsync(picture.Url, HttpCompletionOption.ResponseContentRead))
{
response.EnsureSuccessStatusCode();
using (var stream = await response.Content.ReadAsStreamAsync())
{
args
.WithBucket("showcase")
.WithObject($"petpics/{image_id}.{picture.MediaType.Split('/')[1]}")
.WithObjectSize(picture.FileSize)
.WithStreamData(stream)
.WithContentType(picture.MediaType.ToString())
.WithServerSideEncryption(ssec)
.WithProgress(progress);
}
}
}
this is all im doing tho?
response =await client.GetStreamAsync
what
you get the stream from the client
not from the response
the stream itself is the response
oh
๐
MinIO API responded with message=Data read 0 is shorter than the size 5077 of input buffer.
bro
what
๐ญ
Wtf am I doing wrong
How is it 0
reading the docs and shit
client.GetStreamAsync returns Task<Stream>
.WithStreamData expects Stream
so you need to get the Stream from the Task first
time to figure that out
altough, shouldnt await do that?
also, how do you have picture.FileSize?
where are you getting the size from?
[Option("picture", "Picture you want to upload!")] DiscordAttachment picture
its a slash command option
I thought so
ah so you get it from discord ok
but if I do response. it shows a lot of methods

it is a stream
but its nullable
how about this
using(var response = await client.GetAsync("http://httpbin.org/get", HttpCompletionOption.ResponseHeadersRead))
{
if(response.IsSuccessStatusCode)
{
using (var stream = await response.Content.ReadAsStreamAsync())
using (var streamReader = new StreamReader(stream))
Sometimes s3 can be fussy
args
.WithBucket("showcase")
.WithObject($"petpics/{image_id}.{picture.MediaType.Split('/')[1]}")
.WithObjectSize(picture.FileSize)
.WithStreamData(response)
.WithContentType(picture.MediaType.ToString())
.WithServerSideEncryption(ssec)
.WithProgress(progress);
``` thats what WithObjectSize does according to the docs
Directly putting objects from user input (MemoryStream) to an S3 object storage using Min.IO can cause a wired error of Exception has occurred: CLR/Minio.Exceptions.UnexpectedShortReadException Exc...
streamReader.BaseStream?
I saw that, but that doesn't help
honestly bout to say fuck it and just make my own minio 
this returns a new error
[Error] MinIO API responded with message=Data read 0 is shorter than the size 1258 of input buffer.
I find out very quickly I fucking hate popular libs
it actually happened
the first cuid2 colliided
rjns-mcvapi_web | ERR 23.06.2024, 11:15:04 HTTP Request Error
rjns-mcvapi_web | (http.handle.onRequest)
rjns-mcvapi_web |
rjns-mcvapi_web | PrismaClientKnownRequestError:
rjns-mcvapi_web | Invalid prisma.aPIRequest.create() invocation:
rjns-mcvapi_web |
rjns-mcvapi_web |
rjns-mcvapi_web | Unique constraint failed on the fields: (id)
rjns-mcvapi_web | at In.handleRequestError (/app/server/node_modul
L
time to work off the backlog now
I don't want a border at the intersection of the topbar and sidebar. Is there anything I can do?
Adding border-l-white to topbar doesn't work.
i'm using tailwindcss
maybe try using outline instead?
there is outline offset
not sure about tailwindcss version
thank you
I guess we don't have the chance to give the outline to a single side, like a border?
ain't no way. I left my program run overnight and it tripled the data ๐ญ
deadass went from 8tb -> 24tb cuz i am not removing intermediate keys and i am copying each block 3x to be more error resilient when processing in scala lmao.
how can I get the members having x role in a specific server?
.jsk py
g = ctx.guild
role = await g.get_role(1216080016048259303)
yield len(role.members)
this returns 1 which is false now, well it used to work not anymore
I believe because the bot is in a lot of guilds and doesnt get to cacheup etc?
whats the best/most performant html parsing library in js? im thinking of writing an email quote parsing library that also handles HTML
since the only one i saw on npm is 10 years old and doesnt support HTML emails
i remember hearing about cheerio but it sounds kinda heavy
actually ill probably end up using cheerio
oh actually i want it to run in the browser but i dont think cheerio supports that
cheerio is just an implementation of jquery
i am not importing jquery
maybe you can use whatever they use under the hood
i guess my thing would just have to use a hybrid approach that detects the environment
if its node it will use cheerios parser
if not im sure browsers have the ability to parse and modify HTML
although that will be annoying
they want the opposite
well just create an element
ive looked at that but not sure if it can work in the browser
if i were to make a library id want it to work both in browser and node
but for now i can write a frontend implementation
you can do it natively im pretty sure that way
i could make 2 libraries, one for node and one for frontend but that can be annoying
yeah in the browser i can use DOMParser which is probably very fast since it uses the same backend as the browser for parsing pages and manipulating DOM
for node I can use this library that way i can retain as much of the same code as possible, but not sure how id go about that hybrid approach
Guys lets say my chrome got corrupted. How do i decrypt my cookies from the folder
Scientific research bts
Oh so there is this master key
I could see it done with Deno. But it really depends on what the bot does
What lib are u using
theres nothing deno can do that node cant
D++, his own C++ discord lib
Yeah i can't speak without testing
Thats actually crazy lol
its possible, if you display fake server counts
onto a floppy disk?
yes
ok
Lmao, but nah honestly discordeno is good
Idk if u have looked into it
๐ฅ๐ฅ
Servers?
Requests for what
http requests
Bruh
Do u use prisma
sadly yes
I kept my http request counter going by mistake for 4 years on triviabot
Prisma is a life saver wym sadly
when I checked it said 90 million
prisma is slow as fuck
Crazy
drizzle on top
hmm what's prisma again?
db orm
ah
Do u just use raw sql
รญts impossible to use prisma without some raw sql too
designed in an external app
way too restricting
I build my queries on mysql workbench then use explain to optimise them
For my apps i only had to create schema and thats about it
I do like having migrations
trying to manage dev, test and live without migrations is painful
Migrations are indeed the main reason i use an ORM
I usually roll out migrations from the web using Laravel eloquent
What u are using rn does it support node or bun
and then raw queries on the C++ side
prisma
im slowly switching to drizzle
Does drizzle support node
Okay
bun is slow
deno is bad
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Do u just use discord.js
sometimes
https://github.com/brainboxdotcc/ssod/blob/main/src/commands/achievements.cpp#L65
this is what queries look like in my bots
One of my friend save 80% resources switching to deno
all my bots share a similar db namespace, they just work differently internally on the newer bots
Nice
I save 5ms cpu time per request by staying on node (compared to bun)
Bun spares me the pain of setting up tsc
bun leaks memory for me
I saved most CPU time per request by:
- caching prepared statements instead of preparing every time
- switching to Unix sockets for connection
first one cuts the time per request by orders of magnitude
Brain be braining
ye prepared stmts are amazing
Where r ur servers located
you can do that on most db libs
what is also amazing is running most unimportant stuff after the request finishes
but everyone seems to follow the pattern of.... oh look a query! prepare, execute, get results
you can cut out that first step and it's mega slow
R u using mysql or psql
Thats the way lol
i dont get why people do it externally
if I need to I can do replication
Same unless u run it in aws with rds
I replicate to usa, singapore and eu currently
one less thing to manage, they're intimidated by it's configuration
especially for master master replication
Do u use a dedi or smthn like aws
I'm not replicating rn though
I have two dedicated servers, one holds sporks and triviabot and their DBs, the other is for seven spells and beholder and their DBs (and sites/dashboards)
both are now massively over specified
I could run all the bots on a potato and I'm paying for servers that could run a js bot
sure, my bots are kinda built for it
but in practice I won't need to scale at all until tens of millions of guilds and that isn't gonna happen lol
Cpp coming in handy
Go if u wanna get hired
CPP is fun
Rust if u wanna overkill
Cached in which way?
hi krypton
when you call prepare, mysql returns a pointer to a struct, store it alongside the query string and pointers for the parameters
long time no see
when you want to execute it again fill the pointers and call execute
Aren't prepared statements already getting cached on the DBMS?
not in that way no
they're cached by the dbms only if you save that structure
that's your handle
Yeah, so the difference is significant enough?
otherwise every time you tell the db server to reparse the query string for parameters
sup
yes, you cut out a whole interpretation of a text based language
it's like the difference between compiling a C program then running it, or just running it
Yeah but I learned that it caches the statements and then just replaces the parameters
As being the default behavior of prepared statements
not if you discard the struct
some high level libs will retain that for you
in C and C++ it's your job
Yeah fair enough
you can time the difference with a profiler, it takes the time to execute some queries down from 1ms to 0.1ms
Well if there is effectively a difference then it surely does help 
triviabot doesn't do this caching btw
it does other stuff, with a thread pool
triviabot has different database needs than seven spells
Not worth it or not the motivation to do it?
different requirements
triviabot has other abilities to push a db query to the background
if i dont care about its results, i can push it to a second thread
where it runs some time later
but the function returns near instantly
seven spells doesnt have this (yet)
also triviabot has a connection pool of many connetions and round robins queries between inactive connections
^
think they mean a h1 or something
probably bot page on topgg or something
or on discord
markdoown
big thing
yeah, you're not supposed to
it's supposed to be a very short description of your bot
you shouldn't need to bold
it'll only affect it when inside your bot page
not in the bot list
also can you even do it anymore? the css classes are changing all the time
you cant use markdown there
what tim means is that you can force styles upon the headline using css in the long description
but this will only change if inside the bot page, not at the bot listing
Is there a way to change all scrollbars with single css?
can you not use * {}
wdym
in what context?
oh you are talking about in css
Sure you can do that if you are making a global css file
but if you want to fine tune the scrollbars or other aspects of a page individually its better to tap into that class itself
do u want to only change the color or...?
I have been waiting in the queue for fucking 21h
My cluster is clogged
deadass constipation
its over
dw our brs are fast
!help
Help Menu - Page 2 of 3
guess: Play a number guessing game.
help: Displays the help menu.
ping: Display the ping
quiz: Play a trivia quiz game.
spam: Spam a message repeatedly
You do not have permission to use this command.
oh ๐ฆ
A self bot
There was an error trying to execute that command!
Found him in my server lol
!help
Help Menu - Page 1 of 3
addy: Display the owner ltc
avatar: Displays the avatar.
calc: Perform arithmetic calculations.
donate: Provides the donation address for Litecoin.
getbal: Get the balance of a Litecoin address
!calc 1+1
Result of 1+1 = 2
lmao
My Addy 
Address: ltc1q7eaxgncqv7cqecz4sseucge0m09qmezk33qlda
Confirmed Balance: 0 LTC
Estimated Balance (INR): โน0.00
!calc 1:99999999999999999999999999999999999999999999999999
An error occurred while calculating. Please check your expression.
๐ฆ
Well handled
alrighty, done goofing with it @tawny condor
what the fuck lmao
WAIT
I HAVENT HAD MY FUN
๐ญ
I wanted to see if the calc function would return a token

It would have just been the users token
color radius etc.
problem with modifying scrollbars is that Safari, Chrome, and Edge all use --webkit-scrollbar-x but firefox doesn't
mozilla has limited support for customizing scrollbars
as for how to do this
Easiest way to see is by looking here
It tells you how to do this on Safari, Chrome, Edge and Opera
I'm using svelte and even though I place css code in the style in app.html, the scrollbar does not change.
Firefox is different where it only has scrollbar-width and scrollbar-color
Are you importing the css file into the html?
I dont remember how svelte handles global styles
Oh I did it somehow and now it's working
this worked for me thank you
sweet!
ha L blud has zero balance
L-coin
L
Yes
Why bother making your own?
If you want random and truly unique, use GUIDs
If youโre just generating random bytes then thereโs a very tiny chance you get the same number twice
Very very tiny but still possible
another option is to just allow the database itself to generate the value
besides, why not just use a sequential number?
boring
real programmers assert their dominance by using long and complicated strings as IDs
(literally every big tech)
there's little value in using random numbers when an autoincrement column would do
one session for each device
its not that hard, if session cookie is present check if its a valid session in db, else delete cookie and redirect to login page
if there is no session cookie, show login page
https://chibi.takiyo.us/iypGdqr0JkRw.png is there any magic that i don't know in c# !???
how can i add svg in my vote log?
no idea, but you could try adding Log.Information(result.FirstOrDefault() != null) as well as the "yeah", both before the if
oki imma do that
im using sharp/SVGtoPNG but it is reducing the image quality
what png settings are you using? quality, size, etc
uh yeah damn idk is it because of the driver or c#, once result.FirstOrDefault() called, the next call will return null
something like this?
๐
that makes sense, once a value is consumed it is removed from memory
many things use such a system, like streams
oohh it's about memory,, pretty expected from c family langs lmao
const pngBuffer = await sharp(Buffer.from(svgData))
.png()
.toBuffer();```
thanks anyways!
i'm using sharp here
check the sharp docs to configure the png settings
okay
svg does not have a size by default, you need to specify the size you want
ohh
converting vector images (svg) to raster images (png, jpg, webp, etc) will always incur a quality loss
simply because svg has infinite detail, whereas png is constrained to pixels
also if ur using it to draw, you can use canvas instead of svg, this way you remove the middleman conversion
yup i'm using canvas
then why are u converting from svg to png?
canvas on node right?
iso format
timestamp does not store timezone info
it is +0 isn't it
Wdym
You realistically shouldn't
You can't really serialize the entire struct like that
you would have to serialize a side effect of one of the functions on it as it gives a proper return value
yeah timestamp is always utc
but even so, if you do need the timezone you can store it as two values, like [timestamp, timezone]
still probably more space efficient than ISO xD
or better yet, if you need a string version, you can do base64timestamp+-base64timezoneoffset
hey tim
question
what's the diff between a for and a while loop? Like syntactically I know the difference, but beyond that
Like why is there a need for two loops
for is for iteration over an IterableIterator. While does stuff while a condition is true which can be totally unrelated to iteration
Well, you can treat for like a while loop kinda, but for loops usually just go in the direction of for (let i = 0; i < someInt; i++) meaning it has a definite lifetime
i see
you can do like
for(let i = 0; ;i++){}
to make it essentially a while loop right?
or iirc you can even do for(;;){} ?
at least in js
I can't say if those are syntactically correct as I've never encountered them or used them but if so then probably. Then you'd just escape that loop with break;
yea
I just tested it it works
kind of neat
but you have to pass it something don't you?
for (int i = 0; i < MAX; i++) {
...
}
``` is transformed into ```java
int i = 0;
while (i < MAX) {
...
i++;
}
``` during compilation
I think when the JIT goes over a for loop, if it has a fixed lifetime, it can just unroll the loop making it just execute a fixed number of times which is more performant
Cause I was looking at it and wondering, is for just a glorified while loop?
Just supposed to be "nicer" way of writing it
correct, but there's a threshold for that
it applies to both for and while loops btw
as they're effectively the same
Yeah. I've had my fair share of unrolling in GPU shaders
it's a way to have your loop wrapped into a single block
also helps that the variable is promptly available for GC as soon as it exits the loop
Unless you're using var :)
I use var often
(in javascript)
wait till u learn about goto and comefrom
people actually do that
but why tho
because its shorter to type than while(true){}
but basically while and for exist to cover two different cases, one where you know exactly how many iterations its gonna take, and one where you dont
yup
but i guess knowing how many iterations can make it easier to optimize at the compile level
because you can "unroll" loops
and convert it into linear code
I see

basically the compiler can compress the loop into fewer iterations that do more at once
cant do that if the loop conditions are unknown
my competition when giving me that code and asking me to resolve it manually without a computer: 
grab your pen and paper :^)
also, just noticed that kuuhaku and papi already answered the question before,sorry for butting inยณยณยณยณยณยณยณยณยณยณยณยณยณยณยณยณยณยณยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒยฒ
ong
this guy
Tim trying to hit the discord's rate limit:
No, he's just cluttering up that user's chat (I assume)
(incorrectly)
so guys
i have an issue
my mic has randomly stopped working on discord, out of nowhere
i was in a call, and somewhere in the middle of the call i noticed people couldnt hear my and my icon wouldnt turn green
ever since then i already reinstalled discord, restarted pc, etc and my mic still refuses to work on discord
but it works on windows audio test and browsers audio tests lol
mine kind of doing same thing but my whole discord stops working
leave and rejoin the vc
if that dont work
make sure discord didn't swap the input channel
sometimes they like doing that on their own
if you dont mind me asking
built in laptop mic
oh uh
just tested discord on the browser and it works fine there
goodluck
but on the desktop app it doesnt
yeah it works if i plug in a headset, but doesnt with the built in mic
im gonna try mess with drivers
why is 3 < "3" valid
does js ignore the "" during comparison like that?
because if I do 3 < "6" it evaluates to true
it tries to coerce it
x > y is generally equivalent to y < x, except that x > y coerces x to a primitive before y, while y < x coerces y to a primitive before x. Because coercion may have side effects, the order of the operands may matter.

why though
That seems like something you shouldn't promote/allow
A number can't be greater than or less than a string
it can
its used to compare string char codes

aac is bigger than aab because aac comes after aab in alphabetical order
Honestly forgot charcodes was a thing
๐
so wait
oh wait nvm
I was about to answer my own question
back to the audio thing
i found out the mic was having a lot of noise for some reason, so i rolledback to some older drivers and the noise is better, but still doesnt work
unfortunate
then i disabled this
and now it works lol
ffs
if i chose single presenter or multi presenter, it stops working
wtf
fucking ai bullshit
buzzword for basic signal processing to remove some noise via high and low pass filters that has been around since computers were around
yeah, but it used to work until now
then suddenly those 2 options got borked
well at least my mic works again
did windows update?
the weirdest thing is that it suddenly stopped working during a discord call
an update could of borked it
probably some windows engineer fucked up and their code had a bug in it
it wouldn't be windows otherwise
๐
say what you will about apple
but their software is top notch
just the price is so fucking high

their software is good because its only tested on a handful of proprietary platforms
right
so they have much more control over it and freedom to optimize
but sometimes they still produce garbage anyway
indeed which I think is a good thing
its cool your os can work on a number of hardware and platforms
but that comes with stability costs
i dont know what is the current state of macos, havent used it since like 10.7
It's not terrible
but i absolutely hated how apple would try to hide everything from the user
Just the prices are so abnormally high its ridiculous
there were literally no progress bars or any progress information for basic stuff like syncing, uploads, etc
trying to download images from an iphone into a mac was such a pain
quite honestly if you dont have a m series chip you dont buy a macbook for anything serious
you need a m series chip to do anything worth while
oh yeah
tim
speaking of mic issues
my mic array caused my system to bluescreen'd 4 times
dafuq
just by unplugging my headphones
dafuqยฒ
same question
man if only we could write drivers in js
we would just write our own drivers
and throw their garbage drivers out the window
rip
reminds me of that one where a job posting was asking for 10+ years of experience in something that only came out 4 years ago
do it
Im sure if its you
you can find a way
๐
At this point im starting to question if you arent the one who wrote js
its actually quite simple
all you need to do is write some node gyp bindings so you can access kernel resources through js
you could even have the js read and write from memory locations
this is literally the only binding you need for this
void write_to_memory_location(JS_NUMBER address, JS_NUMBER value) {
*(uint64_t*)address = value;
}
then you receive SIGSEGV
signal seg v?
- the entire windows bullshit ecosystem you need to navigate through to make your thing be accepted as a driver and integrated into windows
- the entire device io specs and shit which you probably wont find any resources about and would need to do shit like dump usb data and analyse low level registers and switches and what not
segmentation fault
makes sense
although since youre kernel you wont get that
you got this
youll just get undefined behaviour or the system will crash
lol
JS-OS when?
its already been done
although its kinda cheating since its user space that runs as js not kernel
but you could definitely make it kernel as well
lmao
kernel written in ts and compiled to asm
user interface powered by webkit
written with svelte
imagine, a kernel with v8 embedded into it
:^)
a kernel with an embedded v8 that runs the system core, and then spawns more v8 instances for system processes
and every user app is based on another v8 instance
so every single software written for this os needs to be written for v8
"Your OS is just a huge Electron application"
basically

oh yeah, every single system app has access to chatgpt
clock, calculator, notepad, restart button
every single button runs on its own v8 instance
:^)
ngl if you could make your system just one browser instance and style it with html and css, that'd be pretty cool. Sub apps could be iFrames or just child nodes
all of this youre saying is very possible
but theres not much of a point
most custom operating systems now are written for embedded devices
those need to be very performant and do a lot with least power on very small chips and power available
js is a big no
for more desktop sized machines you just have linux kernel and you can run js on there as much as you want
you can easily rice your os by opening devtools ๐ค
rice?
how would you play games
the games themselves would have to be webgl ported
unless you are fine playing those boring games that they got available on the browser
Can write wrappers for APIs to run in the browser context
You aren't limited to a browser as an app. The browser is the whole system
a linux term for customizing
pro
no u!!
!!!
I have 3 audio drivers ๐
Wtf
do you use something by dell?
Yes... but I can't afford for anything else, the laptop I currently use was like 150โฌ, my old pc was also a laptop and it already has 4 years when my mom bought it for my birthday, I just noticed that when that old computer started lagging, I just saw that it had actually 7 years (it's really dead though and it's a very big old laptop, second-hand)
I can only use this laptop, my parents wouldn't buy another computer if I break mine
That's shit, I want MSI Katana or Razer Katana lol forgot the brand name
but it's like 4 numbers cost
What can I do to use only one? I'm afraid to RIP my audio card if I do this
But it would reduce memory usage though, but I still want audio lol
i personally use realtek audio
seems like that rtk (?)
"RtkNGUI64.exe and RAVBg64.exe are the Realtek Audio device driver on your PC. LogiLDA.dll is the Logitech Download Assistant. HPStatusBl.dll is the Taskbar icon app for your HP Printer driver software."
yes
so maybe just remove that wavesvc
Why there is 2, like ???
Okay
You know what it actually is ?
wavesvc ?
I'm gonna update my audio drivers
"What is WavesSvc64? Wavessvc64.exe is associated with Waves MaxxAudio Service Application, and it's a part of Waves MaxxAudio or Realtek High Definition Audio Driver." ๐ part of realtek too
Okay I remember the name, is it Senko-san? 
damn you still remember that username ๐
On that note
it was like 2-3 years ago
It's from an anime
I didn't watch
But no, I remembered nothing
Yeah ok
oo yeah senko-san
ofc you can cache things
Or like
Like, just store metadata, and it's permanent
its not permanent no
cache should never be permanent
it should always drop when the process ends
If by permanent you mean while hte process is running then yes
during the duration of the process running it will remain there
once the process exits/stops it too should be dropped
and modern langauges have garbage collectors that do this for you
Yeah if I want it to be kept if it's not running, it's actually called a db lol
yea
yea
depends on how long you want to hold onto that data
if you want to forever keep track of who voted then use a db
if you only care about temporarily holding onto it cache it in memory
Actually, maybe it's useless for now, well, when I voted, my server crashed because I haven't well handled the request, it says that if doesn't return status 200, it will retry, but my server was down for several minutes, when I started my bot, topgg stopped retrying....
I said useless, because I have a reward system when someone votes
but it's not actually instant reward
But if a user voted and didn't receive that reward I should... well, verify if the user voted when the bot starts
I disagree
Don't do that at start
Imagine you have a bunch of users who voted when your bot went down
It uses RAM only at start
ram isnt the issue here
its the api spam you are thinking of committing
That method has a fault where if there are a lot of users, you are going to be spamming top.gg's api to check
Ima be real there is no real way to handle this
a cmd is the best bet
unless you make your own api that builds off of top.gg's api that you run on a separate process from the bot
so if the bot goes down, if they vote you are still logging it
Yeah that's pretty interesting
then whenever someone runs a vote locked command fetch your api to see if they are in the recently voted list and they haven't expired
I can make a separate webapp / rest api server
That's one way yes, it'd save you from fetching top.gg all together
build it into your webhook
that top.gg will post to when someoen votes
But my bot actually needs a database, and the server needs to send a message as the bot into a channel
So my bot "server" also needs a server
you will already be making a web api for webhooks with top.gg's vote system
just use that
I yes lol, I created a webhook for voting, but I used my bot user instead lol
One thing you can do is
Cache it locally, when your bot requests your api check your cache if its not there check top.gg in case your api missed it
But my bot should send a message to the user when the latter vote
Yup
It's a good idea
you will want to use a timed cache btw
So records expire in corrospondence to top.gg's vote system
How much hours or days ?
as people can vote every 12h iirc
aj ok
I do with a date
Yeah
I can compare votes with timestamps
Yeah that's not good
Well I'm gonna do that surely when I have the time
keyv is a good way to cache things
Wow
it stores it in memory
Thx
or
npm install --save @keyv/redis
npm install --save @keyv/mongo
npm install --save @keyv/sqlite
npm install --save @keyv/postgres
npm install --save @keyv/mysql
npm install --save @keyv/etcd
any of these
keyv is more than just a cache it can also be used for persistent storage with things like mongo, postgres, mysql etcetc
its just a key value store
I use mongodb
if you want the cache stored in mongo go for it
but memory storage should be fine
since you are expiring records it wont bog up memory too much
if you notice performance issues definitely go to mongo tho
it will still expire the records
Omg actually it's so great, my bot will be able to check for a vote without requesting my vote handler server
Yes
on your webhook api just have keyv set
and on your bot have keyv get
from the same mongodb
I mean yea
Yeah seems logic
unless you make the webhook api on the same process as your bot
which I do not recommend in case your bot crashes
you dont want people voting and not being logged.
Yeah you told me that and I said it was a great idea to make a separate api
One thing to note
if both the api and bot go down since you are using mongodb
have your bot get from mongo, if they aren't there double check with top.gg
Alright
Its always better to double check yourself rather than ignore the possiblity
Yeah I see
I'd say also put them in cache but top.gg doesn't return the time they voted iirc
so it will be hard to expire them automatically
cuz they can use the vote cmd like 5m before their vote expires, if you put them in cache well now they are free to use cmds for 12h without voting again
But actually, my hosting service or pterodactyl panel restarts the bot if it crashes, but if it crashes twice in the same delay, it is really down
So my vote handling server, will be likely to stay alive
Because
When I upload my bot, it can have bugs (or things I wrongly wrote so it crashes)
still always good to have fail safes
Do all that you can to prevent the unexpected
you wont be able to catch everything
but the most obvious problems you can solve
(btw I think I really improved in English)
Thanks
๐
ah ok
I did that, first it uninstalled it, then I restarted my pc, then It opened the installation menu but it crashed, but I still have sound lol wtf?
Maybe it installed the main driver
And crashed on others
No it just didn't install
lemme translate for ya
Realtek HD audio driver installation failed.
No driver is supported by this driver suite
where did you download that driver from?
go on your laptop's manufacturer website and download the drivers for your laptop model from there
I googled realtek audio driver
I have Win11 but I think it was little bit forced and my pc broke on day, but it was working again when we removed the battery
My actual laptop should be only capable of running Win10
not 11
It's showing Realtek Audio anyway idk why
Alr i'm gonna install on the dell website
yeah seems it's not the same page
win11 is not much different from win10
you should be able to run both without an issue
I am using .png format but why I'm getting this error?
try hosting it on a different image hosting website
background img is bugged atm
but other bots are using
Because they put the banner link before it was bugged
yep
๐
at least Video URL is working?
I don't know, I've never used it
let me try
I tried for dell website and nope it shows the same error
In the TopGG, my bot shows as 784 server count
but the real server count is 960
how can I change it?
and my api also well connected
Your bot has stopped sending updated data since April
So apparently the top.gg API has stopped accepting your data since then
How can I fix?
You need to send your data to the API again, see #topgg-api
then you got the wrong one
try force sending a request, see what status it returns
some times the same laptop model will have multiple different drivers in their website, because the same laptop model can come with different hardware
what model is your laptop?
No errors
so you tried this one right?
Maybe
ok but what status?
what about this one?
why do u even need to manually install realtek drivers?
??
status is fine
try installing both of them then, but anyway if your audio is working then what is the issue again?





