#development
1 messages · Page 294 of 1
How's trae goin
lots of waiting and lots of wrong stuff, i guess im not good at explaining what i want it to do
it often tries to do things i didnt ask
Yeah..
I often have to stop it and just reject it all so it can understand me better
i wanted to try augment, but they shut down the free tier lol
Here is what you gotta do, use chatgpt to make the prompt better then give it to trae
They all seem to, or limit it a LOT
because AI is not profitable
its expensive af, and they all rush in with billions in investment and offer deals to capture interest
trae is made by bytedance
and then when they face the actual bill, its all comes crashing down
so they have money
im testing it with deepseek3.1:free from openrouter now lol
it keeps generating broken files lol
files are either cutoff at the end, or missing huge chunks in the middle for no reason
another user stole ur code suggestion !
lol openrouter has a limit for free requests
they are "free" but you cant use them
I mean you didn’t pay 😂
i found cursor to be the best
still quite buggy and dodgy but better than the others from what ive seen
and i get it for free from work
getting paid to vibe code is wild
gemini 2.5 flash:
i will now proceed to do X
I apologize for the repeated mistake
i will now do X
i apologize for the issue
i will now proceed with X
I apologize for the oversight
I have successfully reviewed X
I will now proceed to do X
Task Completed
(did not actually do anything)
yeah they often fail at anything that requires expertise in complex technical problems. 🤐 more often than not I'm arguing with LLMs over a system design choice. it's great for writing boilerplate though
beautiful
I just let an Gemini pro write on its own for like an hour today, it did surprisingly good.
Gemini pro is half decent but their free model with no limits is pretty bad
Yeah
It did 4110 lines pretty much unsupervised. Works without issue.
It'll have problems with some stuff I'm working on next, so I'll just do it myself but it was really easy.
dont forget about the emojis
✅✅ X is now complete! 🎊🎊🎊🎊🎊
(x is not complete)
the amount of emojis and ticks it always gives me after it said it did a task when it did not drives me up the wall
yesterday deepseek went into a loop trying to fix some "broken encoding" of some chinese character that it put in the file somehow
lol you can even see the message markers
think it did something similar to me a few times
then it just starts making random changes, it says it fixed it, i say its not, the loop repeats
(base) apple@Mac ~ % ping discord.com
PING discord.com: 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
boys
what the fuck is my mac doing
all of my api fetch requests are failing as well in my ts project.
ong i am being ddosed
okayyy, turns out a fetch was being held alive and blocked my interface.
i cant with these robots bro
and that answer is also incorrect on top of that also which is why i insisted on evidence
lmao
bro is an overthinker
im trying cursor right now, and its so much better so far, it actually manages to do what i want
im still within pro trial though
i first asked it to identify and fix all the issues the other AIs caused, and it did a good job
its very good but you have to be relatively granular and specific with it otherwise it starts writing bad code quickly
bad code meaning possibly the worst code youve ever seen in your life that looks like it was written by a beginner js discord bot developer in this channel
the issue is php
lmao
im using it to create a localization system for a website
right now they have dedicated files for each language
i need to scan all these files, compile a database of localized strings, and create files that access this localization data
this is extremely annoying to do by hand and most AIs i tried end up not correctly detecting the strings and generating completely broken files
cant you just write a simple script for that? or am I misunderstanding something
its extremely annoying
strings are all over the place
in html structure, html attributes, php variables, comments, php arrays/objects
um guys
wtf
It says customId is empty when sending url buttons
but if i add a customId it says customId and url cant be specified
wtf? it breaks everything
Invalid Form Body\\ncomponents[0].components[0].custom_id: Must be between 1 and 100
.components[0].url: A custom id and url cannot both be specified dafuq man?
everything was working fine until today
You can't have ids on url buttons
You either have CustomId or Url not both set
yeah i fixed it. althought before they accepted the property with empty string
but from today morning it looks like you ahve to get rid of the prop
yea
Hi
Im running into a issue and honestly have no idea how to fix it or what to do - essentially when i split my bot up into clusters / shards theres some button functions that dont work, for example replaying a game (a view that edits itself) in my case the button will freeze sometimes but work most of the time
I registered custom ids and have persistent views but im still unsure what this issue is
You could be blocking the interaction event or could be some other library issue or extension you are using, try doing console logs to see what happens.
You also need to respond to interactions within 5 seconds either by using a defer (loading) state or simple message.
it always says its calling the replay properly - and yeah its fine with the defer im pretty sure. Whats super weird is its only happening sometimes not all the time and it can be super annoying for players
Still trying to figure it out on my end, ive had alot of discord related bugs but im not quite sure if this is one of them or not
Another thing that can be happening is depending on how your sharding/clustering is happening and how you're handling button callbacks, you may not be in the same memory space where you handle the callback and where you ack the interaction
Either route the interactions with the necessary info to where they're supposed to go so the origin can handle it or have the ability for any worker to handle button presses
Even if you say you have interactions sent over the ws, DMs are always handled by shard 0. And also don't pipe them over the ws. Discord can kill your connection and ask you to resume and the time it takes to resume is enough for your interactions to expire
you know whats ironic?
the best way handle discord interactions is like this:
- receive interaction via webhook
- dont respond to it but keep it open
- create a new post request to the interaction reply endpoint
- send reply
- connection received in step 1 will automatically abort
- handle response from step 4
- ???
- profit
its not up to my bot to be able to view channels it doesnt have access to right? Viewing my logs, i feel like they kicked bot out because it didnt see channels it wasnt allowed (It technically can view all channels but not access them/see the message history). Idk if its a me thing or not. Like enabling/disabling tracking channels i dont even list the the channel if it doesnt have access.
If users misconfigure their permissions for bots to be able to see then you are technically not obligated to notify them about potential issues or issues that are "currently" arising. Though if you are, within reason, able to notify them, I think you should. Example being they use an application command which has little to no restrictions involved on the bot end like if you receive an interaction, you are practically guaranteed to be able to respond. That way, you can tell them about doing some other action possibly or is "currently" failing
Though would I go out of my way to try to DM them? Not really
ah yes can’t click any button xD
you need to install this
https://www.npmjs.com/package/undefined
Crazy
have you guys heard about the everything package?
The everything package and its 3,000+ sub-packages have caused a Denial of Service (DOS) for anyone who installs it. We're talking about storage space running out and system resource exhaustion.
oh yeah lmao
wasn't it taken down by npm?
because it blocked removal of npm packages as they were dependencies of that everything package
thank you, it works /s
yeah but the chunks not iirc
or they may have removed that limitation of not being able to delete a package that is dependent on another
remember talking with one of the authors about it
these npm packages are so stupid lol
nodejs developers doing everything they can to keep this meme alive
makes you tempted to create a curated/reviewed registry for js
but that would be so much work its insane
you'd need a wikipedia-scale team
scan all 3 million npm packages, organize them by categories/jobs/tasks, approve only the best/fastest version, bug their devs to implement anything that other worse versions offer that the main one doesnt
thats worse than trying to refactor an entire OS source code
The bloat really is impressive
And yet 300k lines of code worth of node modules for a simple web app is still somehow more reliable than dynamically linking one C++ lib
then you get a vulnerability alert from a package youve never heard of that is dependency #29162 which is a sub dependency of something 30 levels down
rust cargo is worse
90gb for one project
and not even a big one
cargo clean
Removed 3959 files, 1.3GiB total
so true
and god knows how many versions of exactly the same functionality you have in there
need to capitalize a string?
32 packages uses str[0].toUpperCase() + str.slice(1)
10 packages use capitalize
83 packages use lodash.capitalize
8 packages use just-capitalize
12 packages use titleize
9 packages use title
2 packages use capitalize-ts
...
not to mention different locked versions of the same lib
return areBooleansNotEqual(someBool, false)
imagine a powerful AI package manager
that could scan the entire dependency tree and deduplicate common functionality
eliminate redundant dependencies
await client.responses.create({
model: 'gpt-4o',
instructions: 'You are a coding assistant',
input: 'Are these values the same boolean: '+someBool+'/'+false,
});
it's name, Tim
this guy gets it
Another reason not to use OVH https://x.com/vxdb/status/1976309952236105767
What does TCPShield use OVH for? Mitigation or for what
jesus
i mean, shouldnt a ddos mitigation company have their own datacenter so they dont hog other datacenters? lmao
or at least some sort of partnership where they have their own reserved hardware and dedicated network stack/bandwidth
They would have bought dedicate servers and resources at least
probably some dude at OVH just went:
why is our network usage at 99%?
who are these idiots hogging our network?
"unplugs cable"
Bros theme is healthy
.py? Nah bananas
.js? Bananas
That random file you don’t remember creating? Bananas!
That yellow theme is so pretty tho so it definitely fits 😂
One of my classmates said I was crazy for the banana icons tho
😂😂healthy icons man
Gotta get 1 of my 5 a day somehow, right? 🤣🤣
yeah ive noticed same thing with cargo
rust seems to have a very similar rationale to nodejs where you just install a package to do X
in c/c++ you dont see this as often because there isnt a clear or popular package manager and most lib devs just prefer to have 0 or near 0 dependencies
so ironically rust may be more unsafe because of how many sub dependency libraries may have that have some kind of unsafe vulnerable code
language safety is only one half of the battle
only time i ever install a dep in c++ is for json parsing/writing and simd hashing, and those also have no sub dependencies
@radiant kraken is *** %n in writable segment detected *** a common/normal error for c? I'm not seeing much online about it. It's coming from a certain test (checking that my alloc function returns a pointer that is a multiple of 8, satisfying alignment requests)
nvm! it was from the asert function used in tests
Hello
Hello again everyone,
In testing this line of code works but once i put the code onto the VPS it just hates it...
I'm incredibly confused here
This is it running in testing
Is your nodejs on your vps too old? Are you running node 18 locally?
Yeah your node version is super old
That’s likely the cause
Lemme check
the newest node ver is 24
what are you guys' thoughts on https://github.com/microsoft/edit ?
VIM >
Looking for client who has project. DM
I love it when I make a codebase easy to extend
"type": 1,
"integration_types": [
0
],
"contexts": [
0
],
"description_localizations": {
"en-GB": "Play / add a new track to the queue.",
"en-US": "Play / add a new track to the queue.",
"ru": "Воспроизвести / добавить новый трек в очередь."
},
"name": "play",
"description": "Play / add a new track to the queue.",
"name_localizations": {
"en-GB": "play",
"en-US": "play",
"ru": "воспроизвести"
},
"options": [
{
"type": 3,
"description": "Specify the track name or url.",
"name": "query",
"name_localizations": {
"en-GB": "query",
"en-US": "query",
"ru": "запрос"
},
"description_localizations": {
"en-GB": "Specify the track name or url.",
"en-US": "Specify the track name or url.",
"ru": "Укажите название трека или url."
},
"required": true,
"autocomplete": true
},
{
"type": 4,
"description": "Specify the volume at which you want to play the track.",
"name_localizations": {
"en-GB": "volume",
"en-US": "volume",
"ru": "громкость"
},
"description_localizations": {
"en-GB": "Specify the volume at which you want to play the track.",
"en-US": "Specify the volume at which you want to play the track.",
"ru": "Укажите громкость с которой следуют воспроизводить трек."
},
"name": "volume",
"required": false,
"autocomplete": false
}
]
}```
why is the slash command not imported?
Did you send it to the Discord API?
is discord.js still the goto for ts devs?
What
I tried to add commands to the website
I think it heavily depends on what the project is for. If it's something really simple, then sure why not. But if you're planning on scaling, I still cannot recommend discord.js or any other class based abstraction layers. The most I'd go for is as close to raw API as possible without it being really stupid, so there's a few options.
For rest, either snowtransfer or @discordjs/rest is alright, but I think @discordjs/rest is a bit too close to just making your own http requests for my tastes.
Then for the gateway, I'd likely only recommend cloudstorm and not even @discordjs/ws just because of the fact that @discordjs/ws puts a dependency on the ws package which doesn't scale all that well on high volumes of messages and is quite slower in general
Please ignore the fact I maintain the packages I recommend. It's because they're good that I maintain them
hmm interesting, i'm planning on building something of a vast scale, but also convenience and cache handling of discord.js is a decent plus
just to clarify, snowtransfer is essentially fancy api client bindings for discord's api and cloudstorm for ws connection to discord?
snowtransfer is for the http end of things so creating messages, etc.
As for caching, I think it makes more sense to extract just the data you need instead of holding onto full payloads especially for extended periods
hmm, i appreciate your insight, is there an example of these 2 libraries being used in a project already?
@quartz kindle can you tell your homies to stop hacking into my unused microsoft account
this is the second time so finally got the motivation to move everything to passkeys and bitwarden instead of bad passwords
huehuehuehuehue
i agree, it might be a hidden issue relating to the sharding/clustering but im not sure how to debug it, been at it for over a week now
Hey I am currently running my moderation bot of a NAS looking to switch it to online hosting anyone got any recommendations
Galaxygate
Is it expensive?
GalaxyGate Hosting
https://datalix.eu/a/luna -> sales page
Datalix offers a range of hosting solutions from shared hosting to dedicated servers.
been using it for over three years now
it's the cheapest (while also reliable) thing I found over my two years of server jumping
hm?
affiliate links my beloved
anyone here possibly know anything about microsoft entra? 
Thank you I will be switching over
depends
for my masters degree im making up a fake company that is migrating from on-prem AD to microsoft entra and didnt know if i might be able to pick someones brain with some questions 
ive been reading their documentation
seems kinda huge
ive used microsoft entra for about 5 minutes
but from i gather with my limited experience of AD at work is that entra is basically a local AD instance hosted by microsoft.. which you probably already know
you're welcome 🙏
Lol thanks
this feels like a topic where you need to be a neck beard IT person with 20 years of experience to answer properly
@solemn latch
can someone tell me why this is not working if the message is to long zhe bot should cut it and send the message but idk why it ain't working..
if len(ai_message) > 1900:
ai_message = ai_message[:1900] + "...\n\n*(Message truncated due to length)*" ```
My app was verified and showing the tick like a week ago, but it keeps glitching and hiding and I don't know why. Anyone else happen to experience this?
Shows fine for me, maybe it's cache issue or something. If it doesn't affect how your app behaves, it might just be a visual bug
That's the thing though. It's also happening on different accounts/devices, even with relogging/incognito.
Also cache issues after 11 days would be insane. It should only be a few days tops.
Going to need to be a bit more specific than this code here
nvm worked js had to remove the last slash
I have a question.
How to use buttons in embed?
note the above is in discord.js latest stable version since someone will ask
i was that person, but in another channel
Buttons cannot be used in an embed, you have to use components v2 for this, specifically a container that "imitates" the appearance of the embed
I’ve seen it in the Owo bot and some other bots, and I was curious how it’s done.
Could you share an example code?
I couldn’t find it anywhere on the internet.
Examples with json code and images
https://discord.com/developers/docs/change-log/2025-04-22-components-v2
https://discord.com/developers/docs/components/reference#container
Anyone know why this happened and how to fix it?
You can't, there is a limit of 50 integrations per server
Kick non-used bots maybe, idk
yeah kick a bot or delete some webhooks
Webhooks don't count for that
It just means 50 max apps/bots on your server in general
All fixed, thanks @deft wolf @swift barn @prime cliff
Can I look here for developer to make and manage me a bot?
how many bots does bro need 😭 🙏
discord adds this limit but people still manage to hit it
I didn’t even knew that there was a limit
Idk tbh😭😭 not my server lol
Thx bro
I have my bot sending <:emoji:emoji_id> in a message and it just shows :emoji: instead of the actual emoji and I don't know why. It's in the same server so not any sort of "not in server" or "external emoji" restriction. name/ID are correct.
So I totally forgot to use <a:emoji:emoji_id> for animated but still doesn't explain the other non-animated ones lol
fkng hell. The test failed because my test bot isn't in the same guild as the ones with the emojis, so it couldn't send them. The prod failed because it sent automated emojis without <a: (just <:)
Wild double whammy
Uhhhh...I just use emote objects :D
Eh I would be interested in using the bot's built in emoji store but it's only for the main server so no real need. Plus that still wouldn't of helped my prod vs dev situation lol
Elon Musk scam, no way
I hate zstd
if i had to write this code to get some compression i would just opt in for no compression at all
I mean it technically works without this curse
but on max compression level, it oomd my entire machine

