#development
1 messages · Page 205 of 1
How do you render this
cus its just using up all the space it needs
the html is restricted as it seems
you aren't placing this div inside another div are you?
Im thinking its a parent element restricting it to a certain size
yes
only using bootstrap to help with css
vanilla js and html
that explains a lot i think
the col-md-6 limits it
I mean that might be the issue
But it doesnt make sense it would be
Are you setting the height and width anywhere else in any css
like global css?
like maybe a * {} or a body {}
lmao
does anyone know how i can test my api on my site?
currently getting:
Fetch API cannot load http://127.0.0.1:3000/login due to access control checks.```
postman
i swear i used to test my api and it worked great, but today it just decided to give me this error.
they have a vscode extension too so you dont need to install anything
Wait are you using the node fetch?
crazyy
Is it cheaper running an ai model locally than to use one through a service?
I am in need of a speech to text ai that will make it easy transcribing audio files
Google cloud offers this, but in the long run idk if it'd be cheaper to use it, or host one myself
To be fair, such models need A LOT of data to train on. You most likely want to use parallel hosting to train the model. Save the model, then stop that subscription of the hosting and use the modal to generalize new data, aka use it for what it was intended.
You can try to train it on your own pc but it will cost you a lot of time and resources
my laptop would explode
Yeah don’t do that then
Actually I think you need 2 ais to accomplish this
What for
One to generate the actual text and one to adverse against, that will actually correct the first AI
😭
Well
Guess ima have to suck it up
and just use google cloud

Ion got the time nor money to do it myself
11.52$ per 8h audio file.
I might have to lower the max
That's simply too expensive
I am fucking cooked.
look into reverse openai apis.
There are plently of servers that offers those and have free tiers, which also included openai whisper
pretty sure the best alternative
problem with that is I need one that can transcribe in multiple langauges
so google cloud's chirp ai model is the best thing for me
Its just pricey asf when you get into an increased amount of minutes
or look into reverse openai api first 
Good for testing
you mean https://github.com/PawanOsman/ChatGPT this?
im personally a fan of nagaai
this one is huge but im not sure what free tiers or whatever they provide
Actually neither offer a speech to text model
there is also zukijourney, which 100% offers audio
gg/zukijourney
I looked at the wrong one then
i used both
for other stuff
the nice thing is, you can just use the openai lib and change base url
Can you explain the tiers?
What exactly does it mean 3 per minute?
its 3req per min
pretty sure zuki has better limits as free user
let me see
naga was pretty awesome but now its too big
so they addeda lot of limits
you get like 5 credits for free every month
before it was purely req limit based
What are the credits used for?
to make calls to their endpoints

