#development
1 messages · Page 266 of 1
what about a zombie
real
The next thing that comes to mind is the face of a ghost, but I remember this one meme about face recognition
dang
When I get developer betch
It detected random objects
It doesnt anymore
Emotion: fear is crazy
lmao
I think the bot may have trouble distinguishing between fear and surprise (I have a problem with this myself) 
yea
The command is in Beta
I need to fix some stuff
And it thinks that kids are 30+ 💀
yep
The plan is to have either proxies or just a mesh of clients that are able to do requests sequentially
The proxies are backed by the same lib
did you respond with 200?
also if you make it do alot of stuff before sending the response it times out fast so it retries
Never lol not when you keep cloning bots LOL
How are you @past rampart
Um.. Welp
@bitter granite please help he was talking screenshot and send to others server's
That does not break any rules thou
But he send all screenshots my personal question also
Since its public information
We cant do anything
Also this is a public server
I am not saying that this is public server but can i complaint to other server
for some reason when I import my self signed certificate as a trusted certificate, chromium browsers still treat it as untrusted when accessing my dev site using that certificate, any ideas?
i thought chromium browsers relied on the OS certificate store to determine if a certificate authority is valid or not
but then importing and being able to use a self signed certificate in a browser is a common use case, especially in enterprises
besides i dont mind the untrusted error, but i cant use webauthn with an untrusted certificate error
maybe i need to make a self signed certificate authority first then sign a certificate and import the CA root certificate
ok got it working, apparently for browsers to trust the certificate you need to make an additional config file which specifies some algorithms & dns names when generating with openssl
Just a little question i'm working redoing my website
V1 uses Var and is a normal file
but V2 uses Imports and is a module type
Is import a better idea?
It’s just two different styles of importing modules. The latter is considered more modern, and works with ESM modules. The former is used with CJS modules, and is considered more outdated. Also, please don’t use var
ok i wont use Var thank you
SecurityTokenSignatureKeyNotFoundException: IDX10503: Signature validation failed. The token's kid is: '303223259816525826', but did not match any keys in TokenValidationParameters or Configuration. Keys tried: 'Microsoft.IdentityModel.Tokens.RsaSecurityKey, KeyId: '303110851060039682', InternalId: '0rYMURguPhZTOdUrzXjLG-OiFz7LQmqkg0JHaM5Ov4w'. , KeyId: 303110851060039682 '. Number of keys in TokenValidationParameters: '0'. Number of keys in Configuration: '1'. Exceptions caught: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. token: '[PII of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. See https://aka.ms/IDX10503 for details.
What in the absolute fuck does this mean
💀
Asp.net uses data encryption for certain features and they store a key in the Data-Protection folder, maybe you're using docker or something is blocking if?
Not at all
Not using docker
Im using dotnet watch
maybe that 
Yea
I just had to restart dotnet
weird
User home folder DataProtection-Keys
I fixed it
Seems it was a dotnet watch issue
Ive had a lot of problems with dotnet watch
Check your nuget package manager and see if any of these have a different version to each other if you have them installed.
Microsoft.IdentityModel.Tokens Microsoft.IdentityModel.JsonWebTokens Microsoft.IdentityModel.Protocols.OpenIdConnect.
Or all the identity model packages
It seems to just be an issue with dotnet watch
I can't reproduce it other than when using dotnet watch
I seem to run into a predicament
I have a service that requires another service
Should I inject that service into this service, or make a new service that uses the both of em?
hey guys genuine question here.
How does my structure look?
So the way i went to work, is i created several categories for several functionalities/features.
Idk never worked with something this categorized myself
not only that but i also mplemented each file as a class that i can create objects of. For some reason this just looked easier to manage, especially cuz now each request will generate a new object.
Really depends on preference and/or project type
Like my structure?
I have my database related stuff in a separate project
And especially with DI i have an Abstractions project which contains all the interface types, so i can just reference this project when i need the types rather than a project with the implementations

how does my project structure look?
Same, I keep my database models & dbctx in a separate csproj, then my services in a different project, and my controllers in a different project
I didnt know how to set this upo
or I would of
still rather new to C# and DI
are you talking about dependency injection?
yea
JS and DI dont sound right
it's very nice
I dont see any dependency injection there

im moving from commonjs to esm so i put this into a function for now. i'll eventually use await import directly
thats how i structured it
You simply add a "Class library" project with your DbContext and all db related stuff and reference this project in your blazor project (looking at your structure)
Then you can simply add your DbContext to your DI like this:
builder.Services.AddDbContextFactory<ApplicationDbContext>(options =>
options.UseNpgsql(
builder.Configuration.GetConnectionString("ApplicationContext")
)
);
ApplicationDbContext resides in the Data project in my case
interesting, i can still able to access the files like normal if i separate my folders into different projects right?
Wdym by "access the files like normal"?
is it like a whole separated project like different project in js? for example, i have bot and server project. can i have bot able to access classes and values in server, or not?
ofc you can, you simply add a project reference and can access the types of the other project (ofc if the visibility modifier allows this)
In Rider you can right-click on the project name "Add" "Reference..." and just tick the project you want to reference
i see, thanks for the information!!
Sure 
i recently added Aspire to my project which is really nice bc you have this dashboard where you can access all your services (With the logs and traces) at one place
is that similar to portainer?
i'd say its similar to portainer and docker desktop in that sense that you have a dashboard of your running containers. but on top of that you have also support for logs, traces and metrics builtin (at least with docker desktop im not aware of such feature)
oooo
lmao i was thinking "no way 16vcore with just $45", and i was right 
rich
you're no longer available
😭
Thank you 🙏
Didnt know you can do that
This will make things so much more organized on our end
I can split stuff up into projects

hello
2 questions
1st, the blue line - how can I make just a thin black line here? & 2nd how do I even out the divs?
if no reply, ping. thanks
blue line is where section ends btw
<section class="footer">
<div>
<h4>Contact Us</h4>
<p>Tele: 01566 775543</p>
</div>
<div>
<h4>Find Us</h4>
<p>Location</p>
</div>
<div class="newsletter">
<h4>Subscribe to our newsletter</h4>
<p>For exclusive deals, upcoming events, tips & tricks & more</p>
<input />
</div>
</section>```
Hm, so im attempting this now, and it seems to cause duplicate code, which causes C# to see 2 of the same methods so it isn't "sure" which one to use
causing Ambiguous invocation errors
While I have an auth project, it seems to put the same code in the main project that references it
huh
why is there a MercatusWeb.Authentication folder inside the MercatusWeb project?
It appeared when you added the project reference of MercatusWeb.Authentication to the MercatusWeb project?
yea
that is really weird, shouldnt happen
I clicked this on the MercatusWeb proj
yea
and then checked the box next to MercatusWeb.Authentication
and then the folder appeared
you should delete the folder inside the MercatusWeb project

Are the namespaces of the files inside the MercatusWeb.Authentication correct? maybe thats causing issues
you can right-click the MercatusWeb.Authentication project -> refactor this -> Adjust namespaces in case
Rider should be able to figure the references out if they are missing
Let me try this again
When you look at the .csproj, is there the project reference?
Yes, New Project, Class Library
What do you input here when adding a new project?
MercatusWeb.Auth and the directory is the root dir for the project
C:/Users/dyeaa/Dev/MercatusWeb
yea this seems correct
oh haha
the .sln should be one hierachy above
It should be like this
you should be able to move the files in the file system and re-open the sln again in rider

alright
time to
figure this shit out
The problem is
hi hi
messy ass folder

based
just yoink the MercatusWeb file and move it one hierachy up
that should be all you need
rider also uses it, you can see the type of MercatusWeb is SLN File
I think its just the way C# works, root .sln file and project .csproj files
yeah i figured it out, just wondering about sln file
Sln lists all the sub-projects
With the path to their respective .csproj files which itself contains project-specific information like nuget or project dependencies
you can look at the contents of the sln file, if you click the dropdown next to solution and select file system, then you will see the .sln file
whats the content of the docker stuff, if its like a docker compose to start the whole project with additional services, id move it to the root folder next to the .sln. if it just builds one sub-project as an image (e.g. the blazor project) id keep it inside the web project folder
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["MercatusWeb.csproj", "./"]
RUN dotnet restore "MercatusWeb.csproj"
COPY . .
WORKDIR "/src/"
RUN dotnet build "MercatusWeb.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "MercatusWeb.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MercatusWeb.dll"]
Seems like it starts the blazor app
Yea
did it work with the projects?
oh :/ didnt it work by just copying the .sln one fielder hierachy up?
Not really
It caused a lot of reference errors
I didnt feel like dealing with
💀
oh okay
Ah you're using docker itself to build and publish hu interesting
Usually you just publish straight from vs/rider
Well
I decided to split up our ui components into its own project as well
seems like thats not a good idea if idk how blazor works fully
Scoped css files don't seem to get used
I have a navbar in my Shared project that I use in my Web project
The navbar font is not correct because the Navbar.razor.css file's styles aren't being applied
Omg
I fixed it

I needed to add <link rel="stylesheet" href="@Assets["Mercatus.Web.styles.css"]"> to my App.Razor
Greetings devs, i'v been having some troubles to get the Privileged Intents approval, so I tried giving, screenshots, videos, and explaining my app functions and why the app needs the Server Members Intent and got denied 2 times, is there any tip I could get, I'm already at 80 servers and probably next week getting 100.
If you've been denied twice then it's likely that they determined that your app either doesn't actually need the server members intent or the feature that requires it isn't a good enough reason to grant the privilege and you should reconsider your feature set
I mean without it the function will become just garbage, and as for now I don't see any workaround on how to change the code to not use that privilege.
And it is a main function.
Heyo, idk if I may ask/post for this around here if not then say it and I remove it. But I just wanted to ask for opinions on my design for a dashboard of my bot and what I should add/change to it since this place is more for bots.
Administrative Logs: Logs include detailed mentions (e.g., @username) for actions like forcing a logout, adjusting user time, or resetting categories. Without the intent, we’d only have user IDs, making logs harder for admins to read and use.
Role Verification: The bot checks user roles (even offline) to ensure only authorized users can execute specific commands. Without the intent, offline users’ roles can’t be verified, risking permission inconsistencies.
Forcing User Logout: Allows admins to log out users from a category while providing mentions in the confirmation/logs. Without the intent, only IDs can be logged, requiring manual lookups.
Active User Lists: Displays who is currently checked into a category. The intent allows fetching both online and offline users with mentions. Without it, the bot can only show IDs or online users.
Adjusting User Time: Admins can add or remove time for users in categories. With the intent, mentions are used for clarity; without it, only IDs can be shown.
Category Reset: Mentions all users affected by the reset in the logs. Without the intent, we’re stuck with IDs, reducing the clarity of the reset's impact.
Xlsx files data: When exporting the data as xlsx files no usernames will be shown and only IDs, this being inefficient and confusing for the bot purpose.
Without this intent, the bot would lose a lot of its usability, forcing admins to rely on IDs instead of mentions, which is inefficient and confusing. Many actions depend on offline user data (roles, names), and this functionality would be incomplete without the intent.
This seems like it was copied from a template, it looks a little generic
For my app I've send them a screen recording of the function with and without the intent and explained in a text how important it is for the bot snd the users. After some time I got them granted.
damn it, I see what you mean now too.
I've didn't tried to send them proofs of how will look with out it, but that's a good point I should try it.
I have already some changes in mind, I'll make them tmrw and post the result here
I mean, it is copied from a template is it not
Guys, ima die if I cant figure out how to remove this annoying white outline around my already set outline
😠
no it isn't copied, I came up with it myself 😅
Why the HTML 5 logo?
Or bootstrap logo whatever it is
Its a placeholder, I had the picture randomly in my download folder
Ah
its html5 👍
outline: none;
}```
maybe try this
Is that when you focus the the textbox?
Try input:focus and then either box-shadow: none border: none outline: none
Try a different browser?
Could just be browser accessibility shenanigans
Or maybe you have an extension that doesn’t play nicely with your CSS like dark reader or something
dark reader is disabled
Does it even on edge
So unless they both enforce the same thing then its a me issue
ME is garbage (I know it’s better now but I hate it from the early days) just use a diff browser to check
Could just be a box-shadow that always gets ya
In the browser inspect tab to the right there is a sub tabbed list one of them is computed css try find what it is
Just focus the textbox then scroll through the list and see what light color is showing up
It's a good way to see what the active css of a component is especially font, compared to the standard entire list of css applied to it
Yup there it is border color?
but the issue is, im telling it not to
Just set it to none
so wtf
Try border-bottom-color: none !important; or transparent or border-bottom: none !important;
nope
Not even with !important?
yup

How are you applying the css and is there a bottom css file overriding it or something
Maybe try search the project files for the rgb color?
as far as ik you don't need the intents for any of theses
I am using tailwindcss
but even doing it myself nothing
Your custom css needs to be loaded after tailwind for it to override those styles
Maybe try explicitly doing a <input style="border: none !important;" />
my discord bot only uses theses 2 and it can fetch users no problem and not a single one enabled here
Sadly nope
There's something very wrong with your project then if you can't seem to find or override what is doing that
try
all: initial;
Ok in the same computed tab click the arrow dropdown it should say what is apply the style
See, I can do
input[type="search"]:focus {
outline: none;
box-shadow: none;
}
but then I cant apply a custom outline color
💀
try what i said: all: initial;
Wouldn't that not solve the issue if it resets it to the defaults?
The defaults is that the white border is there
you put it as first in there then set the other css
so example
input[type="search"]:focus {
all: initial;
outline: whatever you want here;
}
Yea no, i'd have to style all its original defaults
Not worth the effort
That resets it to a basic text field with some search attributes
Im not going to restyle everything
Might i ask how you dynamically control what people can see based on auth status? I know of AuthorizeView, but that seems rather limiting that I can't use Authorized / NotAuthorized in nested html blocks
you could set
outline: none;
box-shadow: none;
to the values you want and use !important
They already tried that Wolf
Apparently none of that is working even if you explicitly override it which is weird
Idk wtf is going on with it
but idrc rn
Its the least priority
I was just wondering if I could fix it right then and there
weird
have you tried normalize.css maybe?
@sharp geyser
What are your tailwind styles? i've had similar issues with tailwind
ignore ping
was seeing messages from 3h ago
lmao
what are u doing that's filling 10gb??
but well, that's probably the cause of the large difference
p much sure it's cassandra too
yeah, mine got 32gb so kinda not fair
right side spent 1.6 seconds doing garbage, so without hitting it'd take 18ms
oh java, did you try using zgc?
is that another java runtime ?
oh, havent tried that
it's a zero-latency gc, doesn't clean as much garbage as G1 but takes virtually no time to run
basically u use it when you want to trade cpu for speed, and G1 when you can afford higher latency to spare cpu
that's interesting, but it takes cpu quite a lot too
I find it the best for APIs, where most of the time you'll be idle
the cpu impact is very small if your Xmx is lower
oh i see i see
hi
With topgg API can get data for other bots? (i.e the same data which I get for my bot I want it for other bots)
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
https://docs.top.gg/docs/API/bot
{
"defAvatar": "6debd47ed13483642cf09e832ed0bc1b",
"invite": "",
"website": "https://discordbots.org",
"support": "KYZsaFb",
"github": "https://github.com/DiscordBotList/Luca",
"longdesc": "Luca only works in the **Discord Bot List** server. \r\nPrepend commands with the prefix `-` or `@Luca#1375`. \r\n**Please refrain from using these commands in non testing channels.**\r\n- `botinfo @bot` Shows bot info, title redirects to site listing.\r\n- `bots @user`* Shows all bots of that user, includes bots in the queue.\r\n- `owner / -owners @bot`* Shows all owners of that bot.\r\n- `prefix @bot`* Shows the prefix of that bot.\r\n* Mobile friendly version exists. Just add `noembed` to the end of the command.\r\n",
"shortdesc": "Luca is a bot for managing and informing members of the server",
"prefix": "- or @Luca#1375",
"clientid": "264811613708746752",
"avatar": "7edcc4c6fbb0b23762455ca139f0e1c9",
"id": "264811613708746752",
"discriminator": "1375",
"username": "Luca",
"date": "2017-04-26T18:08:17.125Z",
"server_count": 2,
"shard_count": 1,
"guilds": ["417723229721853963", "264445053596991498"],
"shards": [],
"monthlyPoints": 19,
"points": 397,
"certifiedBot": false,
"owners": ["129908908096487424"],
"tags": ["Moderation", "Role Management", "Logging"],
"donatebotguildid": ""
}
API resource for a bots or apps on a platform like Discord
all the data you can get from a request
For not my bot i.e the bots which I haven't posted I want data of websites,server count,server member and so on
So can I get it all?Or I can get it only for my bot
see the list above
I saw this but I can't understand this that I can get only for my bot?
it's for any (topgg) bot as long as u have the id
you can also get up to last 1000 voters and check whether someone voted
do note tho that rewarding people for voting on other bots is against topgg ToS
So can you give me an code which get this data?
I'v tried a lot but it not gives me anything
and where I can find api ?
If you can’t find the API, I’d imagine your claim of “trying a lot” of things isn’t true :p
So can I do this with webhook token?
...you dont need a token for any of those requests
So for example can I get this all data for your bot?
all that's listed there
using Microsoft.JSInterop;
namespace Testing;
// This class provides an example of how JavaScript functionality can be wrapped
// in a .NET class for easy consumption. The associated JavaScript module is
// loaded on demand when first needed.
//
// This class can be registered as scoped DI service and then injected into Blazor
// components for use.
public class ExampleJsInterop : IAsyncDisposable
{
private readonly Lazy<Task<IJSObjectReference>> moduleTask;
public ExampleJsInterop(IJSRuntime jsRuntime)
{
moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
"import", "./_content/Testing/exampleJsInterop.js").AsTask());
}
public async ValueTask<string> Prompt(string message)
{
var module = await moduleTask.Value;
return await module.InvokeAsync<string>("showPrompt", message);
}
public async ValueTask DisposeAsync()
{
if (moduleTask.IsValueCreated)
{
var module = await moduleTask.Value;
await module.DisposeAsync();
}
}
}
So I saw this example code for wrapping IJSRuntime in a class, but I am wondering the practicality. I know in the top it says its for "easier" consumption and can be injected into the page with DI, but I am wondering why you'd need a class for this. Unless its to group up common interop methods together.
One message removed from a suspended account.
if u prefer a table
it's to group yeah, makes it easier to find the interop methods while also allowing instance reuse
So with api can I find all bots for example in music category?
@wheat mesa is it better now or still a lil generic/template like?
no, you can only find by either ID or name actually idk, the docs arent very clear in what you can search for
what are you even trying to do?
lmao same thought, the endpoint is search, but there's no query to search. just filters and pagination
maybe veld will fix it on the new topgg later?
https://bottom.gg/ this?
Cloud Server in New York $5.72 USD
Shared Intel Xeon CPU vCores: 4
RAM DDR4 ECC Registered (GB): 12
Primary High Availability SSD Storage (GB): 96
Guaranteed Internet Traffic: 20 TB
IP Addresses: 1
is that good chat?
What xeon? could be a 15 year old cpu. could be a brand new cpu.
Pentium II Xeon 400
no that sounds dodgy
12gb ram for $5 a month ??
Honestly not a huge loss if it does suck. Just $5
Can always write a review somewhere
Contabo support sucks. Their uptime is subpar, but their machines are pretty good
Good for not uptime sensitive apps
One message removed from a suspended account.
One message removed from a suspended account.
if you want a real cheap VPS
{
"url": "https://clients.desivps.com/cart.php?a=add&pid=127",
"title": "Unmetered 4GB Christmas Sale",
"specs": "4 CPU Cores\n4096 MB DDR3 RAM\n80 GB SSD Storage\nUnmetered Bandwidth\n1000Mbps Port\n1 Dedicated IPv4 Address\nVirtualizor Control Panel\nKVM Virtualization\nLinux OS Choices\n10Gbps DDoS Protection Now Included Free\nGFW Protection Up to 1 IP Change Per Month!",
"price": "Annually:\n$39.99 USD"
}
i've been using it for over 2 years now not the best but pretty cheap
Too bad that for 99% of people here this is overkill
yeah
Agreed
hello, any idea how js if ( (adults.textContent == 0 && children.textContent == 0) || (!adults.textContent && !children.textContent) ) { console.log('adults' + adults + ' children ' + children.textContent); formTitle.textContent = 'Double check your details are correct'; formSubTitle.textContent = 'Table for 0?'; } doesn't pick up the if there are any children/adults booked
when I console.log(adults)
adults.textContent.size()
or length, I dont remember every lang uses a different word
better yet, do if (adults.textContent.size() + children.textContent.size() == 0)
i dont think thats it
because its not even picking anything up
it should log as
i will send a codepen
Sus for the price
cpu steal more than 1 /j 
wth, next ui is now rebranding to hero ui 💀
i thought i entered a troll domain/wrong library
idk they were saying it is an offer, now it is gone. But I bought it. it is just 5$ /mo for these features lol
this is the cpu, I don't have any idea if it is good or not.
4 cores with 1 t/c at 2.10 GHz is quite bad
dang that’s good
<Dropdown ActivatorText="World">
<DropdownItem>Hello</DropdownItem>
</Dropdown>
I made a custom component in my blazor app
@inject IJSRuntime JsRuntime;
<div class="dropdown">
@if(!string.IsNullOrEmpty(ActivatorText))
{
<button class="dropdown-button select-none" type="button" @onclick="ToggleDropdown">@ActivatorText</button>
}
@if (_hasDropdownItems)
{
<div class="dropdown-content">
<CascadingValue Value="@this">
@ChildContent
</CascadingValue>
</div>
}
</div>
@code {
[Parameter] public string? ActivatorText { get; set; }
[Parameter] public required RenderFragment ChildContent { get; set; }
private bool _hasDropdownItems;
private async Task ToggleDropdown()
{
Console.WriteLine("I Work");
await JsRuntime.InvokeVoidAsync("showMenu");
}
public void RegisterDropdownItem()
{
Console.WriteLine("DropdownItem added");
_hasDropdownItems = true;
StateHasChanged();
}
}
<div class="dropdown-link">
@ChildContent
</div>
@code {
[CascadingParameter] public Dropdown? Parent { get; set; }
[Parameter] public required RenderFragment ChildContent { get; set; }
protected override void OnInitialized()
{
Parent?.RegisterDropdownItem();
}
}
Seems like DropdownItem is never rendered, as RegisterDropdownItem is never called.
I have never made a component that takes in child components, so I am new to this
not to mention im using IJSRuntime for the first time, which also doesn't appear to be working