I can help
What are you looking for?
Has anyone used AI apis for anything? Like open router
how do i give it more context if there’s a lot of content
I tried chunking
Check DMs

yo any mods in here
@solemn latchgot a minute
?
Hi, @static hornet
huh? you mean like the openai api? yes
how does one approach this css bug
this was the size of my interactionCreate.js file- how many lines do you reckon it has now 👀
70
the open buffer is my interactionCreate
this is the events/client folder of the live version, obviously production version only needed the bottom 2 hence they arent there 
i'd never put multiple things into a single file
I must admit that I have over 250 files but still
i had all major events in one, but now its split up into their own files
You still going on the same bot? 
of course :D
I can't even get to edit my own bots anymore, I'm full with 5 clients
The missions?
Could you potentionally award users with money...?
for being the top of a leaderboard
Like an interest in their bank, the higher in the leaderboard?
Or per hour, that much money gets sent, depending on how high you're
I mean...
Top leaderboard of month = you get money
as in irl
Well, aren't you interesting lol
yeah lol
Discord TOS: Do not offer real money or any real-world financial equivalent (like gift cards, crypto, or PayPal transfers) for bot leaderboards. Stick to on-platform, virtual-only rewards like roles to stay within Discord's rules.
i'm probaly the first
ah alright then
I guess their is a way around
terms of service always boring
fr
ooo there is...?
i was about to make a multi million dollar gambling bot
By hosting a giveaway that only depends on the rank in the leaderboard
I mean a giveaway is a giveaway
But be carefull with stuff like this
As Discord TOS is really strict
But mentioning it in your bot could possibly still break TOS
discord doesnt moderate many things strictly but bots they are very strict on
So, like, you need to somehow make it apart, but also not apart, linking to the bot to then be able to host a giveaway
Yeah, but I'm just saying, as in I don't encourage any of this
So yeah, I don't encourage this, but obviously, just randomly hosting a giveaway set to a rank role in your Discord server is 0 harm, but I personally suggest using a separate bot
nono, i got weekly quests working perfectly, its the issue with mobile playability
Oh yeah that part lol
Mate at this point just make an app lol
I got a client asking me to make an app
one day
Firebase is easy use tool
If you know what that is
I use it for Google login, and for attachments when someone posts a picture or anything
Anyway i'm logging off lol
ive never heard of it before xD
I use supabase auth for it
you can link Firebase with it
yeah i just ended up giving owner only cards
yeah honestly ive seen so much like robux giftcards, crypto gws using those verified bots
giveawayBot, giveawayBoat and so on....
Hi
That's not even the developers of those bots doing it that's the end-users doing it though.
Yeah I know
I’m just saying how I’ve seen that work around multiple times
Invite 4 reward bots too are also just as bad and promotes spam
Yeah lol why do they even exist
Well anyways I’m proud of myself
Actually been 5 years always decline so thank you to the reviewer who accepted me
Seems like they been hiring non corrupted reviewers!! Took long enough
"Hiring" 
hello!!!
Thanks for the ping
nice to meet u
interesting
What’s the max fields in a modal?
Gonna make a command which builds a command and modal and forwards those information to myself with their user ID and so on
Essentially a bidding system but I wanna make iy more cooler
Never mind I’ve solved it
hello
Hi can we talk about coding in this channel or no
pretty sure you can
Hi
only about development
: troll:
honest opinion for bot logo, I prob gonna go with "diff shape"
I like the last one
I plan to edit the pride one more and offer it as well as a customizable
the contrast just kinda sucks for it rn
Fair enough
Looks cool though!
the contrast for a logo is pretty harsh
for which
components v2 is so nice to play around with
actually happy with how this looks
also really fun to play around with separators
Oh yeah!
Separators are great, just don’t over use them 😁
So this is too many?
I-
I think it needs more
Thought that message was very well designed, checked the link in the image, and ofc it was you
Your skills are insane
LOLLL appreciate you 🫶
trying to get a strong brand identity for a discord bot going because why not
still figuring out the right wording for some of these changes but making mockups for them is fun 
thank you thank you :p
these are fire ngl
haha thank you 
only thing i dislike about forwards is the spam lol oops
😭😭😭
I love seeing others using cv2
any idea why requests are like this? nothing changed on my web app it seems somewhere between 10 oct its just been going like this and as u can see the visitors are also stable
and no no config has been changed
they all seem to come from germany as well?
Could be scrapers
there is nothing to scrape on my site
Still possible, some scrapers are stupid
I have 6k requests to my site in the last 30 days, and I know for a fact that my teammates and myself aren’t using the production site that often yet
I get a fair chunk of those requests from Germany, France, the Netherlands, and surprisingly Australia
Maybe
but 3.4K visitors and 220K requests is absolutely nuts
the users only need to be in the site for like 3 seconds max
That's what scrapers do
me when all the autotranslate bots dont work or are very limited/paid:
https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExb201b2liYmh1bmhsZjhwdTBwcmVsaDdqZmJ5eG5xZm53aWl3NXF2dyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/TFPdmm3rdzeZ0kP3zG/giphy.gif
success: bot is finished
yoo this looks fire
Im part of the cv2 alpha testing Discord so this was done a while back. Need to work on improving my UIs a bit more
Ignore the fact that the leaderboard for the economy is insane
thank you 
any news on columns coming back to v2 lol
that alignment could be useful tho, depending on how it renders on mobile
back? There never was any columns. I made a feature request for built in tablification, but they said they're not considering it
i was talking about inline fields, basically columns
There was no mention for or against it
But I'd imagine not considering they want to control the horizontal real estate and give us control over the vertical
I just use separators in containers that used to have inline fields as well
Or I can tablify text manually using a combo of regular spaces and zero width spaces inside of code blocks so that the text doesn't get trimmed and the code block kinda forces the text to be a consistent size
but it doesnt look nearly as nice on mobile
yeahh wish they added that specific functionality since they have it for inline buttons/images
i dislike using modals lol, wish these input fields supported multiline natively so i didnt have to do this goofy workaround
Don't they do multiline or am I thinking about smth else
i’m not sure about mobile but on desktop they don’t, shift enter does nothing
Are you talking about the textinput modal things?
Or the command input boxes
i'm talking about slash command text input fields, since i don't want to use modals
on mobile newlines do work, on desktop they don't
Ah
Yeah I don't think they do that on desktop, unless you used models or a send a message kinda thing there's no other way I think
discord moment
but i mean this workaround works pretty well lol so its fine
Hold on lemme try smth
Nope, didn't work
I was thinking of whether this thing worked on desktop
when you select that menu on desktop it just transforms into the usual input field command and spamming shift enter does nothing haha
Yeah I tested it
Sadge
Discord should really do smth like that
Yeah the new modal components are nice but they need to work on the other stuff
It feels like they're trying to phase them out without phasing them out
Prefix commands they're deffo trying to get rid of
yeahhh theres these tiny inconsistencies that you don't really notice but they're a real pain when you happen to need them to work 😭
they rejected my messages intent so i had to scrap prefix commands entirely 
I really god damn hope they don't reject mine
Pretty much the main feature relies on it
i'm planning to apply again cuz it was right around the time the leak thingy happened and they never replied to my follow-up
I never noticed since if I needed smth like that I just always used models or smth else
Ahhh
if you explain that it should be fine tbh
modals have horrible UX on mobile, the keyboard covers the submit button and you can't click anywhere on the modal to get it to disappear
that's why i prefer not using them
The main thing is a fully configurable listener to check for codes and fetch info on it all, it relies on message content. That and guild members for the dashboard I think, but I can feel that getting rejected
i think if you explain it thoroughly enough you'll be fine
they sent me my mail to get intents approved at like 85 servers and approved it way past 100 so it's kinda slow
Anyone knows a good free bot host?
its technically "free"
I tried it before and didn't work, I'll give it another one
Thanks
yeahh the word "good" and "free"
not soo much, gotta pay to get something worth it tbh
True, but still no trynna pay idk how much for a discord bot
1st can't 2nd won't
This is ass, you need coins, and there isn't any capacity left, but pay premium node you will have a capacity
Interesting right?
theres always a catch to these "free" services innit
or if u have an old pc or something u can host it on there too
Nope😕
I don't even have a pc
Let alone an old one
Ikr
ig u better wait until there is enough capacity hahahahah
there are cheaper hosts though, but still youd spend money atleast $3 ish+
i think you can host on https://render.com
i think they have a free hobby plan
Render for some reason banned my repo, "it may be against User Policy"
give it some random repo name lol that really shouldnt be an issue , never gotten banned from render LOL, only service ik ive been banned from is imgur!!
if youre willing to deal with some of the shit oracle throws at you upfront you can get 2x 1gb 1 cpu (slow) virtual servers you can comfortably host a bot on, or you can get their arm ampere virtual servers where you can create multiple (or just one) server totalling 4 cores and 24 gb of ram (its really fast), all completely for free always which is amazing, oracle is very competitive with their always free tier
but, they are very annoying to work with initially, you need a debit card upfront of course and they choose to deny your registration for absolutely no reason sometimes (ive had that happen because they didnt like my network), and after you get an account, you have to upgrade it to pay as you go where you pay a refundable $100 i think (you technically dont have to do this but they are known to terminate and prune accounts on only free tier resources if you dont upgrade, ive had it happen), but after that if youre careful not to go over the paid usage you are basically smooth sailing
theres a lot of lore to this but i think its more than worth it in the end if you have at least 100 buckaroos to spend that will get refunded instantly after
uhhh im technically not the one who needs the host anyways
As for me i personally don’t use oracle as my cloud provider
Repo name is "randomname"
Hidencloud
I used them for a bit. Better than bothosting where you need ads or coins to renew, instead you just press a button
Maintenance on their site is annoying since they often screw up and make the servers go offline, but the maintenance is rare
Though I always recommend getting smth like a raspberry pi zero 2w and just self hosting
Can't
Sadge
I've been self hosting for a while on a 3b, it works great. I have 3 bots, dashboard, and ngrok all running off it without any issues
Specs / Stats ^
Deff not free right
Other than the pi cost, it runs off usb and just needs a WiFi connection
It's like £30 for the pi
I would very much recommend it over any free host online though
You tried to contact their support?
Yh
Can't
They said it breaks one of them useless ass User Policy shit
It's aint true
Yeah that’s cooked
You tried this?
I think once also didn't work
I'll try again
As active as?
[d.py] no idea if anyone can help with this, but im using a webhook to send some components v2 and any media which was in a message.
It makes the webhook and does everything ok but when it tries to send it I get the error:
{"message": "Invalid Form Body", "code": 50035, "errors": {"components": {"3": {"items": {"_errors": [{"code": "BASE_TYPE_REQUIRED", "message": "This field is required"}]}}}}}
any help is appreciated
relevant code:
payload = {
"components": [
{"type": 10, "content": f"{ce.flag(detectedlang)} {message.content}"},
{"type": 14, "divider": True, "spacing": 1},
{"type": 10, "content": f"{ce.flag('United Kingdom')} {deeplresult.text}"}
] + [
{"type": 12, "media":{"url":media.url},"description":'null',"spoiler":'false'}
for media in message.attachments
],
"username": webhook.name,
"avatar_url": webhook.avatar.url if webhook.avatar else None,
"flags": 32768
}
async with aiohttp.ClientSession() as session:
async with session.post(
f"https://discord.com/api/v10/webhooks/%7Bwebhook.id%7D/%7Bwebhook.token%7D?with_components=true",
json=payload
) as resp:
if resp.status != 204:
print(await resp.text())
ive tried a bunch of stuff but cant figure out what it wants lol
is it possible media.url is null sometimes?
It was when trying this, but it's got the for media in message.attatchments so I assumed that would handle jt
If I try and do SMTh like for media in message.attatchments if message.attatchments else None then that screws it up more
Even then, I've tried with attachments and get the same thing
👀 This looks like its improperly formatted actually.
media galleries require an items parameter.
https://discord.com/developers/docs/components/reference#media-gallery
Build games, experiences, and integrations for millions of users on Discord.
{"type": 12, "media":{"url":media.url},"description":'null',"spoiler":'false'}
for media in message.attachments
Would output something like
[
{
"type": 12,
"media": {
"url": "https://cdn.example.com/image1.png"
},
"description": "null",
"spoiler": "false"
},
{
"type": 12,
"media": {
"url": "https://cdn.example.com/gif2.gif"
},
"description": "null",
"spoiler": "false"
}
]
Which would be a separate gallery for each image(still improperly formatted)
The docs link above should be helpful
hmm interesting
Let me know if the docs are not enough.
i think i understand it
trying smth now
before and after (images)
code:
payload = {
"components": [
{"type": 10, "content": f"{ce.flag(detectedlang)} {message.content}"},
{"type": 14, "divider": True, "spacing": 1},
{"type": 10, "content": f"{ce.flag('United Kingdom')} {deeplresult.text}"}
] + [
{"type": 12, "items": [{"media": {"url": media.url}, "description": "Message Image"} for media in message.attachments]}
],
"username": webhook.name,
"avatar_url": webhook.avatar.url if webhook.avatar else None,
"flags": 32768
}
it worked but image has decided to go kaput
i also found that if there is no image i get error
{"message": "Invalid Form Body", "code": 50035, "errors": {"components": {"3": {"items": {"_errors": [{"code": "BASE_TYPE_BAD_LENGTH", "message": "Must be between 1 and 10 in length."}]}}}}}
You should do some basic error every time
or just if else it
that cant work tho
or hold on
no no i think i realise how to do it now
i was thinking of if elsing inside the payload but because thats bound to end badly and take ages to figure out i just did if message.attachments: payload = ...... else payload = ....
alright welp everything works
i just had a shitty structure
thank you for your help :3
its not over yet... only for multiple images in a message, on pc they show as just infinitely loading until discord says nuh uh and stops, having the failed to load thing. however, on phone, they load perfectly fine instantly
yeah nevermind this is weird asf, its stopped but not stopped but stopped? idfk
guys
and now its a PC mod
︀︀(link below)
Quoting Ekical/ekNine (@Ekically)
︀
actually spent 4 hours coding this into a mod
**💬 1 👁️ 1 **
i made a mistake
i wanted to do it for VScode but someone else did it before me so i said fuck it and i made it for the whole pc xd
heat
One message removed from a suspended account.