Its like every ai website
They don't specify how much it costs tho for each call
1 Minute: 0.0015
Unless it means it costs 0.0015 credits per minute
pretty sure it means for 1min audio, it takes 0.0015 credits
yea no
thats per minute
If you send longer audio it will use that rate for every minute
and likely rounds up tbh
Still its cheaper than going through conventional means ig
for all other stuff its per call, so pretty sure, this is the same lol
i just checked zuki and she has no limits as far as i can tell
12,000 minutes of audio costs 18 credits, 1$ per credit is 18$
because much smaller
website?
no website, only discord
inv -> gg/zukijourney
How do people usually host their bot on more than one server?
I heard that for a large scale project, you need more than a single hosting?
So how is it exactly split? Is it shard based or something
kubernetes
Services like OVH has kubernetes built in, allowing it to spawn servers as it needs.
You wont likely need kubernetes for a discord bot though, not any time soon.
You'd need to have a massive amount of servers to warrant the need for it.
Learn the basics of Kubernetes and how it's used to scale containers to massive workloads in the in cloud, in 100 seconds. https://fireship.io/tags/docker/
Docker in 100 Seconds https://youtu.be/Gjnup-PuquQ
Full docker Tutorial https://youtu.be/gAkwW2tuIqE
Official Kube docs https://kubernetes.io/
#docker #100SecondsOfCode
Install the quiz a...
I see, any rough estimate?
Uh, no
Cause its quite literally an acheivment (meaning you'd likely never reach the need to start scaling horizontally) you likely would never reach. Unless your bot is in discord.js then maybe.
Depending on the language it also has its drawbacks, every language has its own ways of handling memory. The point of kubernetes is to scale your application horizontally, which is adding more servers onto your stack and spreading the workload. Vertical scaling on the other hand is increasing the spec of the hardware like the ram and cpu cores.
For a discord bot, you'd probably need to start scaling either way once you reach servers in the millions (depending on the language you are using and what your bot does)
Its hard to say when you should start scaling though, as me saying in the millions is just an estimate. Some languages are better at handling memory and have a lower footprint.
I am also very likely over exaggerating, but you'd still need a substantial amount of servers to warrant any sort of horizontal scaling, typically just upgrading your current vps is fine enough
Also bear in mind, I am no expert in this field. I only am relaying what i've come to interpret about it
Eventually you will hit a CPU bottleneck just by processing network packets
So that's always fun
yea but horizontally scaling is usually not something you'd want to do in this case.
Vertically scaling typically is more than sufficiant
Unless you hit a limit there as well
horizonal scaling can also be rather expensive as well
Also, how easy is it to even hit that bottleneck?
I was having issues with gateway events at around 7000 servers processing messages but this was with the ws package. Tim's ws gave a huge performance uplift
I see, what langauge did you work with?
I hit 7000 yesterday, doubt how I'm gonna fix the issues I'm currently facing 
Makes sense
What's the issue?
The delay within commands ofc
Use cloudstorm and snowtransfer
they use python

honestly zeksy, that lib you use for mongodb is so unheard of no one i've asked knows it.
Oh yes another issue, the ram keeps stacking up on the hosting
When I run the server the bot consumes like ~1gb ram. Overtime it keeps increasing tho
After 12 hours of bot being online, it hits like 4gb ram and everything becomes a little slower. I usually reload the server once every 12 hours to fix this issue. Still concerning
I see, what library do people usually stick to
Ignore the errors ofc
pymongo
motor is listed on the official docs, but i've never seen people actually use it
pymongo was the one most people went for
Well if I switch to that library, would I've to make too many code-side changes?
I've no idea on that. Nor am I suggesting you switch
If motor is listed on the docs of mongo then its supported by the community.
I also don't think what you are facing is necessarily a db issue, it just doesn't make sense
Databases are meant to be able to handle large amounts of requests
It has to be either db or host side error
maybe @lament rock is able to help more
they are smarter than me
I could possibly use print statements to check where the command takes a stop
yes i could tell
Are you sharding? You kind of have to be casue discord forces you to at 2500
yes
its an autosharded bot
ic
I mean, python has always been a slower language 
4gb of ram tho just seems too high to be normal for python
yess 
it could be catch
because like something stacks up over time
the ram is at 1gb and then it slowly scales up
unsure how that works
true
:p
okay so after doing some cheap research and looking through files I found this .git folder on my hosting
https://prnt.sc/LcT9Zhv35pCP this one folder takes 3gb of space on my hosting files, i doubt what it's about
well it takes from storage space, not ram tho. But could this possibly be the problem 
okay i doubt it's the problem, did some research and its just old code
.git is a folder generated when you use the git cli tool so you can push your changes to GitHub
It’s for version control
Have you did a memory dump?
Not yet, but I talked to the hosting support team
They told me while or for loops might be causing the load on the machine and it instantly ringed a bell.
So there's a jjk fight command which sends an image, and then dynamically updates it every 3 seconds.
Basically your character A attacks the Char B and does damage etc till one is dead.
This fight command takes around 3-5mins on an average and i believe it might be storing the images in ram.
That might be cause of the issue
Let me show you how I save the images usually
arr = io.BytesIO()
await background.save(arr, format='PNG')
arr.seek(0)
file = disnake.File(arr, filename='filename.png')
usually it's something like that ^
i doubt id need to re work this command or find a fix for it lmao
Either way that’s still too much ram to be used
yeh, but if an image is like 3mbs and there are hundreds of people doing the command, it might make sense
I doubt if this deletes the image after the command processing is done or it keeps the image inside the ram
While loops can cause a performance hit, I doubt it’d be that significant unless you’re seriously doing something wrong
Once it’s out of scope of the command function and all code is run the variable is dropped
It might just be both, the fight command does have too much processing to it
I see
yeh ill take a look
Another test I'm probably going to execute is disabling the fight command for ~6 hours and see how much difference it makes on the performance
if the difference is drastic then I might have to just fix this one command
This is why if I make a bot with a lot of commands I group em into modules, that way I can disable either the entire module or a specific command :p
yes I've cogs for the bot
I think the issue is because this code saves to disk, and writing to disk can be slow for large files
If you want to send an image, you’re going to have to save it in RAM at some point in the process. If you don’t want to, you can use a CDN or something of that sort
That looks like it’s saving it, is it not?
I don’t know what BytesIO is, that just looks like it’s going on the disk
bytesio is used to manipulate data in memory
I see
Python once again making sure to overcomplicate functions that should be standard
Nice
it still shouldnt be this slow
you must be doing something wrong
probably even on the worst host
psql -U fivem -d fivem
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "fivem"
do you guys have any idea why it uses peer auth instead of requiring the password?
No I believe that was probably the issue only
I disabled the fight command, now the ram only scales upto 800mbs-1.2GB unlike before.
arr = io.BytesIO()
await background.save(arr, format='PNG')
arr.seek(0)
file = disnake.File(arr, filename='filename.png')```
I believe this little shit just stores the image in memory and it's probably isn't deleted at all, as people run the command over and over the memory fills up and bot gets slower. That's an assumption
All I can say fs is that as soon as this command got disabled, the performance increased by 5times 
I'd want the command back however. The fight command is important
it's either that I get rid of images or find a better way to deal with it
I doubt it even deletes the image after the command has finished, it's more likely that it just keeps the image stores in the memory.
That's the only valid explanation I can think of considering that the memory isn't scaling up with having this command off
hey guys i had learned java a pretty long time ago, i forgot a lot of it tho. Any good docs i can refer to, to refresh that bish
Also just to clear this up, it saves it on RAM not on the disk.
I'm still doing my research on how to resolve the problem xD. Pretty glad that I figured out what even is causing the problem 
Also Flaze, are you experienced with bytes.io? I had a few questions to ask regarding it
sorry, but i'm not proficient with python. best to ask other users here
ah alright
SOMEONE PLS COME AND HELP ME
I need help
ASAFP
Liek in DMs pls.......
This is me rn^^
.^(
What
If you want to ask a question, please ask it here. Personally, I don't text random people in DM's
this is like your 3rd time asking for people to help you in dms
no one will give you personal support for free unless you wanna pay for it
but it would be just as good asking for help here
ok guys
its happening
the code isnt coding
so im following the djs guide on making a bot
I am here to help
jk I got stuck on it too
and something went wrong bc commands weren't being deployed globally
and then misty is trying to help but he doesnt know either 😭
what part of the code should i show bc im clueless at this (first time)
wait let me just
everything on there
- a deploy-commands file
RTFM
calm down
fr
don't need a typescript library 😭
idk what this means bro
its advised to do so
bro i dont even know typecript lets slo down
detritus without ts is like shooting yourself in the foot
i think(?) thats what i had till misty edited stuff
Im writing a class based framework for zobs rn
Well global commands can take up to 1h to show
guild commands which she is trying to post rn aren't showing
im p sure its been an hour since we started trying
maybe
i've the bot in 2 servers
its showing it on 1, not the other
wait
do i need to edit the guild id
in config file
cuz its set to the other srver
ok
nvm its been on the guild im tryna make it work on 😭
actually I set it to the guild id of that guild

before you were doing it to the other
foreshadowing words indeed
my eyes are in pain
Good job!

I am also helping aaron on his discord.js framework
We will make it the best one you could possibly use

how dare you BETRAY the rust femboy association
yea
zobs for president
Rust is always a part of my heart zoro
ong

Zobs for Vice CEO
me for CEO
whenever I do any other languages I think "man I could do this so much faster in rust"
I was originally writing the framework in js
and then was like fuck this I need a type system
so I am using ts now

ts is bae
I forgot you can make js packages in ts
Yeah honestly the best way to do it
I honestly want to learn C at some point
but not this year
@radiant kraken since you are a C god
what is C written in
like
the compiler anyway
I am... a C god...?
i'm flattered

The C compiler is written in either C/C++ or asm
It can be any compiled language really
So how could its compiler be written in itself
Ion understand
How can the C compiler
be written in C

It's probably compiled with another compiler
With another compiler compiled by another compiler... and so on
Until a compiler written in machine code
so
my hopes of writing a true programming language
not built on another
is but a dream
You can make a compiler that compiles itself
Like Rust for example, the Rust compiler is written... in Rust
but thats a pre compiled binary
I want to make a programming language on par with C /j
itd be cool to make a language that doesn't rely on another like C or C++

https://lunacookies.github.io/lang/ time to do this soon™️
that would be nice
it would also teach you C/C++ too! :)
just strip chrome os
even if I do that it'd still use up 40gb of ram
You paid for the system. You will use all of the system
lol
hey! let's make a CC OS

its our company project
honestly speaking
it'd be cool to make an OS
or even a programming langauge
Lets turn rust OOP
r++
Just rewrote everything in rust
ahahahaha we don't need to, because we already are!
nah we r++ devs
Rawr devs
ok im never posting that cursed shit again
I saw it lmao
What did you POST
nothing
Nothing shall be known
My curse is I come up with new shit to do every day
forgetting I already have priorities
It happens aaron!

We all went there
i can help you from the distraction! :)

@ mods leak deleted message!!
question. is it possible for a bot to get banned for what it says with the say command?
yes. make sure that your bot isn't lewd and racist like me
bro i literally cannot control what my stupid users do with the say command thats bullshit
yea you can
how
sanitize the input
as if i knew how to do that perfectly
get 1 trillion list of curse words, filter the word with that
if bots like carlbot doesn't filter it, then you're probably fine
use an ai for sanitizing the input
better yet, use machine learning

uhmm how can i remove my bot??
do you have your bot link?
yup
Had to ask get some confirmation, pretty basic
@commands.command()
async def test(self, ctx):
a = "anything"
for i in range(1, 5): print(a)
This a as well as the loop is instantly dropped once the command is finished right 
yea
hi
the world if js had decorators
oh i think typescript supports them
thats awesome
no thats the world if we didnt invent full stack JS
hello world
Ye it does and they’re amazing
Is this channel limited to bot development?
nope
Great
hey gamers
I got a js/ts question ik can you believe it after swapping to rust I looked back!
I am making a framework for discord.js, and decided to bring some rust ideologies to it. Since I can't do feature flags, I kind of have to make multiple packages and just have them act as "feature" flags. My only worry is, if each package requires the same dependency, will it bloat the node_modules by reinstalling that dep
or does it just install it once, and have every package use it that requires it
Or does this vary depending on package manager?
Only installs once if the packages require the same version iirc

i hope so anyway
Also, making a framework for a framework???
Not on my screen
Yeah I reloaded and it changed :(

its hard to test this but i am fairly certain npm will install the dependencies separately
mostly because its hard to keep track of this stuff to reuse a shared package and because its very likely 2 packages will end up having 2 different versions of the same thing

i know a package manager like pnpm actually attempts to reuse packages with dependencies instead of each dependency having its own node_modules
What about with pnpm
but i wouldnt worry about it too much
Well
I don't want their node_modules to be bloated with the same package.
The entire framework runs based off a plugin system. You can make your own plugins as well by installing the core package which handles loading plugins and giving you the plugin class.
Very likely you will be needing the core package yourself, and then other plugins also make use of the core package
Would this also not likely cause version conflicts or whatever?
not even a bad project

write an os that sets up everything required to run a reduced version of javascript
bun as in the js runtime?
theres tons of js engines designed to run in embedded environments
then you can expose APIs in that js engine to basically make an os in js
why not write an OS in zig
@quartz kindle if you ever wanna collab in this revolutionary project let me know
Chloe x Tim
you can handle the js and engine side i can handle the os side
a force to be reckoned
Also, how the hell should I handle loading plugins 
Should I just scan any directories that has classes with an instance of Plugin

this would be the most ridiculous project to ever exist
imagine writing system drivers in js
sounds like a nightmare
oh hello tim
just the person I am looking for
please guide me in the way of js/ts
I haven't touched this language in 3 years
😭
wut
is it possible to fetch how many votes my bot has so i can put it in my botinfo command?
@shell tundra the bot has a help command its @pulse help
its in the status and works fine
you put $ as the prefix so that's what was tried
oh is it possible to do it ahain?
you gotta resubmit
but with a ping
oh time to rewrite stuff 😭
👍
@shell tundra can i make a bot that can only be reviewed by a specific reviewer
I mean, just make the reviewer zobs
and you will 100% get approved

Your chances of not getting zobs as your reviewer is higher than getting struck by lightning
i will pick the worst one so that my public eval command can be approved
admin permissions as well
bot require admin perms to send messages
😭 yk evals are so fangerous bro
you will pick worst what
anyone can grab ur token through that

i will ask them not to do that
after yesterdays events yes i am the worst 💀
ok ill resubmit
bro idek the rules of that event and I can already tell I dont want to fucking do it
💀
@shell tundra btw the crypto cmds only work within a svr i beeh lasy asf for once i resubmit so yk its working just im lazy to make function in dms
if there's no commands what am i meant to test?
ok that was funny why'd you delete it
the commands that are available zobs
i have done the laughing
they are cmds jjst only server because im lazy
lol
ok
submit fast i need to review 2 bots in 15m to get even number reviews
their mom
thasnk im so funny omg
yk i think its time to finally make a discord bot
and submit it to topgg
not for anything serious but for the sake of it
i am indeed making one
ill make one that lets you spawn a temporary linux vm and do anything on it

https://github.com/collegecrafts/shensuo-core rate my framework code
@shell tundra done
u think i can review in 8 mins?!?! jk yes i cna
LMAO ty
ill create a /help ans $help cmd later tdy as well for now its just @pulse help
thanks

bro
bro
i dont see any fw code
a
its not complete
is the Manage Messages permission ever needed for a bot to edit/delete it's own messages?
No, never
the permissions for a bot to edit its own messages is view channel and read message history
gotcha so one way i could get an error trying to edit a message is if i dont have read message permission in the channel the message was written to
read message history but yes
Use interactions if you absolutely must edit the messages and not after 15min
interactions largely ignore permissions
it's editing a persistent message showing a leaderboard over time
Ah
right now my bot asks for manage messages permissions and doesn't need them, pretty sus
so i just need history?
View channels is read messages
read message history and view channels
err maybe it might work without read message history. view channel is a must tho
Reactions require read message history so I assumed the same would apply for editing messages even self
manage messages is only required when editing someone else's messages for setting flags
Try it and see tbh
Either way so here's the update, I got suggested by my host provider to not use Atlas or buy a dedicated Atlas server instead I can host my MongoDB database on the hosting itself.
According to him if bot and database are getting hosted on the same server then there will be 0 latency/network issues as bot dont gotta build a connection bla bla
Yap wall aside now is the question, what region do I get my discord bot's server for? Which one will give best performance possible with discord's API? I'm assuimg the closer the host is to discord's hq the faster it would work 
Just tell me what is the most ideal geographical region to host a discord bot on
us east for api
Hey Ophidian
I have a question for you
Have you ever made a npm package in ts and it was useable to people who used js?
I see Dallas Texas and Buffalo are my options. Any specific youd recommend?
yes bc you compile to js first and thats the runtime files with optional dts
Texas is us west
ohh
- We can't use js files, because the compiled js code has import/export
- We can't use mjs files, because the compiled files are not mjs, so we can't do
import {Something} from 'package'
We are running into errors left and right
let me just drop the options hol up
compile to commonjs
deploy in Salt Lake City, Utah. Option to ship to Buffalo, Miami, Dallas
That's all i assume
https://prnt.sc/XiO7JH80j6lL these are the database side options
Ohio database, couldn't ask for anything more
ohio is us east perfection
I see, so Dallas Texas works just fine too i assume
no lol
bruh
texas is us west
okay lets simplify that, so ny is perfect for a discord bot
what 
ohio
ok and?
export * isnt supported in cjs
mf when no export * from 'lib';
BRUH
in cjs that would be a syntax error
What am I supposed to do this, this bs
Wanna know what I quit
ts wasn't meant for me
import individual components
or change tsconfig
by default its output is like ES3
or ES5 i don't rember
module stuffs are from ES6 onward
{
"compilerOptions": {
"module": "CommonJS",
"target": "ESNext"
}
}
This is what happens when the js ecosystem is fragmented
esm sucks imo
Well I don't want to force people to use mjs
but not ot mention, the transpiler doesn't output mjs files
so people can do things like import {} from ''
so
We were getting errors like this
SyntaxError: Named export 'ShensuoClient' not found. The requested module '@shensuo/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@shensuo/core';
const { ShensuoClient } = pkg;
Thing is idk what its talking about
or export { value }
also could you quickly tell whys us-east more api friendly? I earlier thought west might be it conisdering discord hq is at san frencisco
I use barrel files and export class
the dif js flavor have dif module import and export syntax. module and exports is a cjs term
thats where the discord api is
alright ill go with that, thanks
select one that is physically closest to the servers that your bot is running
remember, it's your application that reads / writes to the database, not discord api
yeh but as I said the database will be migrated to the hosting itself too.
So both the bot as well as the db will be on the same exact location
mongodb allows bot hosting???
with pterodactyl or something you can host the database on the vps or dedicate server is what I'm told at least
but like i said, pick a location that is physically closest to discord api servers
your screenshot shows mongodb atlas i believe
which is not on pterodactyl
Ah yes, that is the current db I'm using. I'm gonna migrate it to ptero
ah, understandable
second line precisely
yeah
that's what I'm willing to do, the only issue is that i'm uncertain about the api's location xd, nor can I find precise data on google
hit up discord cto
Migrating from atlas to petro shouldn't be that hard or lets hope its not lmao

tried to compile mongodb once
was a nightmare
I'm just gonna print store all data from atlas, put it in bot files then upload it to petro.
Not the most efficient but a nobrainer way
there's gotta be better way to migrate
you can have petro join mongodb's cluster then copy data from there
while (client.isReady() === false) {
if (client.isReady()) break;
}
wtf am I cooking 😭
I blacked out and wrote this
Hi, I need help with my bot. Idk why it's still offline. I have already verified few days ago
Are you using discord.js?
no
what are you using
I used Python and it's made years ago until recently I found out someone messed with mine so I made a complaint through Discord support. They took out my restriction and asked me to reverify and i did
Yeah
Are you double sure? No errors in the console?
Did you reset your token at any point or was it reset
Yeah because it worked before as well
Check your console for errors
idk ... wait how do i reset?
Because it's created years ago with my friend and i might have forgotton how to do it
Okay, check your console for errors
hmm like in my development tool?
I guess?
Through the developer page https://discord.com/developers/applications
I did
if its on top.gg
you have to click refresh data, click edit, change something like adding a dot to your description and click save
ok the image has just changed Thanks
I am going crazy sayu
i know
hey
hello
hows stuff?
hi brain
lol how come
sayu, you use ts extensively right?
i missed a * and accidentally created 200 billion items in a vector
ahahaha
yes
you didnt need that ram
😔 that ram needs a doctor
I need someone to help me come up with a better design for my project cause the way it is rn, plugins are fucking useless
😭
I implemented the plugin system so poorly, its not even useable
It does what it is written to do, but it doesn't mesh well with anything
300 threads go brrr
lol ikr
so this is a type system problem
oh
That now its better off not using it
brb

watching goblin drawing tutorial
whats funnier is 8gb swap on a machine with 64gb ram
i have swap because i have to, or linux shits the bed
i know the basics, but never used it
Its more of a design flaw than actual ts I think
@sharp geyser also plugin wise you will need to
register the plugin at runtime
let the plugin be known to the type system (possible through namespace patching)
given up on C++ now? lol
well
https://github.com/collegecrafts/shensuo-core & https://github.com/collegecrafts/shensuo-commandhandler are where the code is at.
Core has the plugin class, then the client class which handles loading the plugins. This is all fine and dandy but the issue arises when I am loading the plugin.
CommandHandler has ofc the CommandHandler class which extends Plugin from the Core package. Issue is, anything attached to CommandHandler class is basically useless because it only recognizes properties attached to the master class, in this case Plugin. Not to mention, when getting a plugin like the CommandHandler, you have to do `client.plugins.get('commandhandler') (assuming you put the name of the plugin as commandhandler as people can make their own plugins). Which I think is kinda meh, I feel like plugins should be attached to the client class but idk what you think
Nope! This is a side project that started out with helping a friend but then I got carried away and decided to make a fleshed out framework
I am kinda taking inspiration from rust's cargo package manager with its feature flags, and making the framework work based off a plugin system so you can simply install what you want to use and disregard the rest.
Instead of what other frameworks do and add bloat onto an already bloaty package, and you likely will never use everything that framework has to offer
so like npm just not crap
Well it still uses npm ofc
but I split the modules of the framework into different packages
So you only install the packages you need
core package only has the client and plugin loader and its also the package all plugins need
then you can install plugins like the commandhandler which relies on the core package to create the plugin :p
Its like a plug n play type thing
I do want to make a new package manager thats like cargo tho ngl
💀
if node had a cargo like package manager it'd be leagues better already
hai brain :)
any thoughts on https://github.com/null8626/cpp-sdk ?
The official C++ wrapper for the Top.gg API. Contribute to null8626/cpp-sdk development by creating an account on GitHub.
i'm planning on making ports for two major C++ discord libraries, D++ and DiscordCoreAPI
can i be held liable if i creatyed a site and some payment went wrong, without being the site owner myself?
For example the user paid but my endpoint suddenly went offline for some reason
Whatever service you are using should have record of that payment.
Have them reach out to you if the payment went through on the processors end but not yours.
This isn't legal advice
but its due diligence

