#development
1 messages · Page 126 of 1
good luck!
that label gave me astigmatism
Uhhhh guys, I duped my bot code, removed everything but one command to test it, ran the new bot version with this one command, refreshed discord but all my previous commands where still present. What do I do?
No new commands are being pushed to the bot, idk how to fix
slash commands?
Yeah
is it the same bot token?
did you remove the other slash commands?
by sending a delete request to the api
But the one
what now?
I just removed the code from the script and restrated the bot
slash commands are registered and unregistered via api requests to the discord servers
How does that happen?
yoi probably already have code to register them
it its not needed to register every time the bot starts
commands should be registered only once, and then only if you need to update something in their structure
and if you want to remove them, you need to unregister them
All i do is write the code for it, save the file, restart the bot
They usually then appear on discord
But all of a sudden they aren't
show the code where you create the slash commands
And I can't remove them
async def botserverlist(ctx: discord.Interaction):
if not stop_all_commands:
users_cursor.execute("SELECT Admin FROM usersdb WHERE user_id = ?", (ctx.user.id,))
user_admin = users_cursor.fetchone()[0]
if user_admin == 0:
await ctx.response.send_message(f"You do not have permission to run this command.")
else:
for guild in bot.guilds:
servers = "".join(guild + "\n")
await ctx.response.send_message(servers)
else:
await ctx.response.send_message(f"All commands are currently disabled. Watch [#1111010464026066964](/guild/264445053596991498/channel/1111010464026066964/) for any updates.")```
That's the test command
you will have to ask in the support server of your discord library, its probably registering them automatically for you
you can remove them by fetching all commands, and them removing the ones you dont want
check the documentation for your library for how to fetch slash commands and how to delete them
What's the best way to pass a variable to another function
for example:
let finalCost = calculateCost("V3", idsJson.ids.length)
finalCost is inside a function but i want to use it on other functions too
well the idsJson for example comes from the input of the function
does discord have any monetization rules like apple where you aren't allowed to sell stuff outside of discord eco system?
wdym?
like can my bot return a link to sell a subscription instead of using the server subscription thing Discord built
yes you can
nice!
i just found this. im reading through it
but if someone is using discord on iOS then my bot wouldn't be allowed to sell outside of iOS?
i think
Anyone tried indexnow for seo?
that doesn't matter as my resource folder is seen as the main resource entry
all other things worked with using Videos/file.extension
and videos and ringtones are in the same file.
really?
thats what google said
it also said you can use Path and File classes to do it for you
new Path(path).toURI().toString() or something
ImageView imageView = new ImageView(new Image(imagePath));```this worked fine for me, where path = "Videos/file.extension".
except for the ringtone it just doesn't for some reason
it cannot find it
well different classes require different arguments
Image is not the same as Media
you have to check what each class constructor requires
aha,
new Media(getClass().getResource(ringtonePath).toExternalForm())``` this one worked.
you can always check the javafx docs
thanks for clarifying, i thought that image and media paths were the same
Constructor Detail
Media
public Media(String source)
Constructs a Media instance. This is the only way to specify the media source. The source must represent a valid URI and is immutable. Only HTTP, FILE, and JAR URLs are supported. If the provided URL is invalid then an exception will be thrown. If an asynchronous error occurs, the error property will be set. Listen to this property to be notified of any such errors.
If the source uses a non-blocking protocol such as FILE, then any problems which can be detected immediately will cause a MediaException to be thrown. Such problems include the media being inaccessible or in an unsupported format. If however a potentially blocking protocol such as HTTP is used, then the connection will be initialized asynchronously so that these sorts of errors will be signaled by setting the error property.
Constraints:
The supplied URI must conform to RFC-2396 as required by java.net.URI.
Only HTTP, FILE, and JAR URIs are supported.
when trying to run the instruction using cpi :
'Program failed to complete: Instruction passed to inner instruction is too large (18446744073709551615 > 1280)',
this error occured. Is anyone help regarding this.
I need help. I created an oauth2 app with guilds.join scope. I got the access token. But how do I make the user join a server?
does anyone know a good site to bootstrap discrete data?}}|
So for example:
base_dataset = [
["create me an appointment for tomorrow 1:00", "appointment"],
["I have a date tomorrow at 20:00", "alarm"],
["I need to wake up at 7:00 tomorrow", "alarm"],
["I need to wake up", "uncompleted"],
["create me an alarm for 12 june at 12:00", "alarm"],
["create me an appointment for 12 june at 12:00", "appointment"],
["how are you?", howAreYou"],
["You are ugly", "cussing"],
["What appointments do I have for tomorrow?", "goToAppointments"],
["What alarms do I have for tomorrow?", "goToAlarms"],
["What appointments do I have?", "goToAppointments"],
["What alarms do I have?", "goToAlarms"]
]
peeks at username
what do u need it for?
they are not equivalent
the latter will return either "string" or false
hi - this may not be the right channel to ask my question but i didn’t know where else to ask
does anyone know of a bot that can cycle between a few pics setting them as server icon? so every 24 hours for example it’d change the server icon to one of the images i had already provided
if someone answers, please ping me :)
dont know a bot that does that, but should be very simple to do it yourself
It's probably even a few lines of code, you can write something like this without much problem in a few minutes
@quartz kindle @deft wolf yeah i'm aware but keeping it online is the issue 🫤
that's as short as you can get
i found this: https://top.gg/bot/728307949553844296
it is exactly what i'm looking for but i couldn't add it to my server as it's not verified
Then you need to wait
For my bot. I need to user to join the bot support server when they authorize
is the authorization known to the user?
bcuz like, I've saw many bots that try to sneak a join scope in invites and make people join servers without their consent

And if it were in a template?
wdym?
Yes ofc. It's known
condition && value will always return either value or false
regardless of where it is, because you're using &&
Is this the shortest way then?
yes, if you want to return a value if false
don't try to shorten too much, you might make things more complicated for you
anyone know any hosting service for discord bots like i dont wanna go with aws and all cause really dont wanna pay high for a discord bot
i can offer you a discord bot hosting for €1

idk what I'd do without my friend
literally can't afford a VPS for my bot
the VPS compiles faster than my PC so I use it for compiling too 
naw brah
Mine is something like 10$ for 4gb ram
I need sundar pichai to give me a free google cloud vps
mine is 8 for 8gb xD
REAL
because @nova ingot
funny to think we all have that one friend somehow
I do have one too, for him vps prices are a cup of coffee
for me it's a month's worth of coffee

mine is 5eur for 12gb, 4cores, 60gb storage, 1TB traffic (1gig)
(ignoring that I am mostly selfhosting by now)
Then I'm gonna look for better hosting 
man discovered hot plug devices 
^
or just a ups*
Yes I do know that
One is main power other is 10 kWh battery
Please ignore the ssd without a caddy <3
@grim aspen @rustic nova (just pinging because of my reply above)
dont ask why I made this pic but there is the battery
Hallo
So i am working on a project where i need to generate a subdomain automatically
Do you guys know what could be a way around it?
wildcard cert
How does that work?
it gives you https for your domain and subdomains
hi @slender wagon
Ssl is gonna be for later, i now need to figure out how to create the subs automatically
Helloo
Ah
Tell me a joke, error
What's the best way to learn a new language?, error
Please cancel my appointment for next Thursday, goToAppointment
Translate 'hello' to Spanish, error
Remind me to buy groceries tomorrow, error
Set an alarm for 6:00 PM, alarm
fuck you bitch, curse
man fuck you, curse
yo what's up, greeting
how are you sir, greeting
everything good, greeting
hey, greeting
hello, greeting```
is there anyone who knows how to bootstrap a small dataset like this so that i can use it for my decision tree?
buddy, lemme tell u
you're in for a HUGE work making something like this
that's literally half the work of making an ai
theres a perfect api that lets you train NLP models
its free and pretty simple to use and you query it using an api and you assign labels to text
only downside is you need to login via facebook but you can use a burner one
you're partially right saying usually but in fact those PSUs not only act as redundant power supplies but also increase the max Watt the server can use while one usually only delivers 450W max
Also not only the power redundancy outside the PSU matter but PSUs can fail as well making it highly recommendable to not only plug one in even if they all use the same outer power source
That's impossible the see on mobile
Just do a screenshot
Which is your target element?
Can't u just use its as selector?
An ID should be unique and static
But does the ID?
---new-message-bar
The selector would be:
div#---new-message-bar
Ah messages bar
I forgot a s
Like I said I highly doubt the ID changes
So you could use it
You can also combine the class the and ID in one selector
To be sure it's your element
div[class=...]#---new-messages-bar
Like I said before I'm sure the element ID (---new-messages-bar) will be permanently and unique
wont just ```css
#---new-messages-bar {
display: none
}
cuz like, ids are unique anyway
they'd be fairly crazy to change ids tbh
True but you never know when it's discord
Could have an abstract new name by tomorrow
Just because why not
Yeah you never know
thank you very much Chloe! Awesome, this would be so helpful.
You just need an host that has an API supporting changes to your DNS records
Many, many providers nowadays offer APIs for example also allowing you to change your dns zone
You could also create your own dns infrastructure 
Then writing a simply API locally resolving the dns zones changes on your system
By executing the associated commands on your system
Shit i will be buying the domain out of a .al provider
I doubt they have that
I might have to get a .com
Well then look for a provider that offers an API and check if they sell your TLD
Might be easier this way around
Or like I said host a dns server yourself, buy the domain and change the nameservers to your(s)
my work has a ups and its so heavy it required 3 people including me to lift
and even then we struggled to prop it onto the stand lol
its designed to power an entire office, computers, network, servers etc for a couple of hours and its only the size of roughly a pc
That psu is worth like $100
if you have a premium option on discord's app directory how can you tell if a server is currently subscribed? is there a flag in the interaction messge?
un.zip 
Ain't enough, Server hardware isn't cheap, got a bunch laying around as reserve once my PSUs die
But they usually last many many years when not constantly being under full load
is it actually possible to make a crash predictor
...predictor?
That's called the halting problem
You can definitely tell if your program is going to crash IF you're the one controlling when it crashes, i.e "Oh this function returned an error, I'm going to terminate the program in x seconds"
Then explain it better
not that type of crash
crash is a gamemode on gambling websites
i see a lot of them on github but they all look like malware tbh
im not trying to make one btw im just wondering
I highly doubt that it's possible to predict gambling websites. That's the whole point.
yeah thats what i thought
this came into my mind because someone in this server im in is trying to hire someone to make one
Whoever is asking for that is incredibly stupid and inexperienced with how randomization works
They just say "machine learning" as if an AI can predict randomness any better than humans can
Not to mention the incredibly large dataset you would need to train such a model to even get it to play like a human
I'm sure there's some sort of "intuition" involved, and maybe some small patterns, but it's not going to be possible to predict this type of stuff any better than a human, otherwise it would've been done decades ago
I'm sure it is but that's not something that is ethical nor something you would receive help with here
oh no i dont wanna bot them
im just asking because this repo has like 170 stars and all it is is an exe
i think its teting to scam people
using buzzwords automatically make ideas great /s
true!
kuuhaku I'm trying to come up with a syntax for my JVM language, any ideas?
I sort of have this syntax in mind, but it's kind of odd
what's the ? for?
All this really does is switch up Java's syntax
Oh that just indicates optional
That's not how the lang would actually look in practice
For this example it could be something like ```
func main() {
stdout("Hello world!");
}
class Main: public {
someInstanceVariable: public int;
static MY_NAME := "Waffle";
Main(): public {
someInstanceVariable = 15;
}
}
This is just brainstorming I came up with in 5 minutes, I'm not really liking it so far since it's basically just java with more confusing syntax
I do like the idea of not having the main method enclosed within a class, and I do want to be able to have better type inference than javac does
So I am kind of liking the var someVariable := "Type inference!"; idea, but still not married to it
public in front of the name makes me uneasy
but idk what to say, it does look unique
maybe a bit close to kotlin
god i hate the := operator so much
just use the equal sign
Fair
anyone who can help me that how can i upload images to cloudflare r2 bucket using apis??
like if anyone can help me or provide me docs?
pls?
what programming language are you using to make your own programming language ?
I was sleeping when our got Installed so lmao
lol what kwh is it?
i wanna make my own UPS on a side note
would be an interesting project
connecting some kind of microcontroller, high current transistors, maybe some car batteries or anything i can find
something that can generate 230v ac
im no electrician tho
then thats a bad idea
try smaller
try to make your own powerbank first
then build up from there
probably a better choice lmao
have a phone charger connected to it which in turn is connected to a phone/etc and have it switch to battery backup if phone charger switches off
something like that
as long as it is below save levels of power

