#development
1 messages · Page 164 of 1
yes
but it's giving a major error
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration[0].node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration[0].node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration[0].node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration[0].node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration[0].node has an unknown property 'dns'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration[0].node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
- configuration[1].node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration[1].node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.```
with this and (cuz lint)
const nextConfig = {
webpack: (config) => {
config.node = {
fs: "empty",
child_process: "empty",
net: "empty",
dns: "empty",
tls: "empty",
};
return config;
},
};
export default nextConfig;```
i am not sure then sadly
dont be sad 😃
While working on NFT Art Generator I needed to run long running tasks from a Next.js API. Knowing my tasks could run for hours and with the…
my first mistake when doing everything is that i did the child process/api request in a component
checking if it'll work inside a page (where it is now with an api request)
how do I prevent 3.4 turning into 34 with discord number inputs?
Discord doesn't turn floating point numbers into integers, what's your code?
it turns out , works fine, is that based on client language or default?
its just a discord js option get
man I am so sick of these blockchain devs trying to find another pump and dump to get paid to make
They are very legit tho!
Definitely not strange how each one has the same skills, years of experience and ad message
yeah it's like as if they came from the same guy or something
No never
5xx error is a website side error, so yes
@languid isle no ads
With modals with a timeouit filter, if someone clicks the "Cancel" button on a modal form, how would I resolve the timeout still happening?
const modalResponse = await interaction.awaitModalSubmit({
filter: (i) =>
i.user.id === interaction.user.id,
time: 300000,
}).catch(async error => {
return modalResponse.reply({
embeds: [
await client.errorEmbed(`Form timed out due to taking too long...`)
],
ephemeral: true
})
})
I thought modalResponse would work but it doesn't because it isn't initzialsed yet. Interaction already gets replied if I do that and editReply says unknown message
I can do interaction.channel.send() but I want the message to be ephemeral to the command user
It's strange too that if I do happen to directly send a message to a user when it times out, the follow function doesn't exist
if(modalResponse.isModalSubmit()) {
//do stuff is user submits the form
//function doesn't exist though if the form times out
//wrapping it in a try catch fixes it
}
Kinda janky.
what does the function look like/how are you running it?
anyone know if there an api that provides data on an albums AEU
Once the timeout is over it'll throw an error, if you want to respond to that with a message like "timed out", you need to send a follow-up to the original interaction
For example:
const modalInteraction = await interaction
.awaitModalSubmit({ ... })
.catch(() => null);
// Timed out
if (modalInteraction === null) {
await interaction.followUp({
content: 'Timed out.',
ephemeral: true
});
return;
}
// Continue normally
does anyone know
Album-Equivalent Unit?
yes
i want to see data for albums
That depends on what platform the album is hosted on
I'd recommend that you read this
The album-equivalent unit, or album equivalent, is a measurement unit in music industry to define the consumption of music that equals the purchase of one album copy. This consumption includes streaming and song downloads in addition to traditional album sales. The album-equivalent unit was introduced in the mid-2010s as an answer to the drop of...
Ah followup, I forgot that was even a method.
bro
i want an api that will provide me the data
what does that wikipedia article have to do with the question
I need to know where the album(s) you want to get the data of are hosted to suggest an API for it
And the article tells you how it works, so you might be able to figure out yourself, not so complex
...
😐
any album
in existence
of albums
me with college photo album:
Man assumes we think all albums are hosted on only spotify or sum
???
Do you even know what you're or what you're asking for?
yes
i do
do you
How's an API supposed to magically get the data of every album and show you the AEU?
It needs to know where it's hosted, contact the platform, get streams count, then calculate it
Do you understand how that works now?
why would it need to contact the platform
...
To get the streams count?
you don't need to count the service to do that
if you don't know one just say that pls
I'd recommend that you read the article on how AEU works and then back
You do realise a "Stream" of an album exsists on a platform?
i know how AEU work
You clearly don't, if you do, tell us how it's calculated
☝️
I'm asking you, let's see if you actually know
yes
it's right there
i replied to it
Yeah so you don't know, if you actually know how it works you would just say it, go ahead
❓
what are you yapping about
You said you know how AEU works, but refuse to tell us how, and instead reply pointing to the link I sent on how it works trying to teach you
yes
Why does this bring me back battless vibes
because it's literally in the embedded image
as the old saying goes: "You cannot win in chess against a pidgeon - they'll knock the pieces, shit on the board and strut around like they won it"
(It's Battleless)
(it's not i have no idea who battleless is)
what
?
yes mr. pidg- I mean, battle
???
This is entertaining
Bored af sitting in discrete math class rn
Professor can’t explain the subject for shit so this is the best I’ve got
👀
notes are the best for account tracking ^-^
i'm not battleless
no one here has proof of me being this random person
i asked a simple question and am being asked these random questions. if you know a service, please provide the link. if you don't, you don't need to answer 😐
exactly
i'm not him
you don't need to go searching for messages
You are the same person, but supposedly "changed"
ok but i'm not battleless
same shit different bathroom
One message removed from a suspended account.
?
One message removed from a suspended account.
One message removed from a suspended account.
yes
One message removed from a suspended account.
Okay so back to teaching you
Mr. dondathedon, so let me ask you, what do you need to calculate an AEU? Stream count is that correct?
One message removed from a suspended account.
kuuhaku discovering inspect element 😱
@earnest phoenix please read this
if you don't know move on
cant prove it 
very easily provable but
You don't even know what you want, answer my question
🤷
Voltrex you are blocked
I need to start blocking you guys
please
if anyone else knows you can ping me
Oh no! Being blocked by beyond the mind!? This is not fair! How can I live with this??
One message removed from a suspended account.

If hes going to block everyone guess he wont get his answered den 🤣
One message removed from a suspended account.
One message removed from a suspended account.
of course 😛
I don't plan on blocking everyone
I see, so you only wish to block the people are are like the top developers in this discord and only want to be spoonfed since I guess you don't know what google is, got ittttttttt
does it look like I care about Voltrex's developer status
Like a year ago, I am one of the highest members in the entire consortium, might even be elected as a TAG (Technical Architecture Group) member, highest of all
One message removed from a suspended account.
Do you have a full-time job

Yes
Do you do voluntary work like nodejs and w3 in your free time
Yes
All of these are voluntary work, foundation of almost all software and such are built voluntarily
And even though it is all voluntary, we maintainers and high status people have very important and draining responsibilities to make it all better and keep them on track, to also hold our titles
Oh Node 16 reached EOL today
Is there a way to edit this status with the bot? I just saw was released with few days ago and it's still in Beta
I don't think it's documented in the api docs yet
I was also not able to find something about it, but i just said to ask, maybe there is a change 😄
Unlikely while it's being rolled out
Thank you guys
Yep, and we'll mark Node.js v20 as LTS on October 24th (may vary by a few days depending if there are major things that needs to change) this year
god damn my bot is still running on nodejs 14 lmao
Damn
One message removed from a suspended account.
Lack of cognitive opportunities
unoptimised brain function
One message removed from a suspended account.
I've no clue what runtime my bot is using ngl
like the version or the runtime 
Sure, let me just channel my telekinetic abilities and transform myself into your mind
@lyric mountain how do you recommend structuring a flutter app? Should I have like a pages folder for each different page or something like that?
In short: how about you explain your issue
nobody can help you when you don't explain your issue
Do you even have like an error message?
No
It's just not playing
When use command play and use it
It join but it's not playing
Damn
Still can't do much with that info
How about you describe what you have programmed, tell us how you think it's supposed to work etc
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Oh hell yes, I use telekinesis
My skills are way above your capacity of understanding
I know what they're about to say before they ask
You should use that
i was gonna ask for help here but i forgot what i was gonna ask
Whom u talking to me or other?
To you
💀
dude we are very obviously talking to you
you're the only one who asked an incomplete question in here

My bot not playing song if i use command it's just join vc and say playing (song)
Idk why
Is this happening
and yet you still have not provided us with any useful info
No sound come from bot
🥹
There is no usefull information that can help us help you
🥹
What kind of information i say u?
you didn't provide any code, no errors, no information on what you're using to play music, no information on literally anything other than "My bot doesn't work, why?"
You see why that's not useful right?
Nothing is happening just it's not making any sound of song
Can you read my message in its entirety before responding
That is the type of information that does us no good
Hmm
Waffle, do you not have the recent patch? You can look into people's minds now
Oh shit it's out already?

My internet is pretty slow, this is a 12tb patch

Gonna be a few weeks
One message removed from a suspended account.
One message removed from a suspended account.
you could for example send part of your bot code to let us try debug
or send how your code expected to work and how it work rn
or an error code
or there is more option to send then "My bot dosent work, it dosent play music"
One message removed from a suspended account.
One message removed from a suspended account.
Sadly my patch is still updating
Delate the whole thing and click "save"
Okay so in regards to no sound for music, it's all dependent on the library being used. A common fix is related to ffmpeg and how its installed. This is Distubes FAQ
https://scs.twilightgamez.net/xYfHG.png
I like to use the classic MVC structure
...which I also use for any project I make tbh
I see
I think I can figure out the structure
As long as I'm not getting this stupid fucking "bottom overflowed by infinity pixels" issue
whatever floats your boat works, just dont tuck everything in one file 
ah, that's cuz containers in flutter dont inherently have a scroll bar
well I'm just confused because it's not like I have a lot of content on the page
there's a flutter inspector to the left, if ur using intellij
I'm just trying to set it up so the app has a persistent navbar and then each page displays on a different tab, all I have is a text element in those pages
using android studio
ah, that's cuz ur using either column or row
Yeah I'm using column
those two are annoying to make work, as they require a parent that has a bounded dimension in the main axis
I just threw in my pages to where the example code used to be
Since it seemed to work for them just fine
so a column must exist inside a container with constrained height, for example
if u want to make it scrollable put inside a SingleChildScrollView
return Scaffold(
bottomNavigationBar: NavigationBar(
onDestinationSelected: (int index) {
setState(() {
currentPageIndex = index;
});
},
indicatorColor: Theme.of(context).indicatorColor,
selectedIndex: currentPageIndex,
destinations: const <Widget> [
// 4 nav destinations
],
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const<Widget> [HomePage(), MenuPage(), RewardsPage(), MyOrderPage()][currentPageIndex]
],
),
),
);
btw, u dont need <Widget>
and u can exploit commas to force newline after elements
the issue there is that column is inside Center, which doesn't have a defined size
put it inside a SizedBox and set a height
I see, was there a reason it worked for the demo then?
demo from where?
some examples online are quite outdated
for example, u dont need int index either, just index
The generated "sample" when I start a flutter project with android studio
💀 u gone with studio
I mean it seems pretty much the same as intellij
it's a fork, as intellij is open-source
but it has some performance issues and lacks most features
I just went with studio because it was the easiest to follow on the tutorial area
Can I convert my current project to intellij or do I just have to suck it up and make a new one and copy paste my code
(I only have like 4 files so it's not a big deal if I need to)
u can just import the folder yeah, it'll recognize
just not the settings file probably
👍
u need something like this for columns/rows
any plugins I need to install other than the flutter plugin?
the moment u import the project it'll ask u to download android stuff
alr
optional, but it's good to have as you'll need an emulator anyway
speaking of which, it can be found here
or with double shift
so IDEA is the ide to use right
or am I meant to use something like webstorm for some reason
I think I'll start a new flutter project for simplicity's sake, then just copy paste what I have since it's not much
(also get codeglance plugin for sanity's sake)
flutter projects tend to get...tall
wait where on earth is the "view device" window?
also it keeps complaining that I'm missing android platform sdk 29 but it still runs just fine
that's probably because it detected the android folder as a module
u can click to download it to remove the warning and enable intellisense in those files
or u can just ignore it, wont matter unless u edit the android files directly
it apparently can't find the sdk at all
nvm got it to shut up
it found it after I dug around a little
I might be stupid or blind or both but I don't see that
nvm I found it
it was in the 3 dots
stupid intellij hiding things from me
the pains of a cleaner interface
How would I go about making custom widgets like so? I'm doing this but I can't seem to get anything to show on the main page: ```dart
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<StatefulWidget> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Text("Home"),
);
}
}
And then in the main "view": ```dart
return Scaffold(
bottomNavigationBar: NavigationBar(
onDestinationSelected: (index) {
setState(() {
currentPageIndex = index;
});
},
indicatorColor: Theme.of(context).indicatorColor,
selectedIndex: currentPageIndex,
destinations: const [
// 4 destinations
]
),
body: Center(
child: SingleChildScrollView(
child: const [
HomePage(),
MenuPage(),
RewardsPage(),
MyOrderPage(),
][currentPageIndex]),
),
);
Oh maybe it's actually an issue with the page view itself, it's saying it's caused by the _HomePageState widget
Yeah apparently Scaffold was not the way to do it
scaffold is basically the skeleton of the app, ur supposed to have only 1
👍 thank you for the advice
can anybody tell me real quick what are the correct permissions a Giveaway Manager role should have? is it just the Base permissions + Manage Messages?
My bot is playing song means its showing playing this this song but its not playing its lyrics in vc idk why
Pls help
What are you using to show the lyrics?
not to show playing
Like where are you getting the lyrics from?
No Buzy cant
Ok
found a solution, can delete the msg, ty
https://blog.jetbrains.com/rust/2023/09/13/introducing-rustrover-a-standalone-rust-ide-by-jetbrains/
@radiant kraken
@pale vessel i forgot you ^
Anyway to make it so user’s username’s underscores don’t make messages italic?
thats nice but too bad i dont use jetbrains
escape it
\_message\_
^
This is cool and all but I think Intellij was a little too late on this one
The only thing I can really see it being used for is easier use of a debugger
rust-analyzer is sometimes a pain to work with but I don't think whatever jetbrains uses is any better
oh apparently jetbrains also switched to rust-analyzer
it used to use RLS like the old rust VSC plugin
but apparently they used something proprietary for RustRover?

(not part of the included file either)
That skull emoji is metal
#[allow(non_snake_case)]
I shouldn't need to do that though, since it's lib-side (rust-analyzer's bug here)
'
hey, i have started my haskell journey and got some problems with understanding :
test :: (a, b) -> (b, a)
test (x,y) = (x,y)
suppose that my x,y are both Int's.. why would it matter?
cuz the first type inferring is about the actual type, while the function declaration is rather about the parameter values.
is it maybe because you else could do test ("test", 5)?
as i just remember haskell is statically typed.
Is there a good way to make a bunch of discord accounts to use for testing? I would need around 12 of them.
Time to make 12 emails and passwords. 😄
And you probably can't use temporary emails because you'll have to confirm with your phone number
Can anyone tell me why this is happening?
be aware you'll be put in discord watchlist
not really
internal server error (status 500) means the issue is on their side
Yeah but isn’t it weird it only happens to one bot when it’s an internal server error?
perhaps, but sometimes it does happen
keep an eye on discord status to see if anything pop there
But theres nothing I can do about it?
nope
I suppose this is the issue
i'm already on all the lists
yeah, i'm only allowed to roam the streets at night.
OwO scawwy
Zero need for a ping dude.
No bc u pinged me for zero reason. 🙄
I do but ok 🤷♂️ why would I help someone who keeps asking in multiple channels then randomly pings me or anyone?
If u wanna belive thay idk how then go right ahead it doesn't bother me what u think
cas i need help
Hey guys, im looking for a day tracker bot with a customized prompt that can be set with a prompt and a reminding schedule as well as a monthly report of all users with a tracker.
Example, User has gone 25 days without stalling.
Please mention me when responding
We're not going to hunt down a bot with very specific features for you my dude. This is #development not #findmeabot
Trying to find someone to develop it.
Ive already looked and haven’t found a bot that can perform the features im looking for.
well, getting someone to develop it is gonna cost money, otherwise youre gonna have to do it yourself
if you wanna try doing it, maybe we can help with some things if you run into trouble, but youre gonna have to do most of it by yourself
Why there are so many Unknown interaction errors these days?
Earlier it wasn't much, but it increased now 😔
has anyone here done anything with custom command logic in discord.py?
like how you would go about discord.js command/etc logic (all custom, not using provided methods of loading/invoking commands/cogs/etc)
ive been going deep on trying to implement my own logic, but d.py really doesnt like it when you try to get low-level with its internals and modify how it works, gotten as far as entirely custom cogs/commands/groupcommands
probably looks a bit wacky to any d.py devs, but i needed more than it could provide so im just seeing what i can do
no real clue why, but using my command/cog code literally halves my bots memory usage
think d.py is doing some funky things under the hood 
Same brother
Most "unknown interaction" errors result from the bot responding too slowly to the interaction. If the bot needs more than 3 seconds to respond, then the response must be deferred. Of course, this is the most popular one and that may not necessarily be the reason, but if something like this happens repeatedly, it should be looked into
🫂
traceback doesn't really have any useful info
the important part is the error message, which u apparently muted in the second image, and didn't include in the first image
can anyone help me regarding clerk and nextjs?
@lyric mountain how do you normally implement MVC? Do you just have like a controller instance variable in each widget/view that update state or something?
I just make an utility class for accessing the database, preferrably with a generic method that maps the query result to the supplied class
Anyone have a solution to mobile users being able to press send twice on slashcommands?
my friend was telling me about intellij bc a professor said we get a student license. Is it particularly any better than VSC, especially if I get copilot for vsc? I was trying out intellij and it doesn't seem all that great for remote file work (because it wants to resolve the fact that some methods are imported from files it doesn't see)
no it sucks
whacha mean?
i just went on my phone and pressed send twice and it did do an error
so is that what you're talking about
tbh i don’t see any reason to use webstorm over visual studio code
that's what I couldn't tell, like if intellij had some featrues I wasn't seeing making it worth the price
If I use one of my slash commands and I press send twice really quickly it does the command twice
well yeah
if (await canCommandRun(slashCommand, command, userProfile, banned, client)) {
command.run(slashCommand, userProfile);
setTimeout(() => {
client.cmdCooldowns.delete(slashCommand.member.user.id);
}, 1000);
client.cmdCooldowns.set(slashCommand.member.user.id, command.data.name);
}
Tried adding a cooldown between sending commands but doesn't work either
would a user be suprised if they pressed send twice and the command happened twice?
no
well, the issue is that it's an RPG bot
so users can use commands that are supposed to be on cooldown twice
wow
i'm guessing discordjs?
hmm does it not update the cooldown quick enough
yes
you can bypass the cooldown
no it doesn't
the cooldowns are saved to the user's profile
make the cooldown check 100% sync, using async in it will cause that
what method for handling the cooldown are you using atm?
alright
just use a combination of different timers and data services
its weird bc when I do it on my phone it just puts an error for both
but for you it responds to both of them?
not for me
interesting
if i click fast it registers 2 commands
if it's erroring two same messages twice then check code
same
ios?
yes
I wonder why mine is. lemme check
are you ios brady
android
Maybe it has to do with different discord versions?
oh now it did
I hate the ios one for slashcommands
let me see what happens with a command that uses energy on mine, now im curious
oop
no mine updates it for both
It did not work
hm
22 energy before, adventure uses 3 energy
well
if you want to make 100% sure
implement a queue and run each command one after another
why not have bot think
so that means u just gotta adjust it so it updates quicker ig?
but that would slow down stuff
drastically
oh yea defer response?
I am defering the response
well only one of them gets saved to the db right
cuz the last one just overrides the first one
so it's not that bad of an issue
is it a command that takes more than 3 seconds
Ok nvm I was stupid and managed to fix it
nice
yay!
I only put the check outside of the await not the adding to the cmdCooldowns map
well ty all
a bot that randomly bans a member once a day
in what context
ohh
uhh i think carl bot does that bc i have had that happen but I dont think its a normal feautre
it will always be
🙁
just do it better than the competition
😦
whitelist which roles will be added back, exclude users with x role, ...
true
i thought of the first one but blacklist
so for example if u kick admin who’s abusing and they join back
they won’t get admin back
insane idea
role select menus have multi select right
ok i’m going to make this bot when i get home
and post on top.gg for the entire world
better UI, better features, more options, customization ect
i’m also going to paywall the bot
changing anything except the restoration being on and off will require a vote
not that bad tbh
oh thats not a paywall
so to edit blacklist you will need to vote
votewall more like
yeah
everything will be under a single command
and the main feature won’t be vote locked
so i think i’m fine
gotcha gotcha
Factory keyword in dart is awesome @lyric mountain, it feels like a modern version of Java
lmao
Any idea why
await cmd.showModal(modal)
Gives me a 404?
dont think I've used factory before, but yeah it pairs really well if you're used to java
flutter front + java back is great
It’s a really nice keyword for defining singletons
That way you don’t have to access it through like Class.SINGLETON_PROP.method(), every instance you create will use the singleton you defined
(In the way I’m using it at least)
Do modals only work on buttoninteractions?
no
Then why does my modal work when I do it on a button interaction but on a normal interaction it gives me a 404
what’s a normal interaction
like slashcommand
Show code
does anyone know a bot that will restore a users roles if they rejoin the server?
yeah I already changed it by adding a button confirmation at the beginning
just make your own
you're just doing something wrong
i am
but i am wondering if there already exists a bot with advanced configurations
It probably exists
What kind of advanced configurations?
advanced configurations
That tells use nothing :/
it does
Well if you cant find any you may have to just make your own
Im sure there are some out there though. It all depends how much you look etc
pretty much any reputable role-manager bot does
whats a role manager bot
What it says....
a bot that manage roles
dyno idk
just find some popular bot with a role management module and it probably has it
dyno does not have
can u not
pinging me for no reason
oh no im so sorry
that's what "idk" meant
I dont use bots
but I saw bots do that already
I mean if he used google like I just did he would see a lot of them 🤷🏻♂️
I'm sure carl bot has this feature
none of those havew
Droplet does 💀
How do I know bc I use it
If you cant find what YOU want why not just make it?
Not trying to be rude btw
it doesn't
oh anyways my question was is VSC with copilot good?
I know copilot can be used elsewhere but vsc + ghcp = about everything intellij seems to have
plus ghcp is like a billion times cheaper
it helps alot
along with the currently closed-beta copilot chat
useful asf
no
it's bullshit
it's been really nice on the trial
hmm i havn't noticed it too much but ive only used it for a few hours. When it suggests stuff I'm a little surprised how it's what I need
plus the brushes seem nice
but i guess ill let u know if i notice more issues haha
🤷
idk maybe it works good for you but i don't find it's all that
if i really need help from an ai i just ask chatgpt
🤲
that's true it seems like a baked in gpt that's more oriented to programming
i mean that's actually what it is i guess
Is there any guy who will help me to setup my bot repl
I will invite you
To my fork
It's python bot
what
Bro my bot is not working
Some error is coming can u help?
without knowing the error no one will be able to help
i can
i can help you out
Really?
yep ( only if its js)
Alright, so I am developing an RPG bot and it's getting quite big of a playerbase right now and I'd like to implement a logging system so I can monitor what users do to look for exploits, stuff I need to nerf, etc. Do any of you know a good way of implementing it? I was thinking of sending a message to a channel in the support server with the command issued and some data with the command?
no
💀
if you don't know just don't answer
<span className="animated-gradient-text_background"
style={{
"--content": "'Food'",
"--padding": "0.05em",
"--start-color": "var(--food-start-gradient)",
"--end-color": "var(--food-end-gradient)"
}}>```
why does the style part comes in red?
what framework is that?
nextjs and tsx
ah, cant help much then, but did u define --food-start-gradient somewhere?
also wdym with "comes in red"?
like as in marked as error?
it's very very hard to know if someone is exploiting if your game is dynamic enough, but you can log (in the database, forget discord channels) what they buy or sell, and use queries to fetch how many people are using a certain item
the component is working fine, but it's just showing the above red line, also hosting it in vercel gives error
why should I forget discord channels?
I'm currently doing this
that's a weird error, especially if it's working, you'll need to wait someone proficient with njs to pop here
channels are never a good logging target, you have a database, use it
there's a global ratelimit, by logging to a channel ur reserving a big slice of it solely for logging
how do you suggest I implement the logging feature then?
serialize that (json, xml, whatever format) and save in a column in a table, if u need to analyze then simply query it
or document, if ur using nosql
that embed can be easily saved as a json
yeah but that won't allow me an overview right?µ
what are those property names? can't you simply use content, padding, startColor, and endColor?
it will, you can simply query the data
because how would I know which users to query if I can't see which users are possibly botting
how would u do it with embeds?
it just stays in the logs channel
it'll also just stay in the database
and if I see weird behaviour I can take action
you wont be able to keep up with that channel once movement start to grow
all you'll see is a very fast spam
mmmmhhh, ok
but how would I know which user's logs to query?
and won't it use a ton of storage?
well, think about what you'd look for in the embed and apply it on the query
well yeah, on the embed I'd just see if a user uses a command every x minutes it'd definitely be a botter
but I can't see that if it's stored in a database I need to query
storage is a function of length and amount, as long as u dont keep every single registry you dont need to worry
even if u do, database size issues dont appear until late tens of millions
just make a trigger that keeps only the last 10k or so entries
you wouldn't need to see a log from 2 months ago would u?
what database are u using btw?
ye ye, ik maria
but i'm using keyv
actually I've 2 words which is Food & For
<span className="animated-gradient-text_background agtb-food"
style={{
"content": "'Food'",
"padding": "0.05em",
"start-color": "var(--food-start-gradient)",
"end-color": "var(--food-end-gradient)"
}}>
<span className="animated-gradient-text_foreground animated-gradient-text_foreground-1">
Food
</span>
</span>
<span className="animated-gradient-text_background agtb-for"
style={{
"--content": "'For'",
"--padding": "0.05em",
"--start-color": "var(--for-start-gradient)",
"--end-color": "var(--for-end-gradient)"
}}>
<span className="animated-gradient-text_foreground animated-gradient-text_foreground-2">
For
</span>
</span>```
in my css it's:```css
.animated-gradient-text_foreground {
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
padding-left: 0.05em;
padding-right: 0.05em;
background-image: linear-gradient(90deg, var(--start-color), var(--end-color));
position: relative;
z-index: 10
}
.animated-gradient-text_background:before {
content: var(--content);
position: absolute;
display: block;
width: 100%;
text-align: center;
margin-bottom: -10px;
background: var(--geist-text-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
top: 0;
bottom: 0;
left: 0;
z-index: 10;
padding-left: var(--padding);
padding-right: var(--padding)
}```
was going to say that if u were using postgres, it has built-in json querying tools
so u could filter by properties
idk if maria has it, ik mysql doesn't
well yeah, I guess I'll save it to the database and see if I can figure out a way of making a good query
problem is
I'm using keyv right
keyv?
so I can only query by key or by value and I won't know the full json value
so I can't rlly filter by properties unless I pull all 10k entries
yeah it's key value for mysql
that uh...kills the advantage of sql
the keys should be in camel case, not kebab case so startColor and endColor
but u can store the full json as the value
you still dont need to fetch every entry, only those relevant (through WHERE clause)
Type '{ content: "'Food'"; padding: string; startColor: string; "endColor": string; }' is not assignable to type 'Properties<string | number, string & {}>'.
Object literal may only specify known properties, and '"startColor"' does not exist in type 'Properties<string | number, string & {}>'.ts(2322)```
and what do you suggest I make the key?
honestly, you'd still need to store the full json, there's no way to have enough columns for every case
sequential id ofc
using uuid?
no, just an autoincrement number
you'd have 4 columns at minumum:
- key
- user id
- timestamp
- the json
ok, but I'm using keyv
u said u can use regular queries
you can use background with linear-gradient(startColor, endColor) instead I think
yeah
I guess I should do that
Should I make a sepperate database or just a sepperate table?
table
btw remember not to use timestamp as the name of the column
if u do, then use " to indicate literal
CREATE TABLE logs {
key INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAT(255) NOT NULL,
'timestamp' TIMESTAMP,
log JSON
};
Like this?
" not '
oh oops
' in sql is string, " is literal
also apparently, maria does have json queries https://mariadb.com/resources/blog/using-json-in-mariadb/
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{
key INT AUTO_INCREMENT PRIMARY KEY,
userid VARCHAT(255) NOT NULL,
"ti...' at line 1
Am I stupid?
remove {
it's (
woops
lmao
interesting, I'll give it a look
for timestamp u can use NOT NULL DEFAULT CURRENT_TIMESTAMP
I think it was current_timestamp
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INT AUTO_INCREMENT PRIMARY KEY,?
every database has a diff name for it
try without _
what ide are u using?
I'm just doing it in my terminal
mmmh removing the _ didn't fix it
ah, remove primary key
u declare it in constraints
This MariaDB tutorial explains how to create and drop a primary key in MariaDB with syntax and examples. In MariaDB, a primary key is a single field or combination of fields that uniquely defines a record.
Like this?
CREATE TABLE logs (
key INT AUTO_INCREMENT,
userid VARCHAT(255) NOT NULL,
"timestamp" NOT NULL DEFAULT CURRENT_TIMESTAMP,
log JSON,
CONSTRAINT key
PRIMARY KEY (key)
)
what do you suggest is a better name?
idk, pk_key is what I use normally
fk for foreigns, uk for uniques, etc
that way u dont have the issue of running into duplicate constraint names
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INT AUTO_INCREMENT,
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTEGER AUTO_INCREMENT,
nvm then
CREATE TABLE logs (
key INTEGER AUTO_INCREMENT,
userid VARCHAT(255) NOT NULL,
"timestamp" NOT NULL DEFAULT CURRENT_TIMESTAMP,
log JSON,
CONSTRAINT pk_key
PRIMARY KEY (key)
)
This is the sql I'm using
varchat
ah
haha
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INT AUTO_INCREMENT,
💀
hm, try putting not_null in it
key INT NOT NULL AUTO_INCREMENT
try doing like they did here
Did I not do it like them?
CREATE TABLE logs (
key INT AUTO_INCREMENT NOT NULL,
userid VARCHAR(255) NOT NULL,
"timestamp" NOT NULL DEFAULT CURRENT_TIMESTAMP,
log JSON,
CONSTRAINT pk_key PRIMARY KEY (key)
)
Isn't this the same?
CREATE TABLE logs (
key INT NOT NULL AUTO_INCREMENT,
userid VARCHAR(255) NOT NULL,
"timestamp" NOT NULL DEFAULT CURRENT_TIMESTAMP,
log JSON,
CONSTRAINT pk_key PRIMARY KEY (key)
)
I did like this
but still not working
with int size?
ah
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INT(16) NOT NULL AUTO_INCREMENT,
userid VARCHAR(255) NOT NULL,
"timestamp...' at line 2
maybe it has to do with timestamp?
perhaps
try another name
oh wait
u remove timestamp type
"timestamp" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ohh...
nope -_-
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INT(16) NOT NULL AUTO_INCREMENT,
userid VARCHAR(255) NOT NULL,
"timestamp...' at line 2
try removing " then
nope
and renaming it doesn't work either
yeah if I remove the line for timestamp and try it still gives the error
would be easier through an ide tbh
just a sec, lemme throw that script in intellij
nvm, thats before u added timestamp
alright
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"key" INT NOT NULL AUTO_INCREMENT,
💀
Have you tried using heidiSQL? If this is being done on windows atleast, it does all that work for you pretty easily.
no, but it's on ubuntu
I'm just creating the table using my terminal on windows
Well what I mean.
Download it on windows, and connect it to your VPS
what I do
https://scs.twilightgamez.net/EyWnM.png see my galaxygate is in the list
https://www.heidisql.com/?cookie_consent=1 this one?
ffs
could just link it but. lol
HeidiSQL is a free and powerful client for MariaDB, MySQL, Microsoft SQL Server, PostgreSQL and SQLite
I too use mariadb
You'll probably have to adjust your mariadb settings to allow connections anywhere.
I forget the exact file but its just changing the ip to 0.0.0.0 I think
been forever since I've messed with the settings.
isn't that a security risk?
well probably, I only do it for a single server discord bot so idc
but ull probably not want to do that.
Here’s a quick guide on how to access a remote database in HeidiSQL using SSH Tunnel, which is a mechanism in SSH for tunneling application ports from the client machine to the server machine and vice versa.
I do know that you'll want to create a user profile for mariadb for your desktop IP.
so for me it's "Nyu" with my password + my ipv4
it wont be root because well, its not the ubuntu machine.
Because its a UI based system and not a console based system, so however you wana setup your table, you can do it with buttons
it just may be a simplier time.
You can also execute SQL directly in the program if needed too.
ok I'll try I guess, thanks everyone for helping
having highlighting and visual clues is much better for writing sql
Do you think I could use a trigger on the insert event or whatever its called in mysql to delete the oldest entry if there are more than 10000
sure why not
Alright is that the best option?
doing in a trigger
Is there an easy way to output 1 decimal place, or none if the number is a whole number in C++? Ideally I'd have behavior like this: ```
Number: 55.31235
55.3
Number: 32.0
32
etc
@earnest phoenix maybe you know?
I'm so fucking sick of std::setprecision
so fucking complicated for absolutely no good reason
well ur using c++ 
I don't have a choice
output formatting is fucking dogshit in this language
Instead of doing what I want it to do, some absolute genius C++ stdlib dev decided to make setprecision control the amount of total digits outputted instead of decimal places
Which I cannot even explain how moronic that is
And the "solution" is to use std::fixed, but I don't want to use that because then numbers that I want to have outputted without decimal points are going to output decimal points
See my issue here
I had to come up with some braindead redundant and overly complicated solution because this isn't easy to do apparently
cant you use modulo and cast to int?
std::string trunc(double value, int decimals) {
if (decimals <= 0) return std::to_string((int) value);
std::string out = std::to_string(value);
return out.substr(0, min(out.length, out.find('.') + 1 + decimals));
}
``` 
I figured out that my problem is even more complex
Now I can't solve it because of ONE test case
ew string conversions
like what the fuck
how am I meant to know what to round
if some are 2 places and some are 1
and you are banned
whats your code atm?
@ebon rain last warning
crazy how I've spent 2+ hours trying to format this and failed, but the core functionality of the assignment took me 10 minutes
std::cout << (std::fmod(x, 1.0) > 0 ? x : (int)x);
yeah but look at this test case
it wants those two numbers to be outputted with 2 decimal places
for some reason
this is the moment you wish u had DecimalFormat
would be simple af with just 0.##
this is the moment where I wish I didn't have an autograder looking at my work
are those two decimal places natural or artificial?
wdym
like the actual sum of those values produces 2 decimal places?
One of the values is from the input as PI, the other is a sum
Which the issue with inputting PI is that it's going to give like 3.14159265 or whatever the constant is defined as in the stdlib
Therefore the total will be off as well
so you need to check, if more than 2 demicals, truncate to 2 decimals
if less, keep them in their original value?
I believe so
Problem with C++ is that it's not super easy to format that
std::setprecision will specify the number of digits, not just decimal places, unless you use std::fixed
so instead of using setPrecision in one of your conditions, use the fmod method
But if you use std::fixed, it'll output something like 20.00 or 21.20
exactly
the fmod method will keep whatever decimals the original number has
so you just need to rule out excessive decimals
exdee
but my god that is WAY harder than it should've been
considering we have been taught absolutely nothing about formatting in C++
Not even printf
Literally just cout is all we "know"
So we should not be expected to know how to format that
I spent 2 hours formatting and 10 minutes on the actual assignment
you're probably expected to format it using strings or math
counting digits and such
I wouldn't say so, the point of the assignment was to teach about loops and conditionals
sussy vibes
I don't see why we would need to spend so much time worrying about formatting
very
which is a good exercise
using conditionals and loops on strings and characters
in order to detect and count digits
That's not what it was meant for though, I'll send a description of the assignment rq
but well idk
Yess successfully made a docker-only VPN Network
pogu
took me ages to figure out the docker networking
I basically cheated on this assignment too
I used a vector when we haven't even come close to learning about those
Hell we barely just touched arrays for the first time
yeah sounds weird
i would assume "natual language processing" is supposed to some advanced subject that people should already have some experience to be able to deal with
And the extent of our arrays was "this is called a pointer. for this assignment just treat it as if it were an array in java"
or maybe they want to weed out the weaklings :^)
It's technically a 2nd year course
But it's so unbelievably basic for a 2nd year course
A month in and we haven't talked about pointers or references or anything actually related to C++
Not even how memory works
I hate it when courses don't explain why something is the way it is, especially if it's not that complex
lodge a complaint with the board of education
Memory is a big topic but a basic "A pointer is a variable that stores a location in memory" wouldn't be that hard
at the place where im working at, students are asked to rate the teachers at the end of each course
if the teachers dont do a good job, they wont get much work
that's how it should be
my discrete math professor is a dick and sucks at teaching tbh
rip
doesn't answer questions because "we don't have time"
is VERY condescending if you actually ask a question in class, so nobody does
I hate it when professors don't like teaching their lower level courses
Just because it's introductory and simple to you doesn't mean that we can be experts in it in 5 minutes from a slideshow
ye
I love teaching people the basics and the stuff that I'm confident in, it's so rewarding
I'd honestly probably be a teacher if the pay was higher and if I didn't want to write enterprise level code and such
yeah
xD
from this site, how can i add bot
to my server
@earnest phoenix did you setup the bot yet?
yup
i had setup luca bot
luca?
I'm confused as to what you're looking for now
If you want to invite your bot to your server, you can just use a blank invite link.
this is git hub link, here is the thing what i need to add to my sever which work like
[[tweak name]] it will provide me tweak info
i dont know how to add
Is your bot running
yup


I'll give it a shot!