Realisitcally best you can do is A. if the payment went through on the processors end, and then your api suddenly goes down. Have a way to reach out to support. B if the api is currently down, then block all payments until its back up.
Honestly, i'd put payment processing into its own microservice though or smth.
Not attached to the main instance
Less risk of it going down when your api does. Unless its just a server issue
i might do a full on review
once the site is up
i will test it for days and days to make sure it doesn't happen
but, in any sense can i be sued over a failed transaction
but that's actually really start
monetary transactions are usually atomic
smart, before payment i will send like a mock transaction to see if endpoint works. If not, i will simply return an error and block incoming requests.
basically they either happen or they dont, no in-between
so u can just query the service once in a while to sync transactions
if it goes offline just tell the user to wait
i use stripe to do so
i am more like, what if my webhook has an error
so that my site does not recognize it
I usually just throw an error if the api is down

Request Timed Out 😏
you can query transactions
like, manually request the list, instead of being passive
you can use both
just like you do with topgg votes
but to be fair, i don't think anything goes wrong because as soon as i use the webhook, i can simply update the user already which has a small chance of erroring
but in any case, can i be held liable?
What if i have that i as a developer cannot be held liable in my terms of service, privacy policy etc?
privacy police has nothing to do with this
you could be held liable if the money was taken but you did nothing to attempt to fix the situation
so as I said, query the api once in a while to check if you lost any trans
i see, smart.
What i want to implement is before we start the transaction, create a stateful entry of the user.
If completed, set to complete, if not but paid, we can actually query all those users and perform the action anyways. Maybe once each day?
nice, much thread, many core
what sort of cpu(s) is that?
or it is a heavily virtualised solution?
so long as you have avenues of support open for people to come for assistance it isnt a problem
its only when you are taking payments, not delivering the service and offering no way to communicate to get help, activate the service or seek refund that it becomes a problem
in the case the webhook didnt deliver payment state to your servers, you can check on the gateway for the transaction, and once verified you can retrigger it or make it right yourself
thats what i'd do
if the concern is real that the service may be down, and unable to receive a webhook, you need to rethink your service availability, make it more robust. perhaps add redundancy
in the real world for most people (unless you host on your wifi, in your bedroom at your parents house) its a non-issue
also most financial systems retry webhooks, with a backoff, so eventually you'd receive the webhook anyway
Do you offer Bot developers community
uh...what?
i see, thank you so much
definitely made me less anxious
let me translate this for you guys:
"Hey i don't know how to code, but i want to make money by coding. I will search clients and you will do all the hard fucking work that will make you bald before you reached 30 years old (you'll probably die as a virgin as well). It's 50/50 btw."
I am looking at making Privacy Policy and terms and condistions and wnated to know the best way to make them
you have online generators for them
termly e.g. has a good one
dont use one for PP
you need to state what info you use and how you use
NO
go somewhere else, nobody is going to work for free here
Would you be able to help me make one
no, https://termly.io/resources/guides/how-to-write-a-privacy-policy/ but read this
it doesn't need to be an essay, just be clear on how you use users' data and how they can ask for deletion
does YouTube channel url come under Personal Information Collected Automatically (Derivative Data)
uh, probably
you dont need to be too formal on the PP, just state what you store and why you need it
be careful! termly's policies arent free to use
youre supposed to pay for them
true, mainly talking about their generator
Should I make my own them
probably not
its a legal document
if you do, first time its tried legally a lawyer would poke holes through it like wet toilet paper
you DO need to be formal! this is why
the whole hipster "dont be formal" thing is bs, if you look at all the informal PP's they have a formal part underneath and the informal bit is a summary
the wording is very important
especially when it comes to things like GDPR
PP protects end user, TOS protects YOU
rules laid out in the TOS give you a concrete reason to ban people who abuse your service, with no legal comeback on their part
rules laid out in privacy policy give the user concrete terms on how you store and use their data
i mean what if you just go "we dont give your data to third parties" <- exactly this, in your PP
you are breaking it the minute you connect to discord or any API
you know what you meant to say, but a lawyer would have an absolute field day with you
their generator is free
though it's limited to 1/pp
owh damn dind't now
anyone know how i can fix this...
my image appears to be too small for my content
so the background repeat shows this ugly repeat from the top like:
top
bottom
top
bottom.
How can invert the background repeat?
like
top
bottom
bottom
top?
You'll need two image divs where one is normal and the other is flipped upside down
If Im understanding properly
this look good?
what else should i do?