Nice yea creating your own blaxor components is a whole other experience
oh wowzers
should i move my entire codebase into an npm module?
if you question it, probably not
ive been using turbo repo for my js projects
How do bot developers do "local" / server-based leaderboards?
For context, I have many users who want server-level leaderboards so that they can compete amongst themselves.
I don't track guild information at all in my schema. The only options I see:
- List all members in a server + get them all from the database (ouch, seems impractical / resource heavy / bad use of rates)
- Create a "click now" leaderboard thing where players can initiate their own blank leaderboard and ask people in their server to "click" it to add their score (seems weird, most wouldn't like having to do this)
- Use the
Application Authorizedwebhook, but it doesn't send events when the bot is removed ... and somehow track it then? - The first player that looks at a server leaderboard is the official one to "initiate" it ... then, after some time, the leaderboard backfills as people continuously play? This seems like the quickest solution, but would put major operational burden on my application.
I'm using DynamoDB (NoSQL) + Redis for leaderboards / cache
save user's progress on each guild, then get top x user by guild for local, and get top x user by summing each user's progress using group in sql then order it. that'd be my way
Is there something I'm missing here?
Got it. So you're saying that you wouldn't necessarily track a "total", but you'd get it via the sum of all the guilds / progress in them they used?
For performance, you'd likely have to create an index ... but yeah that checks out
I personally just get a list of all users in the guild then do a query where userid is in that array
My bots not used by any huge servers so idk if there will be problems eventually
cursed
yes, for example:
SELECT
userid,
SUM(progress) AS total_progress
FROM
table_name
GROUP BY
userid
ORDER BY
total_value DESC;
Yeah, that makes sense. Too bad I'm using NoSQL lmao
i see
It doesn't have this capability though – I'd have to scheme (pun intended) around it
It's super cheap at scale – it can handle millions of concurrent read/writes still at < $10.00 if your schema is solid.
whoa, that's cheap
Only if you're schema is good though / you use it appropriately
But I guess the same can be said for SQL
- 0 overhead
- 0 infra maintenance
- Point in time recovery enabled as an option
- Can "stream" updates to be processed
- Will likely remain free for the first 12 month I use it
- No need to worry about read replicas / performance in that sense
But it comes at a cost:
- You need to know your access patterns ahead of time
- Your data looks like damn machine code
- You'll have to duplicate data a ton for certain paradigms
I use Redis as my leaderboard to reduce hot partitions for example.
But for use-cases like this, I may just simply opt-out because I won't have the technical ability to do so without substantial rewriting.
Wouldn't this be its own dataset?
IE, this should be separate table in your database anyway
Its not ideal, but when you already have a product and youre adding a feature like this its common to make this its own dataset.
There are many considerations to take into account for this in DynamoDB. Yes, it would be its own access pattern – but would require me to store it for that.
I'd likely have to spin up a separate database just for this if I'm being honest.
A smallish SQL one
was going to suggest mat views, but ur nosql
they're pretty decent for stuff like leaderboards where you can afford to update only a few times per day
I could do a hybrid 🤷♂️. I can stream events from my DynamoDB table to populate data somewhere else. I can pass along the guild information ... but would be meh to handle
I mean, if it serves anything postgres supports http requests
it also has cron
actually, couldn't u just store in a file?
dump the dynamo resultset into a file and only ever read from it
update said file once in a few hours
Sore what to a file?
query the data from the db -> format and order it as you wish -> dump that to a file using csv or smth -> read from that file whenever you'd show the data
basically a cache
My problem is the first: I don't have an access pattern to query by guild from the data
I only store a couple of things:
- players
- groups
- group invites
- group members
haha
It's whatever at this point ... I may create a "compare" feature where people can see their rank amount up to 5 other people selected or something
do you have any caching of guild members enabled at the discord library level?
Negative – I'm purely HTTP interaction using discord types
Seems like a lot of memory to take on too, haha
do you have the GUILD_MEMBERS intent enabled?
if not, then you can use the guild member search endpoint and have the users search for the people to compare with by username, restricted within the guild
I was likely just going to use the User Select dropdown menu – which handles that for me?
if you use interactions, you can use the autocomplete feature to display a list of members as they type
Yep, pure interactions for me
yeah you can also do a user select by mention
Thanks for your help! I still remember your work back in the day on discordjs light
Was helpful then – I saw it got added to discordjs. Well done.
hahaha thanks, it didnt really get added, but they did change a few things once people started complaining about resource usage
they changed way too many things in djs14 so i stopped updating it
going libless is so much better anyway
Agreed – just using types at a minimum is nice.
nah, I'd rather own the libs
My application does everything within the 3 seconds, so I don't even need to callback into discord for anything. It's pretty nice.
HTTP -> API -> return JSON
thats nice except when the api shits on you for no reason
sometimes the interactions arrives after the 3 seconds already passed and you cant to anything about it
sometimes they refuse the callback until after the 3 seconds pass
it happens to me randomly lol
How long should take for intent apply to get reviewed by discord?
there's no shot they'll charge you less than 10$ if you do a million concurrent reads or writes
Monthly write cost (Monthly): $1,642,500.00
Monthly read cost (Monthly): $164,250.00
if you actually want to run the db for a month with a million concurrent read and writes 😭
damn, 1.6m
I wonder how many times these serverless providers get a huge tax break from writing things off as a “loss” bc the customer didn’t pay
wait, if it's 1.6m for 1m writes, doesn't that make it $1.64 per row?
its 1m concurrent requests for a month
so you would actually do like
a gazillion requests over the span of a month
no actual gazillion
1m concurrent means they all run at the same time, not per day 
tbf it's still a cheap service with that pricing
Ah shit - I didn’t mean concurrent … and I still got the calc wrong anyways lol
1m req is less than 10$ yea
I meant millions per day
ahh kk
fair enough then
To support millions of requests per day on a SQL workload (obviously a lot of details are needed), but what would likely be the minimum compute for basic transactions?
Or is that just so broad of a question that it’s unanswerable?
me with cloudflare d1
i got billed $50 this week because my db suddenly got loads of new data in
now i selfhost sqllite DB and ported the worker code into standard js
plus i do hourly backups of the db so it doesn't matter if anything happens
real
im making a full website for my school project (even tho i don't actually need anything more than a prototype)
Using DynamoDB with 12 concurrent reads / writes every second with data less than 1 kb - that’s over 1,000,000 writes / 1,000,000 reads per day
We’re talking $10/total monthly

i'd still selfhost your own sql tbh
much cheaper
by far
and if you scale, theyre your limitation
depends
You sure it’s worth the maintenance costs?
sounds like he solved scale
yeah
as long as you backup data imo you'll be fine
selfhosted ftw
until it goes down
Idk about all that - it comes at a cost lol
and u spend 4 hours re-creating your sql server vm lol
Yep
you run them on redundancy mode?
yes
nice
found it
redundency mode over different datacenters is insane
even if the master goes down, the 2nd db in eu can be repromoted to master
thats what i do with my own microservice for a project of mine
i have the essential worker nodes running on 4 different servers in different datacenters with different providers 
that's some real overengineering
well if its receiving millions of requests a day
At a minimum, I’d want a managed RDS solution - which would already cost me $15/mon upfront .. for the lowest tier
nah Ive gotten sick of cloudflare d1, and all other cloud sql solutions sucked
one node used to crash on me and i'd have to wake up at stupid oclock to fix it, now it auto does it
so I just decided on this setup
what's the point of all the replication you're wasting on
keep ur db centralized
and a lot of the cost is offset by cloud providers liking me becauae of what the project is
i dont pay for cf load balancing with 4 nodes
i dont pay for 3/4 machines

the server: on fire
the mirrors: inexistent
the backup: on the server
the mood: in shambles
if i was to pay it would only be $15/month
$12/mon for 100 reads/writes per second for dynamo db
the testing: in production
That’s like 8m requests per day read / write … for $12
oh yes
thats the most important part
need to test the infra yknow
I do sacrifice queryability though
lol
lol
your queries are indeed cursed
wdym this totally isnt cursed https://github.com/mcjars/api/blob/main/src/api/routes/global/v2/build.ts#L42
totally not cursed
thats still 18 fucking tabs in one line
ssd: I'͟d l̴͘i̷͟k͜e̸ ͢t̷͝o̶͞ ̷͘i̷͠n̴͜͝t̷roduc̸̡͝e̷̛͜ y̸͞͡o̷͜͝u to c͟o̵̡͞r̶rupt̡͟i̷on
every day i work on my project i have to relearn it
in order to remember what i was doing
thats why its still unreleased after 5 years
everytime theres an issue with my query I sink 5k€ deeper into therapy costs
Analysis paralysis eh?
Just release it.. screw it. Get initial feedback and improve from there
dont get me started on therapy
i just started doing therapy 2 weeks ago lmao
but for other reasons, not coding reasons
Greeting devs, does some know if past two days without a response from discord for my Intent application is it normal to take that time?
no idea, but back in my time applications used to take up to 4 weeks lol
but afaik recently they are much more automated
i dont know what is the average waiting time, but consireding intents require human review, im guessing around a week or two
I've send for now three intent applications, two got denied and it was like 15 minutes to get a response and now on the third time its getting two days?
Maybe could be that
may my code be cursed for all eternity
I'll wait then
omg
noob dev: uh cool code
pro dev: what the fuck
me: funny colors
i aint reading all that
i just read the first two lines and wanted to puke
if i were to do it, it would take me 2 months
i have the disadvantage of being bored in life
so i do nothing but procrastinate
but im doing therapy now and my therapist is kicking my ass and making me do things
I have the disadvantage
On the flip side, I see this as an advantage 🙂
I have the opposite problem: I'm so busy that all I crave is being able to be bored.
this
lmao wtf
You made development ^-^
Approved
are we allowed to talk about ideas for monetizing our bots here?
I dont see why not.
my bot has an entitlement sku thingy and i'd want to go over the current offering and see if too many features are free or too many locked behind the paywall. but that might be advertising
tbh, if anyone on the mod team gives you a warning for that... I'll take the warning too ^-^
What is the best way to deal with time in python/discord.py? I use datetime but I'm trying to do a check that would prevent a user from accessing certain data they created until 1 hour goes by.
Was hoping there was like a unit thing that was in seconds that can be used subtract the values from each other and then when time is displayed, it can be converted to normal time with date and all that.
from datetime import datetime, date, timedelta
# Get current date and time
now = datetime.now()
print(now)
tomorrow = now + timedelta(days=1)
next_week = now + timedelta(weeks=1)
print(tomorrow)
print(next_week)
I can work with that... maybe. I'll do some tests.
Okay, I'm stuck again. The dates spit out looking like this
2025-01-23 21:34:23.214854
2025-01-23 22:34:23.214854
and like how would you go about doing a check to make sure one hour or whatever has went by? You can't subtract those two default dates from each other.
from datetime import datetime
date_string = "2025-01-23 21:34:23.214854"
date_obj = datetime.strptime(date_string, '%Y-%m-%d %H:%M:%S.%f')
print(date_obj)
@client.command()
async def time(ctx):
date_string = "2025-01-23 21:34:23.214854"
date_obj = datetime.strptime(date_string, '%Y-%m-%d %H:%M:%S.%f')
current = datetime.now()
difference = current - date_obj
print(type(difference))
await ctx.send(difference)
houred = "01:00:00.0"
date_obj2 = datetime.strptime(houred, '%H:%M:%S.%f')
if difference >= date_obj2:
print("TrueA")
else:
print("FalseA")
This what I been experimenting with. Not even tested this out yet.
TypeError: '>=' not supported between instances of 'datetime.timedelta' and 'datetime.datetime'
I got it!
@client.command()
async def time(ctx):
date_string = "2025-01-23 21:34:23.214854"
date_obj = datetime.strptime(date_string, '%Y-%m-%d %H:%M:%S.%f')
date_obj2 = date_obj + timedelta(hours=1)
current = datetime.now()
if current >= date_obj2:
print("TrueA")
else:
print("FalseA")
I had to think about it differently.
what is the date_string for?
what are you trying to achieve with the time command
It serves no purpose. I kept it there to show me how to turn a date and time into a date type object instead of a str type object.
1: The users date and time is recorded plus other data.
2: User can not see their data until one hour goes by. <-- Basically trying to get this to happen.
you could use a more object-free version by using the time module:```py
import time
current_timestamp = time.time()
next_hour = current_timestamp + 3600
if time.time() >= next_hour:
print('true')
else:
print('false')
saves a lot of overhead
But can that be converted and shown as a date and time?
yes
Well, I will definitely look into that. Definitely looks simplified.
from datetime import datetime
dt = datetime.fromtimestamp(time.time())
Did you just shortened that long mess into only 2 letters?
what do you mean by two letters?
i recommend you using datetime only if you want to format your timestamp to a readable string
from datetime import timedelta
timedelta is a neat package too
epoch timestamps have much more flexibility than objects yeah
every time I have to edit my blender 3D python scripts, I'm reminded how much I dislike py syntax
unbased
python syntax is peak
Python syntax is horrific and should be brought behind a shed to be shot
rare waffle L
hot take but python syntax is simplistic yet beautiful
i love their use of indentation
you should have no problem with indentation unless you code in like notepad
Common null win
I absolutely despise the lack of brackets and parentheses
Whitespace controlling scope is a terrifying idea
Would be but atleast if you are in uni group project
atleast the project is gonna be readable
few semester ago... my teamate code is a hot mess
some function are one liner
Set up a linter
it's just a turing-complete yaml
i am a huge } hater
i hate ```
}
}
}
}
}
}
(for python) ```
🤢
If your scope is that deeply nested, you have some other issues to solve :p
well actually you don't need any line 🤓☝️
byethon
hello how to put your site here on our bot's page?
thx
Strong yes! I seen the other ones that uses brackets. Looks awful on the eyes.
That looks so bad.
My SQL looks like this but its joins ;p
join join join
I'm a time traveler.
https://i.imgur.com/fPbiwPZ.png
In a programming language, where is something like string templating done? Right now I have my lexer done and am working on finishing my parser, and I just got strings done, and was wondering does it happen here, or does it happen in the interpreter? I assume interpreter to make sure the variable used is valid but I am unsure
and to add onto that, is the interpreter also where duplicate variable errors are thrown
or object key errors and such
I find it frustratingly hard to understand where a scope is in the grand scheme of things without scrolling up as my brain is way more trained to recognize closing braces in literally every other language I worked with
This happens as a part of expression evaluation. Templating usually accepts a statement, and therefore it cannot be processed at the Lexing or parsing step in most cases. The closest you can get to doing it ahead of time is if the entire expression can be optimized by constant folding
Duplicate variable errors are generally thrown in the semantic analysis phase, which is done after parsing. It’s “optional”, but highly recommended to detect semantic errors before running any code
ohh so it's the interpreter or am i missing a step
I thought it went
source -> lexer -> parser -> interpreter
Interpreter
would this be something I just throw after that parser which looks through though the AST for duplicates?
There is usually more steps between parsing and interpreting
I've been trying to read about top descent recursive parsers(or whatever the name is) all day, but am still slightly confused on a lot of what the articles i've read mean
Yes, there is usually a semantic analysis phase where you look at the AST for typechecking, making sure variable names exist, checking scope, etc.
Recursive descent parsers?
Recursive descent is a top down parser
There are bottom up parsers but those are usually more complex to roll by hand
I had already dealt with top down in the past that's why I was going to stick with it
There’s a whole bunch of theory behind it, but basically you have sets of “terminals” and “nonterminals”
Terminals being literals that are the simplest form of a syntactic structure
Nonterminals being collections of other nonterminals and/or terminals
Can you give an example?
Sure
In a video I watched that was mentioned but I could have sworn I saw him say ( for both terminal and non terminal
<Expression> ::= <Term> "+" <Expression> | <Term>
<Term> ::= <Factor> "*" <Term> | <Factor>
<Factor> ::= "(" <Expression> ")" | "number"
Expression, term, and factor are “nonterminals”
The symbols you see in quotes are terminals, e.g. literal symbols
ohh
But this is how you would formally define language grammars
Okay, so if I am not following that I don't technically have a Recursive descent parser
And it’s very useful to have this definition for recursive descent
That’s not necessarily true
parse(): Program {
const program: Program = {
kind: "Program",
start: 0,
end: this.column,
body: [],
};
while (this.not_eof()) {
program.body.push(this.parse_stmt());
}
return program;
}
private parse_stmt(): Stmt {
switch (this.at().type) {
case TokenType.DEF:
return this.parse_define();
default:
throw new Error(`Unexpected token type: ${this.at().type}`);
}
}
``` this is the "main" logic behind my parser rn(don't say anything about this being in typescript, i want to write it in a language i know well first)
The main issue with recursive descent is that it is incapable of parsing Left Recursive grammars, hence why many grammars avoid left recursion for this reason
This is recursive descent
It is also important to note the distinction between expressions and statements
Expressions return a value of some sort, statements are standalone units that “do” something (usually)
so a statements are variables, numbers, strings, expressions are functions?
No, numbers and strings are expressions. The value they “return” are themselves
Yes
Exactly
Think about it like this, if you can assign it to a variable, it’s an expression. If you can’t, it’s probably a statement
private parse_statement(): Statement {
switch (this.at().type) {
case TokenType.DEF:
return this.parse_define();
default:
throw new Error(`Unexpected token type: ${this.at().type}`);
}
}```
```ts
private parse_define(): Statement {
this.eat();
const identifier = this.expect(
TokenType.IDENTIFIER,
'Variable name expected following "define" statement.'
).value;
const value = this.parse_expression();
const declaration = {
kind: "DefineDeclaration",
value,
identifier,
} as DefineDeclaration;
return declaration;
}```
```ts
private parse_expression(): Expr {
switch (this.at().type) {
case TokenType.INTEGER:
case TokenType.FLOAT:
return this.parse_number();
case TokenType.STRING:
return this.parse_string();
default:
throw new Error(
`Unexpected token type in expression: ${this.at().type}`
);
}
}```
so then this logic goes with that
(i removed the error checking from the define just for the sake of sending in discord)
Seems about right
If you’d like to look at a language that handles ASTs very elegantly, I’d look into making your language in Rust. They have very powerful enums
Now i am just struggling about like booleans, because js let x = true; has a boolean value, but so does js let x = (y && z); I know that there are the left right and operator but I am not quite sure about how that should work, in relation to my current format
Yes, true is an expression and so is (y && z)
I want to eventually, but I don't know rust well enough, now I could spend time learning it then revisit this prokject but
True is a Literal, y && x is a BinaryExpr with a left value of a VariableGet an operator of AND and a right value of VariableGet
Also, I highly recommend reading Crafting Interpreters
It’s free and online
I have astexplorer.net open and see how javascript does it
I wouldn’t look at an existing language, since it might be a bit overwhelming
This is fair
Understand the fundamentals first by following along with crafting interpreters or another resource of your choice. Language grammar is a very theory heavy subject and there is a lot to learn
Start with something simple like a math expression parser
Try to get precedence working then maybe add more things like boolean logic expressions, etc
This is someone making a course out of the book ig
I’d recommend just reading the original book. It shows every line of code and explains things very nicely
Yes
That one
Awesome
Thank you
Just thinking about it though, for those boolean expressions, and for variables in general, do I just peek at what the character is, i.e [ I know it's an array and I handle the accordingly, or { I know it's an object and handle that accordingly, or " string but then parenthesis ( I handle because it could be boolean expression or math expression?
This is going to come down to how your grammar is defined. For the case of parenthesis, usually you peek if it’s a open parenthesis, then recursively parse the inner expression
A well planned grammar usually only needs one token of lookahead, though there may be cases where you need 2+
everytime I try and think about the parser my brain just melts, the lexer was easy, because it's like, i have variable parsing working def x = 5; parses but if i type just 5; or 5 it errors, now i know that's because I don't handle those yet but still
Your lexer should not care about if something is semantically correct. It should only care about parsing keywords and literals and identifiers etc into tokens
Lexing is entirely separate from parsing
5; should not error in your lexer
I meant from my parser
It should produce
[NUMBER(5), SEMI]
my lexer works great (for a little while it couldn't handle mutiline inputs, i was being stupid)
[
Token {
value: '5',
type: 0,
position: Position { line: 1, column: 1 }
},
Token {
value: ';',
type: 21,
position: Position { line: 1, column: 2 }
},
Token {
value: '',
type: 48,
position: Position { line: 1, column: 2 }
}
]```
for that of 5;
Also 5; should not error in your parser
That’s something that should error in the semantic analysis phase (or maybe not, depending on whether or not you want to allow that)
private parse_statement(): Statement {
switch (this.at().type) {
case TokenType.DEF:
return this.parse_define();
default:
throw new Error(`Unexpected token type: ${this.at().type}`);
}
}```
it errors because I only check variable creation rn
Parsing is transforming any valid grammar into a tree. Grammar does not necessarily mean that the actual meaning of the tree is valid, but rather that it abides by the defined grammar of the language
Here is a parser for basic math expressions I wrote in rust a long time ago: https://github.com/Jwaffled/math_parser_rs/blob/master/src/parser.rs
I remember you had one in C#
Hopefully it’s not too difficult to understand even if you don’t know rust
I do as well, I’ll send that
I've looked at the C# one before, when I made a math parser in the past
I highly recommend defining a formal grammar for your language before attempting to make the parser for it. It’s very difficult without it
No, the regular expression grammar for it
Similar to what you showed earlier?
ohh so for your math parser(rust) you assume there is always a operator and right term?
No, even a blank number should work (iirc)
how so?
Why is the capital version of my bots username unavailable wtf, it says add . or _, but lowercase is just fine
It is a baseline expression. A literal.
The “return” value of 5 is 5
Then i must be a bit lost in the logic
It helps to understand when you’ve defined the formal logic. An expression can be in many forms. A literal is an expression, a BinaryExpr is an expression that takes a left hand side Expression, an operator, and a right hand side Expression. A UnaryExpr is an expression, etc.
Well i see it parsing terms but i only see it parsing additive terms
orfactor terms
i don't see where it returns just a number
In which one? The rust one?
yes
Oh so you calllogic binary, which calls term, which calls factor, which calls power, which callsunary, which is where primary is called which has that
Yup
how does that work? like why do you call them in that order?
Precedence
how does that precedence translate to a normal language?
Primary has highest precedence (since obv you want to parse a literal before parsing the expression its a part of)
Unary next (e.g. 3 + -5 should return -2 and not an error)
Power next (3^2 + -5 should return 4)
Etc.
hmm
there's this language code im looking it ts switch (this.at().type) { case TokenType.Let: case TokenType.Const: return this.parse_var_declaration(); case TokenType.Fn: return this.parse_function_declaration(); case TokenType.If: return this.parse_if_statement(); case TokenType.For: return this.parse_for_statement(); case TokenType.NewLine: this.at(); return this.parse_stmt(); default: return this.parse_expr(); }
And now it makes way more sense
Yeah. You can have a stmt containing an expression
That's why rust enums are so nice for this, they can have inner values
Tagged unions are beautiful
private parse_expr(): Expr {
const data = this.parse_assignment_expr();
if (this.at().type == TokenType.Ternary) {
if (data.kind != "BinaryExpr" && data.kind != "Identifier") {
throw new Error(
"Expected BinaryExpr or Identifier following ternary expression."
);
}
this.eat();
const expr = this.parse_expr();
if (expr.kind != "BinaryExpr" || (expr as BinaryExpr).operator != "|") {
throw new Error(
'Bar ("|") expected following left side of ternary operator ("->").'
);
}
const ifStmt = {
kind: "IfStatement",
test: data,
body: [(expr as BinaryExpr).left],
alternate: [(expr as BinaryExpr).right],
} as IfStatement;
return {
kind: "CallExpr",
args: [],
caller: {
kind: "FunctionDeclaration",
parameters: [],
name: "<anonymous>",
body: [ifStmt],
} as FunctionDeclaration,
} as CallExpr;
}
return data;
}```
from that same code, that also explans this
and why it does it like that
Yes
This looks questionable in terms of quality though
Telling kind based on a string instead of enum
Kinda ugly
In rust you can do beautiful things like so
enum Expr {
Literal(LiteralValue)
BinaryExpr(Box<Expr>, BinOp, Box<Expr>)
UnaryExpr(UnaryOp, Box<Expr>)
// etc...
}
enum LiteralValue {
String(String)
Integer(i32)
Float(f32)
// etc...
}
enum BinOp {
Plus,
Minus,
Star,
Slash
}
enum UnaryOp {
Bang,
Negate
}
I was using it for help with the implementation of the parser
oh that is nice
Recursive enum definition makes ASTs super easy to type out
export enum TokenType {
INTEGER,
FLOAT,
STRING,
BOOLEAN,
IDENTIFIER,
DEF,
FN,
FOR,
WHILE,
IF,
ELSE,
ELSE_IF,
IMPORT,
GLOBAL,
LPAREN,
RPAREN,
LBRACKET,
RBRACKET,
LBRACE,
RBRACE,
COLON,
SEMICOLON,
COMMA,
ADD,
SUBTRACT,
MULTIPLY,
DIVIDE,
POWER,
MODULO,
EQUALS,
PLUS_EQUALS,
MINUS_EQUALS,
MULTIPLY_EQUALS,
DIVIDE_EQUALS,
GREATER,
LESS,
GREATER_EQUALS,
LESS_EQUALS,
AND,
OR,
DOT,
RANGE,
ARROW,
RETURN,
COMPARE_EQUALS,
NOT_EQUALS,
UNKNOWN,
NEWLINE,
EOF,
}```
I have this lmao
And you can do things like so: ```rs
match someExpression {
BinaryExpr(lhs, op, rhs) => interpret_binary(lhs, op, rhs)
// ...
}
that's nice
yeah it's really nice
rust my beloved

heck yeah thanks rider for not letting me know that "Apply Changes" button i pressed didn't actually hot reload the program, so what i did for the past 15 minutes has no effect at all
just implement an interpret trait for token?
ehh I guess you still have to match inside
nvm I guess
I'm writing a book on making a compiler and I talk about BNF (the way to formally define grammars) and about lexical analysis and parser combinators if you're interested I can send you a draft
I would love thet
traits or something idk
i have yet to make my first trait in rust
i see lang dev talk up there 😈
second this notion but with any language that has unions in general
if you know typescript you can achieve much the same
dont think ive encountered a use case yet where they would be helpful
ive come from c/c++ so i usually write my code around the cool new features languages have lol
also prefer as little runtime supported features as possible
I'm gonna be honest, then you've probably not written much rust code
you can write a lot of code without ever needing to use traits
just like you can write a lot of code without ever needing inheritance
I try to avoid writing traits most of the time. I find that writing code with traits leads me down a questionable path of trying to implement polymorphism in rust, which is not something rust excels at
the only rust code ive written is a serious full stack app that im still working on but thats about it lmao
the only traits i really use are derived ones from libraries or whatever like debug, serde, etc
this just looks like templating in c++
another feature i dont use often, only for things like implementing hashmaps from scratch though where you want to be able to take in strings, ints, complex types etc without copy and pasting for each different type
hmmm
wat
It's a normal thing, people often bypass bot limits per server this way
@shell echo prefix
Hate it when bot gives like 3 command limit a day per server... So annoying to test it
Why do they do that at all???
I would instantly kick the bot and never use it again lmao
Probably limits related to a free API or something
At this point dont make it public.
i doubt
it was a normal kick/ban/mute
💀
wants u to pay premium

for kick/mute/ban??
most of the time i tested those kind of bot, its server id locked
Core command, most of the cmd is just avarage multipurpose
lmfao
All my bots are free2use unless some Premium features (High detailed AI Image generation etc)
so freemium?
yes
Free users have no limits on free features, but they are limited in that they cannot access the best AI image generation models.
oof
my bot only limits to now 6 different blusky account per server why would someone need 48 bluesky account LOL
i know why would anyone want it
like for example csgo server
and they want to get notif from alot of streammer/profile
or maybe each country has each accounta like valorant
maybe
also why create 8 servers to add the bot to instead of asking bot owner if there's a way LOL
PS C:\Users\dyeaa\Dev\Mercatus> npx tailwindcss
npm error could not determine executable to run
wtf does this mean
Does npx not install it if it doesn't exist
probably npm corruptrd install i'd assume
I only use npm for tailwind
so I somehow doubt that unless they pushed a bad update
or the package name could wrong idk never got that error
I'd check but cat is laying on me lol
I see
so v4 is different now apparently
No longer do you use a tailwindcss.config.js file
Which sucks for me
.btn {
@apply border-solid border-2 border-gray-200;
}
Seems like the resulting css is empty
Is this not how you apply tailwind attributes to a css class?
just to make sure, you indeed imported the tailwind right?
@tailwind base;
@tailwind components;
@tailwind utilities;
``` because that apply should work
I guess because I wasn't using it in the file that used the tailwind directives it wont
Are the css utilities shipped with mudblazor insufficient or why do you use tailwind for the styling? 
Hi
at this point just write normal css 😭 🙏
.btn {
border: solid; border-width: 2; border-color: gray;
}
lmao
or even better
.btn {
border: 2px solid gray;
}
although id argue first is more readable
On fucking god
eventually tailwind will go a full circle and become css again
idk how it got through here but got blocked in all the other channels 

This channel lives its own life. The whole world has forgotten about its existence 
welcome to where the magic happens
aka you run javascript and hope for the best?
ive been coding my project for months now and havent run it a single time yet

Schrödinger's code type shit
Had a PR at work with 174 changed files, I feel bad for my lead who had to review it
lmao
👀 I have 89 right now. and I feel bad about it.
Thankfully its just my own project.
but... just commit often and squash when you're ready to merge
nah
What if there's a problem and you lose everything because you didn't commit?
then I would be concerned since everything is backed up 5 times
but why go through the pain of restoring that data if you can just commit instead
too much creativity needed for commit names
don't bother
if it's a personal project just go with "idk whatever idc"
sadly its not personal
Helps to rollback commits too or git bisect






Much better