Bring ChatGPT back.
We'll replace you with chatgpt then

Ok, so show me where the ChatGPT app is?
Hello?
Ok?
Thats where chatgpt is. I'm not really sure what you're asking for.
I believe they're asking for a chatgpt bot for Discord
hey guys. im getting my bot verified and i use python to run it but it uses discord.Intents.all() as the expected intents, the article says it doesnt give admin. should my bot still be functioning or will it error?
Intents and permissions are two different and completely unrelated things
ah okay im just a moron
You should never give all intents (Uses more network, cpu and ram) especially restricted ones likes message content and members.
Intents is what gateway event you want to recieve such as messages, dms, reactions, bans,ect.
Permissions is what access by default you want to have in servers that invite your bot.
Ideally you should never give bots full admin because it can nuke servers.
hm okay well its a logging and moderation bot. what should i give it then?
Depends what are you logging I guess?
messages like edits or deletes, possibly moderator actions and reactions
It'd be a good idea to go through the intents list and see which ones are relevant to you. Like you might not need any of the voice related events
Just not receiving some of the events is huge at scale
@minor oasis Hello, can you send me a DM once your bot is back online?
Will do
There is one command that can not be used by other users its called the maintenance mode enabled and disabled command it only works for me as the bot owner
As long as the command is restricted to owner only.
It might be a decline if you got an open owner-only command.
can I show you in dms what it do I have pictures of it for that command as it used to for when I need to put it into maintenance mode to fix the bot and like that
I mean, is it limited to your owner ID because that's all it needs to pass testing?
All the other command for ticket setup is for server owners and me but for the maintenance mode enabled and disabled commands so people cant abuse it But I can add your user id to the script to test it though
Alright, I understand your meaning. So, if the correct moment arises, I accept that you disable maintenance mode?
I can enable and disable the maintenance mode for both fixes or updates so users cant miss with the system
But the owner's command is what I'm saying—the moment it's done, for reviewing, it goes back to your owner ID again, correct?
Yes
Alright then, it's all fine. Just DM or ping me to get your bot reviewed again.
ok
@solemn latch support scam
ty
is there a way to override the client.users.fetch function?
if (Client.prototype.users) {
Client.prototype.users.fetch = async function (userId: string) {
const discordUser = await this.fetch(userId);
console.log({ discordUser });
discordUser.username = sanitizeUsername(discordUser.username);
return discordUser;
};
}```
I tried this at startup but at this point users doesnt exist so this never gets replaced
properties aren't initialized until the new keyword is called. You can only assign properties directly to the prototype. Instead, you will need a reference to the typeof Client.users and assign the prototype on that
gotcha
Why override the prototype and not extend the class to add a getter?
how do i do that xd
my brain is roasted, havent coded in a long time
😭
i remember class extends something
Something like this work for you?
class CustomUserManager extends UserManager {
async fetch(userId: string, options?: any) {
const discordUser = await super.fetch(userId, options);
discordUser.username = sanitizeUsername(discordUser.username);
console.log({ discordUser });
return discordUser;
}
}
thanks
but does this actually override the func from client.users.fetch?
i dont think so right?
cause im using client.users.fetch everywhere so
Extend the client too ;p
that’s why I just done it on the prototype too lazy
I almost never modify prototypes, usually means you’re doing something hacky. I’d rather just define my own functionality in a subclass
Hmm
Much more extensible too, and is easier to debug when something breaks
hacky is awesome and fun
const ___fetch = Object.getOwnPropertyDescriptor(window, "fetch");
Object.defineProperty(window, "fetch", {
value: function() {
if(arguments[0].includes("HandRaise")) {
window.postMessage({ source: 'meet-statistics', type: "send", payload: arguments[1].body }, '*');
}
// @ts-ignore
return ___fetch.value.apply(this, arguments);
}
});
:^)
still looks better than "hacky" approaches to problems in rust
cant even imagin what hacky looks like in rust
beauty
since rust has a very annoying ownership and borrowing system (to prevent undefined behaviour), you usually have to choose between accepting an unnecessary copy or write a 200+ line file to work around the problem using some fancy rust compile time shenanigans (ive had this happen to me a few times)
or you can hope there is a crate to solve your problem
or you can also opt into using unsafe but even then in some cases unsafe cant save you
dont you have to mark the entire function as unsafe if you use a single unsafe within one?
ive had some situation happen where rust wouldnt let me use some unsafe resource inside a safe function without also declaring it unsafe, it involved global variables though
actually i think it was that i needed unsafe to access the global variable
you need unsafe to access static muts
but you should be able to always use an unsafe block
ive ran into a very annoying problem where i had a global variable which had to be initialized at runtime, but i know it will only be initialized once and code accessing it wont access it before that point, so i had to opt into using LazyLock which checks if the value was initialized on every single access
i tried to solve it with unsafe but figured it was more trouble than it was worth, but i do want to revisit it some day
i also didnt want to make an annoying wrapper function for it just to make it safe for other code but i think i might just have to do that
at least i wont incur the cost of checking if it was initialized unnecessarily since the function will be inlined anyawys
realistically that check wont matter, the cpu branch predictor will figure it out pretty quickly
depends on what the var is for
yeah thats true also, its a very trivial and easily predicted branch
yes, though I do use these in some places
#[inline(always)]
#[cold]
fn cold_path() {}
#[inline(always)]
pub fn likely(b: bool) -> bool {
if b {
true
} else {
cold_path();
false
}
}
#[inline(always)]
pub fn unlikely(b: bool) -> bool {
if b {
cold_path();
true
} else {
false
}
}
famously also used in the hashmap impl for 15% speed improvements or something
that is very surprising, even more surprising that this likely/unlikely implementation works since i would expect the compiler to just optimize it away entirely where it wont make an impact
i see its trying to encourage the compiler to make the likely case the fallthrough path since predictors are more likely to pick it
yes
and the compiler fully follows this, even in cases where this would be suboptimal
not sure about unlikely(true) though
i could imagine that being optimized away
how come my users consistently run into this "uh oh" error when visiting my bot's store? it works sometimes and displays the store correctly, but other times it doesnt
Sounds like a question for discord support
i had this same issue with an old project of mine
the only solution i found to reliably display products
was using the "product" type button components
I actually think I figured it out last night! I had to fiddle around with the bot’s discovery settings and disable -> enable it and now it works perfectly
I used to have direct product type buttons but those disappeared for mobile users so I stuck with links
that's great to hear 
anyway yeah this was super annoying
so i try to use my own payment processors as much as i can 🤣
Yup!! I’m seriously considering doing the same😂
000

@solemn latch all channels
tyty
yes mostly in the description field though

its probably because the negative weight of the cold_path method (marked as cold) somehow propagates onto the condition itself, compilers do some weird stuff when inlining methods and eliminating dead code so it probably has some rules for hints like cold to propagate onto the condition
although it wont be needed anymore since nightly added in std::intrinsics::likely
probably does something similar under the hood but with a guarantee that it will actually always hint instead of potentially breaking in future llvm/rust versions
am i dumb or what the fuck is going on here
free actions, github? say no more!
i just run gitea and have 2 action runners hosted for free on oracle
ez free action runners
well i would if I had proper arm and mac hardware
realistically even with my own hw these builds wouldnt get much faster either
its rust with all optimizations cranked
like literally everything
takes 3min with cached deps on 9900x
mines only takes around 39 seconds if the deps and cargo install is cached
but yeah its incredibly annoying getting rust action runners to be fast
i dont have almost as much trouble with c++ and js codebases
this is peak slowness
but I need the small bin size
I cant ship 50mb to prod
22mb with this
I mean js isnt really compiled is it
are you building the binary in action runners?
it isnt but meant more like vite projects where i have to build a frontend, though yeah it would be naturally faster anyways
i dont even bother caching the npm installs because its so fast anyways
yes
though thats for a svelte codebase if it was react id probably be waiting 5 minutes for the npm install to finish
ah do you also have them automatically add a release? then that makes sense instead of just running cargo check
Hi
thanks rust 1.91.0
hey can someone help me set up a vote-tracking system for server? dm me or reply if you can help, thanks
Umm anyone?
handling in #topgg-api
i would like to share this vsc extension as a time saver for making embeds, used to use a web based designer but this is quicker
this is not self promotion or promotion
https://marketplace.visualstudio.com/items?itemName=EthicalProgrammer.discord-embed
we now have prefilled icons :D
and yes its the exact same grid from my dashboard 😂

i gave it a task bar icon 
its slowly coming together, buttons only log to console rn!
@errant musk it sure is getting there 👀
Hell yesss dude 🔥🔥 it’s looking good!!
font? yes
difficulty selector
it now generates prefilled based on min/max values for each difficulty (and you can change difficulty!)
can also select a theme, but right now that doesnt do anything 
YESSSS 🔥🔥🔥
nice
dokusu
but is it AI Powered™
that phrase makes me sick
i like how the rust people anticipated people accidentally using %s for strings instead of {} so they added a warning
i think the buttons should be like toastified or smth
or smth should be done to em
oh yeah definitely
im planning to work on buttons and the stats at the bottom once its playable


@steel oxide Hey, have you ever worked with spotify api?
unfortunately not sorry 
what do you need
its just an api so should be pretty straight forward
I'm getting an error every time I use the api, like for instance, I was coding a command to fetch similar artists, but every time I try to run the command, it gives back a 404 error.
you have to be a bit more specific like providing the URLs you are trying to fetch, 404 usually means it cant find whatever url you are querying on the spotify api
Wait. I'll send you the error
Error in similar-artists command: http status: 404, code: -1 - https://api.spotify.com/v1/artists/711MCceyCBcFnzjGY4Q7Un/related-artists:
Not Found, reason: None```
ping me in your reply (as I'm going offline)
was doing some digging and found this https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
they removed related artists api route completely
as a sort of workaround you can fetch the artist and get their genres
then you can use the search api to search for one (or more) of those genres and thats how you can sort of get similar artists
Ooohh, thankkk youu soo much @frosty gale
bread?
It’s toast xD
lul
I hand drew them 
💀 github just shoved AI on the homepage
Why is there no feature preview to turn this off

they moved feed to a seperate thing aswell
That's the new home exprience you can turn that off in feature previews
oh didn't know
If it helps Firefox constantly tries pushing ai onto me when I open it
I use floorp (firefox fork) so i don't have to deal with that 🙂
NOOOOOOO
NOT GITHUB 
does it
i use firefox as my daily driver and i havent had a hint of ai
Looks like you can turn it off but it's worded weirdly https://github.com/settings/copilot/features
Time to disable it then
Yeah it keeps popping up in the corner saying I can use AI to do xyz
Luckily it’s not really that annoying since it’s like the smallest popup ever 😂
it doesnt make it better that github copilot is the more mid ai coding agents
tryed using the vc command on my bot for the first time in a while and it doesn't work now? I have changed nothing at all in a couple years now. This is the error I have:
I did install the sodium wrapper as the answer on stack overflow suggested but that has done nothing
had to update something and then install soething called dave?
if i remember discord recently announced that they are requiring end to end encryption on their voice channels, so looks like that changed is live just recently, so your existing code might not work, that stack overflow answer is probably years old too
did you update discord.js to latest?
Yeah i think thats what the DAVE thing was I had to install was. I just updated the voice library cuz I'm guessing if I update the core d.js library i will have to rewrite my code again.
rust compiler goes real quiet once i pull out this bad boy
#[allow(dead_code)] 😭
#[allow(clippy::too_many_arguments)] >>>
guys, i need help
im working part time for a small company, and their lead developer just quit, and they need me to inherit his source code temporarily while they figure stuff out
its ASP.net core 8 i think?
no idea how to work with it, how to compile it, how to test it or how to upload it to the webhost lmao
Install Visual Studio and select .NET development with ASP.NET (or whatever the ASP option is)
Open the solution with visual studio
Set the startup project to be whatever project has the Program.cs file in it
visual studio community 2022 right?
Yeah that works
There will be a green “play” button at the top where you can launch after setting the startup project. It might say “IIS Express” or “http” or “https”, it really just depends on their setup
Uhhhhh .NET Framework is really old
gonna remove copilot lmao
Odd, there wasn’t a setup wizard that had icons or anything like that?
Ah okay that should be fine, the pack should include .net core
You probably already have it installed through some other program, which is fine
Just continue with that installation
alright
they sent me the source code in a zip file, it contains a .sln and a folder, and in the folder a program.cs
You should be able to open the .sln file with visual studio
then for uploading it to the webhost, do i compile it on my pc, and upload the compiled files to the host?
its a plesk panel windows host
Uhhhh it’s going to depend largely on your setup. Personally when I deploy, I use docker containers, but I imagine yours is different
I’ll look it up and see if I can get any info for you
You can compile with like dotnet publish “YourProject.csproj” -c Release -o your/output/dir
Which will compile a dll that can be run with dotnet OutputDll.dll
Are you familiar with Docker? I’ll send my usual dockerfile setup here so you can take a look at how it builds in release mode.
(You don’t have to use docker but you can still see the build process)
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["DisasterAnalysis/DisasterAnalysis.csproj", "DisasterAnalysis/"]
RUN dotnet restore "DisasterAnalysis/DisasterAnalysis.csproj"
COPY . .
WORKDIR "/src/DisasterAnalysis"
RUN dotnet build "DisasterAnalysis.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DisasterAnalysis.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DisasterAnalysis.dll"]
It might differ a little bit based on your setup. The way .NET projects work is that there is usually a "Solution", which contains many "Projects". This dockerfile setup is just compiling one project, since I only have one project for my actual API for this case, and one project for my tests (which aren't included in this process since I'm not running tests on deployment, that's a job for CI)
they dont use docker afaik
its just a windows shared hosting
Yeah I figured
i dont see any settings for starting/stopping the asp.net server, i'll need to test if uploading new files would trigger some kind of auto-restart
If you upload new files, you have to recompile
i have to recompile in my pc, then upload the compiled dlls
Yeah, or you could rebuild on the host if that’s more convenient to use something like a private git repo
this is what i have access to
Oh I’ve never used that before
its a basic shared webhost lol
Google is saying that you can use that dotnet publish command I suggested earlier, zip up the output files, upload it to Plesk, extract it into the “httpdocs” folder (idk what that is), and configure the application settings on Plesk:
Application root: Specify the directory where your application’s files reside
Document Root: Static content (wwwroot for asp.net core)
Application Startup File: YourApp.dll
All of that sounds about right
the application settings are in place i believe, but i dont see any way to run a publish command
You’d run it in the terminal on your pc to compile it
dotnet publish “YourProject.csproj” -c Release -o /your/output/dir
This generates the DLL and any other files you need
Then you’d zip that output up, transfer it to Plesk, unzip in the right place (whatever your configuration points to), and voila
alright ill give it a go
i was just confused if the server would auto restart on file change, but it seems it does
I think there’s a way to do this in Visual Studio itself but I’m just more familiar with the cmd line for this process
more specifically, it seems that modifying web.config will cause an auto-restart
AI to the rescue lol
Yeah it’s pretty useful for deployment
Especially since a lot of these smaller companies have janky non-standard configurations
Silly Waffle it's called .NET now
not .NET Core
lmao
it used to be that .net framework was windows only with stuff like windows api and windows forms and core was cross platform but they merged it all into one now
If you’re ever working on a .net framework app then I pity you
Been there and done that
alright i opened the project in VS, now i need to figure out how to fix the bug they asked me to
xD
You can use the FTP to publish using visual studio
Is it a web api or is it a full MVC app?
Yea MVC is still nice and useful but i've switched to fully using blazor
I absolutely despise razor pages, haven’t tried blazor though. Asp is great when you use it with an SPA
full mvc app
Tim you should see a build publish option, create a FTP profile with the settings, then publish using that
this just downloads a .appsettings file
ok i fixed the bug and running an IIS test server now
Dang, must’ve been an easy bug lol
welp
yeah the previous dev did an incorrect rounding of a certain value, used Math.round with 3 digits instead of 2
Looks like your configuration has some things in appsettings.json or appsetings.Development.json that is causing that network path
^^
Configuration is a dictionary that is typically read from an appsettings.json file or appsettings.[ENVIRONMENT].json file
hmm i think its looking for the mysql database locally
not sure if the database runs alongside the project
or if i would need to run it separately
Separately usually
Do you have a connection string in the appsettings? Also, I think that exception you showed is the result of it not finding an appsettings file, not just a mysql db
yeah there is a connection string in appsettings
im gonna copy the string from the production appsettings
Uhh
Probably not a good idea
I’d imagine that your prod db and development db should be different
probably, but its just for testing
or i can just "test in production" :^)
i mean, realistically what could happen just from changing a single int and then recompiling?
You might have bootstrapping processes that do something on startup like creating an admin account with a default username and password
hmm
For one of my projects, my prod db is not directly accessible (since it’s running inside a docker container network), so I can’t create an admin account manually. Therefore, I have a section of my appsettings that specifies the admin account info and it’ll create the user if it doesn’t exist on startup
Not a super common configuration but it’s def possible
all i was tasked to do was to open the source files, fix the issue with the rounding error and update the website
i already fixed the issue in the source code, now to apply it to the website is where im at, i dont want to accidentally screw something up
I mean it’s possible that they don’t have a dev database. Does the connection string look for something locally running or is it an actual host somewhere?
Use your own judgement, I doubt it would be an issue but just warning of the dangers :p
I’ve had times at my work where I use the prod db
Just depends on your setup
the development connection string looks like this
Server=WK-HTS0380;Database=StarSeeds2;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=true
Me when i SSH and route my ports from server to local so i can access them 🙂
Yeah I can still access my prod db through that, but it’s just a hassle
ok i generated the publish folder, now im gonna try uploading it to the host
gonna made a full backup of the old files first
at my job we have a dev database but its almost never used we usually just use the live db
we have to justify that overpriced veeam backup cost somehow
hearing veeam gives me ptsd
monitoring like 200 windows servers is my current nightmare
that's massive
my entire docker image for my backend is 90mb lol
lol
is this why it is generating all those runtimes?
ah did you enable the self contained option?
that will bundle the runtime in the final build
yes i think so
set it to your target (probably windows 64) and disable self contained if its checked
its set to framework-dependent
target framework net8.0
big as in "good" or big as in "that's too big of a size"
that should use your system .net then
well I think 90mb is still barely fine
I try to keep mine under 30mb
Yeah you shouldn't be using self contained since the host already has the runtime installed (I'm assuming)
Not much more I can do to get it under. Needs the .net runtime, it's not native code
yea
according to the asp.net settings in the plesk panel, the framework version is 4.8.0