that blob thing kinda looks weird imo. idk lol
(yes i got the button idea from dank memer
)
too much empty space
Very bland design. Modern design is very boring when you're trying to convey fun. Look up fun design elements for websites
I personally went for a neocities-esk look at https://amanda.moe
its not the only thing you can chain :^)
?!?!
ok bye
you cant chain my mom, shes unchainable
sorry tim's mom is in my basement
chained
funny, she just told me she locked someone in her basement
review my code plez
😏
Honestly tim should setup a code review site
make bank
Just have ChatGPT do it
lol
You had an error, heres some code from a github issue of the guy facing the same error!
twitch stream code reviews
i thought about doing that tbh, stream code reviews... and shitting on bad code
xD
wanna review my code on stream?
its my new framework

no :^)
First time using typescript in 3 years
i just watched an interesting video about a job interview at microsoft from 1994
the interviewer asked the interviewee to implement a strcpy function in C
the interviewee made something like for(i = 0; (*output[i] = *input[i]); i++)
hey man, the twitch Software and Game Development tab is popping off
and the interviewer wasnt satisfied, they wanted something even more compact
Nope, I accidentally paused on a twitch streamer and got hit with ads AGAIN
twitch really hungry asf
lmao
im sorry
how do you get more compact than that
no because C strings are null terminated, so at some point it will reach a null character, which will resolve to false
or would it go on until it reaches the end of a string
since C doesn't have strings
they have char * right?
ye
makes sense
but the actual interesting part is
damn I actually know something thats correct for once
30 years later, the guy who was the interviewee at the time revisited it, and actually checked the compiler output
and it turns out the for version is faster
huehuehueheu
lmao
honestly I wanted to learn C
but like
I know no one who knows C
so I can't fact check myself
😭
ask brain