below dangerous levels*
Rust
so I have a c++ node module that exports 2 function, 1 takes in a v8 function and saves it in a new struct with the context and actual function then returns the memory address as string to js, then I have a function that takes in a v8 string and turns it into a pointer to the struct (that part suprisingly works 100% fine) and then aims to execute the function with the saved context, problem has to do with where im calling it, im executing the 2nd function in a worker with a different isolate but still want to use the other context, how can I do that (Im aware of race conditions)? I already have something but im getting v8 errors related to handles.
https://pastes.dev/717wixB5Q9
(the code may be a mess because im testing around)
10 kwh
I am, at least I am currently studying to be one
You're making a message command which requires the "Message Content" privileged intent to be enabled, but you're using the default intents provided by discord.py which doesn't enable it by default
Enable the "Message Content" privileged intent from the Discord Developer Portal for your bot, and also enable that intent in your code:
intents = discord.Intents.default()
intents.message_content = True
client = commands.Bot(command_prefix = "!", intents = intents)
...
You should follow discord.py's official "getting started" guide
https://discordpy.readthedocs.io/en/stable/intro.html
tysm @earnest phoenix
been so long since i actually tried to code a bot (1yr+ prob)
what's this error for
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
Discord now requires bots to provide intents, intents are to specify which events it needs and what data it needs to receive
Oh ok
tysm
i'll head to the documentation then
i was going to study to become an electrical engineer but things changed i guess?
might still pursue it in the future but im chilling rn
i had an interview for arm to be a designer of processors but i had to cancel because terrible dates and i have other things planned rn
We don’t know what log is
We also don’t know if those lines are what’s causing your error there
🐱
Yeah no that’s not what’s causing your error there
Error: Expected the value to be an object, but received string instead
at ObjectValidator.handle (/home/runner/Generator/node_modules/@sapphire/shapeshift/dist/index.js:1161:25)
at ObjectValidator.parse (/home/runner/Generator/node_modules/@sapphire/shapeshift/dist/index.js:113:88)
at EmbedBuilder.setFooter (/home/runner/Generator/node_modules/@discordjs/builders/dist/messages/embed/Embed.cjs:66:37)
at Object.execute (/home/runner/Generator/commands/activate.js:56:16)
at Client.<anonymous> (/home/runner/Generator/index.js:79:32)
at Client.emit (node:events:390:28)
at Client.emit (node:domain:475:12)
at MessageCreateAction.handle (/home/runner/Generator/node_modules/discord.js/src/client/actions/MessageCreate.js:23:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/runner/Generator/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
Yeah that’s caused by <Embed>.setFooter()
Check the docs for Embed, it takes an object now, not a string
they keep changing shit literally every v0.0000000000000001
they probably also turn typo fixes in documentation into breaking changes somehow
welcome
to discordjs

anyways what version you're using? v512093 or v6932843242343
/home/runner/Generator/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:293
throw new DiscordAPIError.DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[50006]: Cannot send an empty message
at SequentialHandler.runRequest (/home/runner/Generator/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:293:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/home/runner/Generator/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:99:14)
at async REST.request (/home/runner/Generator/node_modules/@discordjs/rest/dist/lib/REST.cjs:52:22) {
rawError: { message: 'Cannot send an empty message', code: 50006 },
code: 50006,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1114585209262854315/messages',
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
}
}
this error pops up
when I use a command
and idk why it pops up ._.
it is trying to send a message correctly with correct parameters I think
are you sure that is where the error is coming from?
think so
I'm only using that command
and there's nothing in index.js that sends a message
Well if that is how you are doing it then somehow embed is not working properly
Which discord.js version are you exactly using?
You can find out by running npm ls discord.js
The latest rather, it makes no sense to install v13 right? 
14.3.0
v12 is not allowed right
Try v14.11.0
(The latest stable version)
oke
I did
And it looked like it fixed and it appeared new error, when I fixed the new one it appeared again
I'll be looking deeply into my code, thx for the help here
Got something assigned by my teacher to do
Code a dashboard that is connected to mysql
Got a preset of a database
Shit is weird
question to mfs understanding sql
Lets say I have the following SQL query
SELECT table1.id FROM table1, table2
Now wanting to use subqueries to do a IN query, am I able to refer to the table2 when wanting to check if said id is in another row of table2?
Such as
SELECT table1.id FROM table1, table2
WHERE table1.id IN (table2.id)
Or do I specifically need to make a subquery
SELECT table1.id FROM table1, table2
WHERE table1.id IN (SELECT table2.id FROM table2)
because if I do refer to it in the subquery using table2.id, it just returns every id
and I feel like it would interfere with any query section from the SELECT table2.id FROM table2 query I've made, or is that FROM only scoped to that subquery
/home/runner/ServerGuard/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[40060]: Interaction has already been acknowledged.
at handleErrors (/home/runner/ServerGuard/node_modules/@discordjs/rest/dist/index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/runner/ServerGuard/node_modules/@discordjs/rest/dist/index.js:736:23)
at async REST.request (/home/runner/ServerGuard/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async ChatInputCommandInteraction.reply (/home/runner/ServerGuard/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Object.execute (/home/runner/ServerGuard/Commands/Moderation/auto-setup.js:39:5) {
requestBody: {
files: [],
json: {
type: 4,
data: {
content: '✅ Autorole has been set to <@&1113973366311886959> and will show a message in the channel [#1114582937938174004](/guild/264445053596991498/channel/1114582937938174004/).',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: {
message: 'Interaction has already been acknowledged.',
code: 40060
},
code: 40060,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1114678929618391120/aW50ZXJhY3Rpb246MTExNDY3ODkyOTYxODM5MTEyMDpYNDVwZEF1ampGQVdzVmZnaXV6WTJneTdteEc2djJtMVRUNlJCS1MwcHB3WUdVV29ZTnpBbXk2aDFiaDhUU2lmQjltMzIyYm5TY1lqTVIzcmxTTkdOeHhLVGFja0FQZnBTYVM0dDhMQ2xacnhWRXVzZ2xXTktwdlhrTkNrVUhsTw/callback'
}``` help please
the interaction has already been acknowledged
you cant respond to an interaction again
yeah nah fuck sql
fuck that
can u help me fix it?
no
here's the code https://sourceb.in/DNhpPsInQj
I just said no
please can you help me
I cannot
why not
because I have no clue about the library or the language or the thing you're doing there
wait for someone who can
ty
. this
and here's the code
help
let me see
ok
what software you use to code?
why couldn't u tell me
and remove token from script if you want
Might suggest not to
its just easier for me but yeh
u can tell me
k
just tell me
leme search
if you need to edit use the code i gave above
warn(prisma-client) There are already 10 instances of Prisma Client actively running.
how the fuck does this happen
shit code
based
does restarting the serveer 300 times within a few minutes count?
oh fuck
i am so stupid
i am creating new instaces on all files instead of importing it
whats the best way of making some commands only viewable by x ids? not just block the command with a basic if check, literally disable seeing the command for non registered people
But you can't code it when deploying command no? You would have to set it manually on the server in the "integrations" tab
No iirc permissions can only be replied once you register a command and can only be updated via the UI later
Omg free nitro everyone
Amogus level link here.com

We filter it because 99% of scam messages contain it 
It's very effective
ah, can you edit allowed commands for roles? the bot will only be on one server anyway
true xD
yes in the settigns tab of your server and then intergrations
and then your bot xD
My Discord is so fucking laggy and my bot too
😂
Welcome to Discord's home for real-time and historical data on system performance.
💀
I just found out it takes 1 to 2 weeks
Dang
🥲
i havent done that myself, but im pretty sure i saw slash commands having the ability to check roles and permissions integrated into the command data at register time
bots can't edit the role / channel permissions for commands
only the server permissions
default_member_permissions is the field that lets you set command permission
https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure
Not exactly
The permissions itself have to be passed within this when registering it
for users
That's a global limitation, not a guild specific one you can set for roles/channels etc.
Hi I get this error:
at Object.execute (/home/container/commands/help.js:63:65)
at Client.<anonymous> (/home/container/index.js:90:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)```
However, I don't know how to fix it as it use to work and now it just glitches the bot.
```js
const commandName = interaction.options.getString('command').toLowerCase();
getString is returning null
ensure the option you're looking for actually exists
print out the options
That explains it, I will have to remove toLowerCase then as thats just an extra bonus on the command but its case sensitive
public void forwardDate(String input) {
String filePath = "Videos/trainer.py";
String filePath2 = "Videos/trainer.py";
File file1 = new File(filePath);
File file2 = new File(filePath2);
if (file1.exists()) {
System.out.println("File exists.");
}
if (file2.exists()) {
System.out.println("File exists.");
}```
how the fuck am i still getting a module or path not found error
i swear that file is in my Videos
and even when hovering over the file it shows the metadata
what should i do else then?
your code would theoretically check:
- myapp.jar
- Videos/trainer.py
which doesnt exist
ahhh wauw i see
i tried to link my java project to my py model, it's an AI:
public void forwardDate(String input) throws URISyntaxException {
try {
setExecutable();
File pythonScript = getFileFromResource("Videos/trainer.py");
String pythonInterpreter = "python3";
Process process = Runtime.getRuntime().exec(pythonInterpreter + " " + pythonScript);
OutputStream outputStream = process.getOutputStream();
PrintWriter writer = new PrintWriter(outputStream, true);
writer.println(input);
writer.close();
InputStream inputStream = process.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
String output;
while ((output = reader.readLine()) != null) {
System.out.println("Processed Output: " + output);
}
reader.close();
process.waitFor();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
however, my shit ain't working, no errors or whatsoever
Nick that ain't helpful the fuck should i do 😿
honestly i tried everything
nothing tends to work
i have a javafx gui
upon button click i want to use my decisiontree, made in py to return my output
to my java file
to eventually use it
@somber ridge
no
my main pc has windows 11 but its annoying how microsoft really wants you to get it
it is annoying asf
your vm is eligble for windows 11?
though did end up upgrading it, not seeing any issues yet
yeah
well it does work
upsell number 2
but i never saw the upgrade message
windows 11 needs the tpm chip
there are ways to upgrade without it but for the message to show it needs the tpm chip xD 
yeah i did that once you can use rufus to patch the iso to not force tpm
microsoft got way too comfortable adding soft requirements

i'm sorry xD i can't help you but goodluck 
when windows 12
11 is the classic bad one they release every 2 releases
true
honestly
they should just use a versioning system lile nodejs
an lts version every 2 years
kinda like android
each major update you would get excited for because it would bring a new ui cool redesign and new features
now each major version is like eh
np!
I would say that not every major version needs massive overhauls to the UI and features and whatnot, sometimes it's about improving the entire experience with some backwards incompatible changes or just improvements so great that deserves a major version bump
11 is just a reskin of 10 that makes it harder for power users
also breaks some applications like steam with the fullscreen
they do it literally every year though i think if they dont have anything significant an average user would notice they shouldn't bump the version
Windows 11 is not just a reskin, there are lots of changes behind the scenes that makes it better than Windows 10
- It provides nicer and much more optimized APIs for the developers
- It revamps important/highly-used applications that never got a design update before (like Task Manager)
- It has much better performance improvements and consumes less resources
- Allows for native integration of Android applications
- Provides the latest and greatest support for all your hardware with the latest drivers available (ones that aren't compatible with Windows 10 or below)
- Improved multi-tasking and similar features
And more...
Basically there's no reason to not upgrade unless your device doesn't meet the Windows 11 requirements
Not really how it works, in software development (including operating systems, because they're software as well), there can be breaking changes that just cannot land without a major version bump, and because of that reason lots of features or changes can fall behind that relies on the said breaking changes
For example, this is the reason why Google Chrome doesn't exactly follow the SemVer versioning scheme rules, they make major version bumps a lot even without user-facing changes, and Firefox also followed suit
i've just started getting 'unable to get local issuer certificate' error on vscode terminal, works in my normal terminal. anyone know a fix?
Does it appear when you run a specific command?
You're clearly running a command then, show us the command you're running before that error
node .
What Discord API library are you using?
Are you behind a proxy of some kind?
Do you have the "HTTP Proxy" setting set in VSCode? Better check for that
Does it work if you uncheck the "Http: Proxy Strict SSL" option and try again?
okay weirdly its fixed after changing my node version
i didnt realise i was on 20.x so i went back to lts and now it works
Weird, though yeah there still are issues with Node.js v20, we haven't marked it as LTS so better stick to the latest LTS release (v18 currently)
Well VSCode itself uses Node.js, so there must've been some issues with setting up the proper environment with Node.js v20
how do i make this loopable
you just use a for loop?
... of Object.entries(obj)
if thats a json file just do
const jsonFile = require('somejsonfile')
for key,value of jsonFile.requirements {
}
no idea if this is right actually I have not used js in so long
god what have I become
i don't wanna do that tho
but it'll say the object isn't iritable
then for .. in
right cause naturally its not
so what fake said is the proper method
you can only index an obj like that not for of it
but how can i make it iritable without doing that
i can loop through ranks without doing that tho
because its an array of objects
Object.entires()
without doing that bruh
but i did with ranks
how can i do with ranks but not requirements
arrays are iterable by nature
an array is not an object
objects are not
looks like an object to me
i made it this and it still doesn't work
You fucked up
what
if you can already loop through ranks then you can also loop through requirements
oh wait
when you loop it will hit the rank that doesn't have an array of requirements first
ok but it still doesn't work
technically an array is an object with numbers as keys
this says otherwise
why is it printing out thhe entire thing
instead of just one
please dont remind me of the crap javascript is
One of your requirements property is an object, not an array, you're mixing up your values
you can't for of an object
as we said numerous times
without using Object.entries
but i made it an array
You did, but the other ones are still an object and not an array
Look carefully in your JSON file, or just show it to us
print each rank and see
did you save the file?
yes
print the object
wont for requirement of rank.requirements print out the full object?
since thats the only element in the array

no there's 3
rank, I mean
look
what do you mean with 3
print each rank and make sure all of them have requirements as an array
As if you have a better solution, FakE
not what he meant
Don't get into the implementation details much, you'll get lost
but anyway
aye, avoid js 
but it is
i'm looking at it right now
there's only 2 ranks
on the console?
C++ gang for the win
no in my file
pseudocode
for each requirement in rank.requirements
print requirement
result:
{"trainings": 2, "patrols": 2, "bounties": 2}
nah not the file
this is what you're getting with what you're trying
log it to console
why?
actually in returns and index

ya never know
aye, avoid
jsPHP
FTFY
how can i make each requirement loopable
I'm good enough to work with jquery (cry about it) on prod code
Objects something
rude... can't take u seriously anymore after recommending windows 11
im good enough to fuck up jquery (cry about it) on prod code
what are you using jQuery for
yes
objects something?
can anyone help
and commonly used on web apps
i don't understand
Can't take you seriously when you chose your goofy car to be your home
Your car...

Can't take voltrex seriously when he doesn't even have a car
Better than having a goofy ahh car
Wait imma just download a car
Elon Misty
yessir
Log every object in the ranks property and see which one has a requirements property that isn't an array
import { Client, ClientOptions } from "discord.js";
declare module 'discord.js' {
interface Client {
// Will later add stuff here so intellisense picks stuff up
}
}
export default class GalaxyClient extends Client {
constructor(options: ClientOptions) {
super(options);
}
}
Help my code doesn't work, I was trying to take over the galaxy but the client is borked
Instead of that, that formatting is taking over my brain cells
ok changing of to in works but
it only returns the text
how can i make it return the number beside
does it return literally {trainings: 2, patrols: 2, bounties: 2}
in gets the enumerable keys in objects
What formatting
watching that dude is getting me an headache
its not formatted
I know it's not formatted, hence I'm pointing out the general formatting of the code

looks fine to me
What do you see in the console when you do:
for (const rank of <YOUR JSON OBJECT>.ranks)
console.log(rank.requirements);
your client is fucked
looks perfectly fine to me
I also don't remember how to make discord bot
😔
I'm talking about the extraneous newlines there
can't have a proper car and cant have a proper screen

what new lines
I think you're going crazy
How about you use a proper language? (Not PHP)
import { Client, ClientOptions } from 'discord.js';
declare module 'discord.js' {
interface Client {
// Will later add stuff here so intellisense picks stuff up
}
}
export default class GalaxyClient extends Client {
constructor(options: ClientOptions) {
super(options);
}
}
looks perfectly fine to me
PHP is a language
just not the best
quiet misty
hey I am sticking up for you
I know enough

Still don't see it
Just like in the screenshot Flazepe showed

there ain't enough red arrows on your pioc
*pic
Hmm still not getting the picture
Do you see it now?
@earnest phoenix any good minimal system recovery tool you can recommend?
It requires disk dump, ssh and network service
I have to copy the entire disk as the source currently is Windows (sadly) but I need the system to be deployable even as backup
Deployable as ISO and should load itself into the ram
I don't quite understand what you mean, can you rephrase that?
I need to move a cloud server into my local proxmox instance
Since the host system is windows i have to copy the entire disk byte by byte to take all data with me
So I'm activating rescue mode on the host and wanna use disk dump to move all data to the target, the entire file system
The target yet is an empty VM hasn't anything on it
Just grub sub system
I need the target to be in rescue mode too to overwrite the entire file system
Just dunno any good rescue mode software for the target
The host uses the providers rescue system of course
Guess I will just have to test random shit I can find in the net
Oh no idea, I've never been in such a situation so never used anything like that before to recommend a good one
Makes me sad 
how do i get status code using fetch
response.status
hey guys, got an issue, my bot (reaction roles) decided it didn't want to work. Anytime I type in any command for it I get
Reaction Roles
BOT
— Today at 4:24 PM
The application did not respond
Only you can see this • Dismiss message
any idea whats going with it?
Either your bot process is offline, using the wrong token, or is taking over 3s to respond to the command.
Or there's an error in your code that's preventing it from responding.
Check your logs.
gonna sound dumb of me to ask, but how do I check the bots logs?
Where are you hosting it?
Where do you run your bot
No where does the code run?
Actually, is this your first time trying to set up your bot? Or did you get it running before?
I assume you got it running before in some capacity since the commands have been posted to the Discord API.
I had someone set it up for me. this person also set the roles up
however I haven't touched anything, I noticed that all a sudden roles just stopped working, when I asked this perosn if she knew, she said she never seen this before.
You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.
Ok, let me get back to you, fairly sure she used https://top.gg/bot/550613223733329920/vote
that system.
but I'll double check
We're not affiliated with any of the bots on our site.
You need to talk to your developer.
So what do I do then? how do I fix my reactional roles?
She's either coded it herself or used an open-source repository. You can either just use that bot you mentioned above or another one, or contact your developer to fix the one she made.
@sturdy verge is the bot online?
And are you getting the error when clicking a button? Or running a command?
So basically when I type in any command, like /stats
it'll pop up that same message
If the bot is online you can also check that your Discord app is up to date.
I'll check discords app now
But ultimately you should resolve this with your developer and not us since you have no access to the bot process, host or code.
Also on the members list on my discord, that's bot is offline, MEE6 and Streamchord are online but Reaction Roles is not.
Yeah we can't help you then. Talk to your dev.
I am Doing a Chatbot, So can I enable privileged intents for my Discord Chat bot?? If my bot got verified??
The Bot is working there is a command called /setchannel so after we put a channel name the bot will start chat there if we messaging in that channel. so will I can Approve privileged intents to the chatbot if the bot got verified??
I guess they will allow that
Hi
@shell tundra
How does autocomplete on slash commands work?
Will discord send an autocomplete interaction as soon as a user focuses a specific field?
as a user focuses a specific field
whut?
You receive an interaction as soon as the user starts typing for choices
not typing, just as soon as it is focused(clicked on or tabbed onto)
to provide the list of choices
hmm 👀 its a shame if its only when they start typing
Well seems like it's not
An autocomplete interaction can return partial data for option values. Your application will receive partial data for any existing user input, as long as that input passes client-side validation. For example, you may receive partial strings, but not invalid numbers. The option the user is currently typing will be sent with a focused: true boolean field and options the user has already filled will also be sent but without the focused field. This is a special case where options that are otherwise required might not be present, due to the user not having filled them yet.
so...
The option the user is currently typing will be sent with a focused: true
guess the user needs to start typing
It wouldnt be an issue, but I dont expect users will remember their choices.
I mean, you could just use a select menu
also using autocomplete
save the last inputs of the user and display them as options
I mean since it's a message component you can update the select menu at any time
ay it runs on focus
you need some separators in your names
smh
Doing things right? nah
nope, it triggers a few seconds after they stop typing
well focus is possible
but typing event is a few seconds after
prevents it spam sending events everytime they spam letters 
it happens on focus, which was my only concern
something ain't right here
and my AD blocker is off and it's still making me turning it off even tho ITs OFF
btw it's on everything
<rejected> DiscordAPIError: Invalid Form Body
embeds[0].description: This field is required
at RequestHandler.execute (D:\discordbots2\ufocasino3.0\node_modules\discord.js\src\rest\RequestHandler.js:349:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (D:\discordbots2\ufocasino3.0\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
at async InteractionWebhook.editMessage (D:\discordbots2\ufocasino3.0\node_modules\discord.js\src\structures\Webhook.js:311:15)
at async CommandInteraction.editReply (D:\discordbots2\ufocasino3.0\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:137:21) {
method: 'patch',
path: '/webhooks/772248843109531661/aW50ZXJhY3Rpb246MTExNTM2NDgyMzg1MzY5OTE5MzpWYXhVRG94aGFMcnlPNEdFY2xoV21SR2xxa2pqQnpsd09tSEhWUjhJa1A5NEdGd29iemJNYlpZakJRT0RXVmh2Q1FnSVZ6ZDZqaUhaU0dWdUlKaEpMdE56TTNhdXE2TWVoWlFPUk4wU091NGZybjJhZkwyOVV5NEdqOEdjYklGUg/messages/@original',
code: 50035,
httpStatus: 400,
requestData: { json: [Object], files: [] }
}
}
reason: Invalid Form Body
embeds[0].description: This field is required```
~~getting that error any idea why?~~ fixed
does your embed has a description?
nvm, dumb mistake lol
yoo can i set values or someshit for buttons?
I think it's called custom id
I personally use randomly generated strings for buttons since customID's have to be unique across all servers using the bot
I occasionally use them in formats such as randomstring_action_index
To differentiate between actions
idk for your bot they don't for me? 
yeah, they aren't unique
they need to be unique only within the same message context
Ah maybe I'm remembering incorrectly
Been on a coding hiatius for a bit.
you forgor 💀
Are users' snowflake IDs going to remain the same when they change the username system?
yes
cant see why it'd change
great thanks
how can i get a array of a tables columns with sql
i did
thats why i ask for help
what is your schema
?
i don't know what that is
ok
@covert gale
does not work
why is it so difficult to get columns of table
sad
if anyone knows feel free to spam me with pings
nvm i figured out
does anyone know why i can't use a parameter here
I get the error SqliteError: near "?": syntax error
(better sqlite3)
What exactly are you trying to achieve?
so with that i can get the list of columns
but i want to make it so i can use a parameter
which is ?
but it errors when i try adding it
Ok ok, why do u need the list of columns?
so i don't need to make one for every single table
well that really isn't the issue
I need to understand the context, because 99% of the time there's proper way
Listing columns is just a dirty workaround usually
U have the schema already don't u?
i need to check columns
so if one doesn't exist
i add it
I believe u can set alter table to skip existing columns
If not, there's probably a command for that
Hm, now I see from where u got that pragma
You can simply concatenate the name of the column to the sql
Instead of params, concatenate it
It's not arbitrary data, so it's fine
Unless your table names are illegal
but what if someone sql injects me
Who is "someone"?
Double quote it
double quote what
As I said, "unless your table names are illegal"
Some names might be detected as keywords
Put double quotes around every concat
Except for pragma
As it's a string already
but it works without
A column named data for example
Double quotes signal an identifier, so the database knows you mean what's written not some type or keyword
You can go without it ofc, but mind what you name your columns/tables then
I searched for way to long why my code was working on my pc, but not as a docker image.
Turns out, that i put the entyre /app folder inside a volume instead of just /app/BotName.
This ment, that a new image would be basically useless. XD
does somebody know why my hourly income command says this even tho I set the custom hourly income to 120
const Discord = require('discord.js');
const CurrencySystem = require("currency-system");
const cs = new CurrencySystem;
const { Database } = require("quickmongo");
const db = new Database('my mongo db URL');
module.exports = {
name: "hourly",
description: "Claim your hourly earnings",
run: async(interaction, bot, args) => {
await db.connect()
let amount = await db.get(`hourlyamount-${interaction.guild.id}`);
let result = await cs.hourly({
user: interaction.user,
guild: interaction.guild,
amount: amount || '100',
});
let user = interaction.user;
let embed = new Discord.EmbedBuilder()
.setColor("#61C83D")
.setAuthor({ name: `${user.username}'s Hourly Earned`, iconURL: bot.user.displayAvatarURL() })
.setDescription(`**Amount:** $${result.amount}`)
if (result.error) return interaction.reply(`You have used Hourly recently Try again in ${result.time}`);
else return interaction.reply({ embeds: [embed] });
}
}
this is where i set the custom income
if (interaction.customId.startsWith('ha')) {
const filter = (message) => { return message.author.id === interaction.user.id };
let collector = interaction.channel.createMessageCollector({ filter, max: 1 });
let senlEmbed = new Discord.EmbedBuilder()
.setDescription(`Send the amount you want for the hourly amount. (Type cancel to stop.)`)
.addFields([{ name: '**Example:**', value: `100` }])
interaction.reply({ embeds:[senlEmbed] });
collector.on('collect', async (message) => {
const args = message.content.trim().split(/ +/g);
if(isNaN(message)) return interaction.reply({ content:'Invalid number', ephemeral: true });
if(args[0].toLowerCase() === 'cancel') return;
db.set(`hourlyamount-${message.guild.id}`, message);
const embed = new Discord.EmbedBuilder()
.setDescription(`Hourly amount has been set to ${message}`)
.setColor("#B468FF")
message.reply({ embeds: [embed] })
collector.stop();
})}
Well I think that part of the issue is that you're doing const cs = new CurrencySystem;
That should be throwing an error, you can't construct an object like that afaik
Also you should consult the documentation for the library you're using, since that's a 3rd party library
it doesnt show any error
apparently that's a valid way to construct an object
that's very weird, you should do new CurrencySystem(); for consistency
this is what that libary says
Why do you use interaction.guild when it clearly says guildID. It should be interaction.guild.id then no?
Are you sure your database is right? amount might be an ID in your database on accident, keep in mind
well if i remove the "amount" from let result = await cs.hourly({ user: interaction.user, guild: interaction.guild, amount: amount || '100', }); it does work with the 100$
That's weird
just out of curiosity, is the number in amount the id of the current guild?
The number looks like an entity id.
na I just checked that
The amount option takes a number, not a string, you're always passing an string to it
You're also setting the custom amount as a string in your database as well
Its certainly a snowflake 👀
You can use the global parseInt() function to convert a string to an integer
tbh i dont know how i do that
Yeah they're storing the ID of the message
The collector passes a message object on it's collect event listener
Also isNaN(message) 
op yeah 👀
Use message.content
Note that you'll need the "Message Content" privileged intent to be able to access the message's content
i have that
Then use it
What's about user and guild option in cs.hourly() Voltrex?
Hes also using guild and user object instead of their ids
Or it's valid? 
👀 it just calls valueof in certain contexts iirc?
I think the library converts the user and guild objects to strings, in which their toString() methods return their respective IDs, and about the library I'm not exactly sure how it works
It most likely accesses the client in some way and sends a message and adds data to the database
Apparently it just initializes a MongoDB instance and stores currency data to it
https://github.com/BIntelligent/currency-system
At this point just make your own, this is so goofy
Not sure if this is right; https://stackoverflow.com/a/37245712
But it sounds right
That's not what's happening here
oh?
It just calls the toString() method of the user and guild objects, which can be modified by the developers to return whatever they want, so the discord.js maintainers modified it to return their respective IDs
👀 huh
It's basically
class Foo {
constructor(id) {
this.id = id;
}
toString() {
return this.id;
}
}
const foo = new Foo('12345');
console.log(foo.toString()); // 12345
console.log(`${foo}`); // 12345
console.log(String(foo)); // 12345
console.log(foo); // Foo { id: '12345' }
class Test {
wee: string;
constructor() {
this.wee = 'Woo';
}
}
class TestCustomPrimitive {
wee: string;
constructor() {
this.wee = 'Woo';
}
valueOf(){
return 'hi!'
}
}
const test = new Test()
const testCustomPrimitive = new TestCustomPrimitive()
console.log(test.valueOf(), test.toString()); // Test { wee: 'Woo' } [object Object]
console.log(testCustomPrimitive.valueOf(), testCustomPrimitive.toString()); // hi! [object Object]
🤔 I'm not certain though
This method is called in priority by numeric conversion and primitive conversion, but string conversion calls toString() in priority, and toString() is very likely to return a string value (even for the Object.prototype.toString() base implementation), so valueOf() is usually not called in this case.
This part confuses me tbh
Honestly, object primitives confuse me
You didn't modify the toString() method of the Test class, so it returns it's string representation as [object Object]