Maybe you DO need self contained lol
idk, lmao
just keep it on then it just means the builds are fat
idk because on the plan page it says
.Net Core 9.0,8.x, 7.x, 6.x
ASP.NET Frameworks 4.x, 3.x & 2.x
so maybe 4.8.0 refers to asp.net and visual studio is refering to net core 8.0?
is a webdeploy .publishsettings file something i can add to visual studio to automate uploading the files?
4.8.0 is the old .net framework
Followed by .NET Core 1 - 3 which then got changed to just .NET 5+
oh right thats asp net
thats almost the latest version then
asp net is the web framework library sorta like express but on sterioids
so it has nothing to do with net8.0 that is set in visual studio
no thats just the library so youre all up to date
im testing different build options in visual studio just to get a feel for it
i didnt try uploading the actual files yet
Why would it even show that though it's very confusing
is single file executable worth it?
it leads to longer builds but its your choice, if its an app youre distributing to people you should probably go for single file, otherwise go for regular where it dumps all dll's in a directory with the exe
what about ready2run?
never used it tbh but reading on it it basically precompiles some of your code so the net runtime doesnt have to do it while JIT compiling
you can but apparently it will increase your final build size by a lot
the JIT will probably do a good enough job anyways caching bytecode so its probably unnecessary here
some of it physically cant be precompiled so it most likely wont even precompile the entire program
and trim unused code? the logs show some trim warnings when i enable this
what warning?
peak code
class Request(_data) {
let _head = string#slice(_data, 0, string#index_of(_data, "\n"))
let _method = string#slice(_head, 0, string#index_of(_head, " "))
let _method_len = string#len(_method)
_method_len++
let _end_slice = string#len(_head)
_end_slice -= 10
let _path = string#slice(_head, _method_len, _end_slice)
let _path_query = string#index_of(_path, "?")
_path_query++
let _query = ""
if (_path_query <= string#len(_path)) {
_query = string#slice(_path, _path_query, string#len(_path))
_path_query--
_path = string#slice(_path, 0, _path_query)
}
let _headers = []
let lines = string#split(_data, "\n")
let i = 1
let header = []
loop {
let line = array#get(lines, i)
if not (string#trim(line)) {
break
}
let key = string#slice(line, 0, string#index_of(line, ":"))
let key_len = string#len(key)
key_len += 2
let value = string#slice(line, key_len, string#len(line))
let header = array#clone([])
array#set(header, 0, key)
array#set(header, 1, value)
array#push(_headers, header)
i++
}
fn method(self) {
return _method
}
fn headers_get(self, key, default) {
let result = default
let i = 0
loop {
let header = array#get(_headers, i)
if not (header) {
break
}
let _key = array#get(header, 0)
if (_key === key) {
result = array#get(header, 1)
break
}
i++
}
return result
}
fn path(self) {
return _path
}
fn query(self) {
return _query
}
}
idk im building without it rn. it was something like "trim() generated warnings, check <something> for more info"
what atrocity language is that

get one step ahead of other languages and make string#slice accept string parameters that automatically call index_of behind the scenes
string#slice(_data, 0, "\n");
``` why dont other languages support this
i mean it kills readability doesnt it
(in general, not here for um obvious reasons)
also u can do this peak
i was about to also ask wtf is this language
but not in a bad way so i think that bodes well for you
good
nice xD
spaces in method names became a taboo after the nasa catastrophe, back in fortran days
this too
welp
for the catastrophe thing
ah, apparently this was turned on lol
i get a ton of these when i enable trim unused code
Warning IL2104: Assembly 'Microsoft.EntityFrameworkCore.Relational' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries
anyway trim unused only shows up if i set it to self-contained, im gonna try framework-dependent and see if it works
im not a .net guru but i can assume that in some cases the runtime/bytecode generator cant know for sure if a library function is actually unused or not so it could mistakenly get rid of functions that are actually used which will break your program
you can prob disable it if youre unsure
ive never ran into these before so im not sure what crack your jobs codebase is on
neither do i
setting it to frame-work dependent make it 80mb instead of 120mb+
lets see if this works
this plesk file manager is abysmally slow though
it takes like 2min to delete files and replace them with the new ones
apparently its working fine for now
reduced project size from 200mb to 80mb lol
sounds worse than ftp
it definitely is
and its not even transferring anything
i upload the zip, i unzip the zip


