#development
1 messages Β· Page 203 of 1
well tim's djs-light v13 at least
its stupid how much it uses
in mac's case assuming no overhead from anything else its roughly 100-130mb per server.
I haven't been in the bot dev scene in a while so idk if that is abnormal, but it seems to be so
That is very excessive
I thought so
Then again when I was in the scene djs was my poison so it was normal for me even then
Though I think itβs gotten worse 
it got way worse

djs now uses finalizationRegistry for memory management
no idea what that is
which makes it use even more ram, ironically
I wonder what serenity's memory usage looks like
but i remember logging into my bot with a barebones djs v12 would use 500-600mb on ready
and on v13 it would use 800-900mb

let me test v14 real quick lel
and they don't see this as a problem?
not really, because they see it as normal js ram usage
Djs' class based approach is a shot to the foot since import strings are excessive on the memory footprint
not to mention the cpu waste by moving data all over the place
933mib rss, 856mib heap
10109 guilds
hi
what is the point of this
they add this but dont add decorators
honestly idk where the need for them same from
i guess someone wanted to have a way to receive a callback when an object gets garbage collected
in javascript thats basically unpredictable
gc gets called whenever it feels like it
i only see it useful for detecting memory leaks
exactly, thats why they wanted it
probably half that of djs's
but in return you get a giant executable size with over 500 dependencies

but it saves a lot of money (plus D++ is one of the most overly well documented C++ libraries out there)
Indeed it saves money
but I do not recommend it as a lib for small bots
The jump from JS to C++ is too big a gap, its also not worth using if you are already invested in djs and your bot is still growing. It's better off to continue using djs/javascript as a whole until you actually need it.
Unless you are completely new to programming, at which point I will always encourage someone to go for a statically typed language like C++
C++ is far from beginner friendly lmao
While that is the case, I also don't think its a terrible first language.
it is
i absolutely despise the fact that it's the first language of many CS students
C++ while annoying to work with, teaches you a lot of the fundamentals of CS
I mean there is no real other choice
its the optimal language for computer science as it stands right now
It works on any system, is low level enough, teaches you about memory management
Java and C# are really good statically typed beginner languages
when i started learning C++ for the first time, i immediately quit after seeing all of the examples show << and >>
like why would operator overloaded functions good to show to first-time beginners
Thats nitpicky though
Also, the reason (from what I can only tell because idk what those guys think) that c++ is taught in CS classes is because of its versatility
It can run on any system without anything other than a compiler, which comes with the OS
unless you want to use something like clang, but I digress that you can get by with the default compiler
the requirements to run a c++ program is also very low, you can have a super low end system or microcomputer like a rasp pi and it will run on it just fine without issues. While yes java and C# can do that to, but you need to install the .Net sdk or the jdk to even run a C# or java program
i would recommend going on to higher level languages first, then jump to lower level langs
Depends on what you want to do
starting off on a higher level language isn't always the best
If you never need it, why learn it.
your efforts are better spent in the area you want to study
In C++ you also have to know about header files, linking with third party libraries, cmake, rvalue references, segmentation faults, memory leaks, its stupidly terrible coroutines, etc
isn't that a bit too much for a first-time programmer...?
Not necessarily
I mean, a lot of the people who go to college for computer science don't necessarily know what any of that stuff is either
They are expected to learn it though
There is a reason its widely taught is all I am saying.
huh? the top #1 uni here teaches Python in its first semester, then Java in the following semesters
It may not be the most beginner friendly, but it also teaches you a lot more. Now if you don't want to go into CS then you dont really need C++ unless you just want to learn more about the system as a whole. Cause thats what C++ ultimately teaches you, how to make use of the hardware
A lot of the American and some UK colleges i've looked at teach C/C++ and or C# as their primary choice of programming language
ah icic
Either way, C++ is still imo a good first choice to learn a language
Though if you don't like a challenge then dont choose it
Some people like to challenge themselves (like me)
yup, and that's fair
hahahaha yeah but i helped you a lot along the way!

windows says fuck you
no, you have to install visual studio
windows compiler is msvc
its included in visual studio
you can install visual studio build tools separately tho
but its still part of visual studio

maybe I already had the compiler installed at some point
I do a lot of shit I don't remember
Oh maybe thats how I got it
i think now node has an option to bundle them for you
even more of a reason on why I already had it then
great now I look like a moron
π
lmao nah
you can install clang very easily tho
i dont recommend jumping into the MSYS2/MinGW rabbit hole for GCC
hey guys
this is my priing page atm. Does anyone have suggestions? Any things i can add?
Good rule of thumb, black on a background image is not ideal
Especially if its a dark background image
Use a grey washed white
something thats not too bright, but not too dark
Also kind of nit picky, but for the free plan it makes no sense to say its price is $0.00 billed monthly. Just display the "Choose Plan" button
hahahha yeah exactly
i see, i had like a space themed site you know
pretty colorful
yea but black on a purple background
purple is already a dark color
so mixing 2 dark colors together to some people can be harder to read
Ah yes, free plan for the price of 15$ a month
jokes aside Yea that layout looks better
ahhh i see
i just did soemthing for the time being hahaha
Looks good to me
yuhh lets go
idk i am currently creating the site but i am scared to publish it in the end
like, suppose there will be errors and such
i'll have to test the backend a lot
free plan $15 a month .... wait a minute...

in all seriousness add a "enterprise/custom plans: contact us"
the fuck is tiktok cooking
why do they need a kernel developer
it looks like they either maintain their own linux for whatever reason or contribute to the linux mailin
they want a way to read private information from your android phone's kernel

its funny how you can gauge the kind of internal and confidential projects a company is working on just by looking at their jobs page
there is not
to make vsc run extensions on the client and not on the remote server
I have this but it's not doing anything
(die)
my pleasure

https://stackoverflow.com/questions/58236172/visual-studio-code-how-to-run-extension-locally-on-my-laptop-when-connected-to this is all I could find, but it looks like that's what you have
hm
how do i get to the bot page
click the bot on top.gg
do you need help getting to top.gg
yes π₯Ί
no
Made options so that the user can choose items to buy from the economy shop
that'll grow out of hand
I donβt see why not?
Hello everyone! I just tried adding bots to my server for the first time ever and from top.gg They're all offline and don't work, would anyone know how to fix this issue? Thanks! Any help is appreciated!
Either wait or join the support server for those bots. If there is no support server report to the mods
Thanks mate, I'll check into it. I feel like it's on my end and every bot I ever add at this moment is going to be offline. I could be wrong. I've added a few various ones from different developers and they're all offline, seems odd to me
Itβs very well possible to be a visual bug
Also likely itβs offline for your guild if the bots sharded
Arrays in static languages are different than arrays in dynamic languages
Arrays must have a known size at compile time
Anything else in rust is considered a "slice"
Which is a view into an array of sorts
What you're probably looking for is a vector
let some_array_of_zeroes = [0; 5];
Makes an array of [0, 0, 0, 0, 0]
Pretty sure you don't need that type annotation
Type inference is nice :p
you just give it a size and it infers it
You don't even need a size iirc
Ah right, its a static
you are forced to give it both the type and size
eh
compiler complains otherwise
static is weird and I don't like static in rust
I try to avoid static myself
btw waffle
me and null are working on a game in our spare time

using rust
bevy?
Yessir
Its pretty cool and I was getting bored of working on just one thing.
Have you looked at bevy?
Its not as well developed as built up engines like unity or godot
yeah I actually stole their ECS for a project I was making instead of making my own
but its pretty well built
("stole" meaning used the bevy-ecs crate)
lol
yea thats the beauty of bevy
its all plug n play
don't want their renderer? make your own!
College do me rough 
Just finished my first year at college though
Luckily I am not dealing with college atm so I have loads of free time
I'll have some time for literally a week then I go back to college π

That's rough
I didn't know college was that fast paced
Thought they'd give you at least 2 weeks off
I have the summer off technically
But I'm going to community college over the summer to get some courses out of the way for cheap
I see
And that starts like may 14th or something
I'll have my bachelor's spring 2026 and masters spring 2027
Or at least that's the expected timeline for me rn
Majoring in comp sci but probably specializing in interactive systems (computer graphics focused)
Oooo
Seems fun
question
why do you convert file_name to a string only to convert it back into a slice

you can log slices
How do I make the bot send a message like mine?
i dont think discord bots can send voice messages in that sense right now
i would look at discord api docs but since im making a chat app rn i dont want to take too much inspiration from discord
They can!
@ashen notch
await message.channel.send({files: ["./temp/voice-message.ogg"]})
How should I do it?
The code for doing it is there
You have to figure out how to use djs internals to do it
voice messages need 3 things: the IsVoiceMessage flag, the duration of the audio, and the waveform data
the waveform can be an empty string
i dont think discord.js has any tools to generate waveforms
if an empty string works, then its easy
Very
does discord generate a waveform from the audio?
I was looking into how to generate one
Yes it does. There's a max of 256 samples iirc
I am not understanding xd
try this then:
await message.channel.send({
files: ["./temp/voice-message.ogg"],
attachments: [{
duration_secs: 9999, // your audio file duration here
waveform: ""
}],
flags: 1 << 13
})
oh ok
although you probably need to generate the attrachment using djs's attachmentBuilder first
Error generating or saving audio: DiscordAPIError[50035]: Invalid Form Body
attachments[0].id[BASE_TYPE_REQUIRED]: This field is required
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:374:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 1,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { attachments: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}
const file = new AttachmentBuilder("./temp/voice-message.ogg");
await message.channel.send({
files: [file],
attachments: [{
id: file.id,
duration_secs: 9999, // your audio file duration here
waveform: ""
}],
flags: 1 << 13
})
Same mistake
interesting
error:
try this then
await message.channel.send({
files: [{
attachment: "./temp/voice-message.ogg",
duration_secs: 9999, // your audio file duration here
waveform: ""
}],
flags: 1 << 13
})
otherwise idk, i'd need to see the djs source code to see how they merge the file data with the attachment data
but im going out now
Alright, The code above gives error π¦
what error this time?
Error generating or saving audio: DiscordAPIError[50161]: Voice messages must have supporting metadata
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:374:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 8192,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Voice messages must have supporting metadata',
code: 50161
},
code: 50161,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}
according to the source code, this should work
const file = new AttachmentBuilder("./temp/voice-message.ogg");
await message.channel.send({
files: [file],
attachments: [{
id: 0,
duration_secs: 9999, // your audio file duration here
waveform: ""
}],
flags: 1 << 13
})
Error generating or saving audio: DiscordAPIError[50035]: Invalid Form Body
attachments[1][ATTACHMENT_NOT_FOUND]: Attachment data not found
at handleErrors (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/root/AICrafter/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async TextChannel.send (/root/AICrafter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:155:15)
at async /root/AICrafter/index.js:375:45 {
requestBody: {
files: [ [Object] ],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 8192,
message_reference: undefined,
attachments: [Array],
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: { attachments: [Object] }
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/channels/1235541866372534312/messages'
}
Not exactly what I wrote for the code but whatever
But do when you're home! I'm not in a hurry
How about you just install snowtransfer and use that
:)
and delete discord.js while you're at it
:))
Ah
seems like you will need to create a custom message payload
How do I create one? never done it xd
im looking at the djs source code
its gonna need some hacking for it to work lol
as usual, djs makes things complicated
Ah all right, you'll let me know?
const { MessagePayload } = require("discord.js");
class VoiceMessagePayload extends MessagePayload {
resolveBody() {
super.resolveBody();
this.body.flags |= 1 << 13;
this.options.files.forEach((file, index) => {
const attachment = this.body.attachments.find(att => att.id === index.toString());
attachment.duration_secs = file.duration || 0;
attachment.waveform = file.waveform || "";
})
return this;
}
}
const payload = new VoiceMessagePayload(message.channel, {
files: [{
attachment: "./temp/voice-message.ogg",
duration: 999 // your file duration here
}]
});
await message.channel.send(payload);
no idea if this works
xd
edited
why?
i mean, i edited/updated my original message
@ashen notch
nice
What do you recommend I use to calculate the length of the seconds in the file?
you'll need a library to process file information
Ok thxx
try this
honestly kind of cool bots can send them like that
used to only be able to send the files as they are
Yes, in fact I thought it couldn't work xd
doesn't work for me 
lol
what your code look like?
hm
it downloads the ogg from youtube as webm, converts to ogg then sends
ffmpeg
π€
hm
dont see how it works for that guy but not for you
definitely not a discord.js version issue?
discord client version?
possible as well
although discord is usually good at keeping desktop clients up to date
its probably not an ogg issue but you can try using something else as an ogg file that isnt youtube
idk i havent touched discord bots in 20 years
Buffer is deprecated
sorry let me buffer.from really quickly
thanks
i don't know if it's the abstractions discord.js made but this is how it's done through fetch:
https://gist.github.com/flazepe/b8deffbc728ce917deff5549b5be7a1d
does files also create an attachment field in the payload?
even if it does, it needs to have the id as 0 to refer to the first file for the voice message to work
nice token
delicious token yum yum
time to send spam requests with his bot token
by the way only real ones remember when tokens used to start with NT and not Nj
probably time based or something
now they start with MT
oh right
discord tokens are the most overengineered thing ever
they made them so complicated for no reason
just make it a string of random characters pelase
keep the preamble for automatic detection of leaked tokens but thats all thats needed
nah make it just the timestamp of when the token was created 
Hi guys, sorry, I need a hand
Hi guys, sorry, I need a hand.
I created the /clear command to delete messages but I noticed that I can't delete messages older than 14 days and I can only delete a maximum of 100 at a time (due to the .fetch limit).
I need to bypass these 2 limits, do you know how I can do it?
Here is my code:
The 14-day limit cannot be bypassed, no bot can. The only option is to delete the entire channel
As for the limit of 100 messages at once, you can call this function several times in your command, not just once. Wait until the first 100 messages are deleted and then delete the next 100
It would probably also be possible to fetch 1000 messages from a channel, for example, and delete them one by one every second or something like this
I don't know what the rate limit is, I wasn't too interested in deleting messages
isnt the 14 day limit only applied to bulk delete?
i believe if you use the normal 1 at a time delete, the 14 day limit doesnt apply
but its ineficient af holy
it would take years to delete hundreds of thousands of messages
Yes, apparently this limitation only exists in the case of bulk delete 
So it will be a real pain in the ass to delete a "significant" amount of messages
hey can someone help me ?
new to bots being in my server i jus wanna kno how to edit my afk bot settings
Best thing is to let the afk bot support help you
its not a terrible idea honestly at least for IDs but you risk collisions (even on the millisecond level)
thats why i dont like UUIDs because even though the chance of a collision is basically 0 its still possible
and if it does happen bad things could happen
its extremely expensive and taxing on the discord database to bulk delete that many messages so 14 days is reasonable
although id personally set a limit on the amount of messages you can bulk delete rather than the days
does anyone know when the browser decides to download an image when viewing it in url and when it decides to preview it without downloading it?
im sending an image back as a response and even setting content type as the image mimetype (which is jpeg) but it keeps downloading it instead of previewing
did you check the response headers?
either
- it didn't set the content-type header properly
- it somehow has a content-disposition header
- the image is corrupted (i doubt it is if you already checked)
strange it seems to be set properly
HTTP/1.1 304 Not Modified
vary: Origin
content-type: image/jpeg
accept-ranges: bytes
cache-control: public, max-age=0
etag: W/"fbdb-18f43aa7f35"
content-length: 0
Connection: keep-alive
Keep-Alive: timeout=72
and the image is definitely intact
maybe its the fact it has a fucked up version of the cache since its sending back 304?
ill try hard reload
probably because its sending back a 304 which tells browser to use cached copy
so it doesnt send the actual image
aah finally
i cleared the cache and now its working
i guess it had a broken cache from when i was debugging earlier
are the images supposed to be cached?
if it's something that returns something different every time, you probably shouldn't cache them i suppose
yes since they are attachments so they are expected to be static
so i enabled every kind of caching for them
gotcha
etags and whatnot
Whats this "Activity Ended, start a new one?" stuff
turns out it's not happening to anyone else using my bot?!?!?!
known bug
its a discord issue
Honestly, my first course of action when anything seems wrong is to blame Discord from this moment on
lol
Hello supporters , I have a problem in my account , he gave me this error
const { AutoPoster } = require('topgg-autoposter')
const ap = AutoPoster('my token', Client)
ap.on('posted', () => {
console.log('Posted stats to Top.gg!')
})```this is the error ``` throw new Error('Unsupported client');
^
Error: Unsupported client
at new AutoPoster (C:\Users\med-r\Downloads\Myths-Ver.3\node_modules\topgg-autoposter\dist\index.js:46:11)
at Object.<anonymous> (C:\Users\med-r\Downloads\Myths-Ver.3\index.js:162:12)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47
Node.js v18.18.0```
again what client are you using
The bot called Myths-Bot : https://top.gg/bot/731948524203147304
the is the client ```javascript
const discord = require('discord.js');
const client = new discord.Client({
intents: [
discord.GatewayIntentBits.Guilds,
discord.IntentsBitField.Flags.GuildMembers,
discord.IntentsBitField.Flags.GuildMessages,
discord.GatewayIntentBits.GuildMembers,
discord.GatewayIntentBits.GuildMessages,
],
partials: [discord.Partials.Channel]
});```
change Client to client
lowercase
const { AutoPoster } = require('topgg-autoposter')
const ap = AutoPoster('my token', client)
ap.on('posted', () => {
console.log('Posted stats to Top.gg!')
})
bru
this is not the problem i guess cause i changed it already , and also don't worked
Copy this @sweet matrix
remember it will post every 30 minutes
your welcome
hmm what about the votes i think don't work
const Topgg = require("@top-gg/sdk")
const express = require("express")
const app = express()
const webhook = new Topgg.Webhook("my auuth")
app.post("/dblwebhook", webhook.listener(vote => {
// vote will be your vote object, e.g
console.log(vote.user) // 395526710101278721 < user who voted\
// You can also throw an error to the listener callback in order to resend the webhook after a few seconds
}))
app.listen(80)```
Webhook Auth i think this one , yes or no ?
but why he doesn't work
thatβs not how that works
Itβs
http://yourhostip:port/dblwebhook
mine other hand is different https://oliverbot.xyz/api/vote
but itβs usually your host ip and port and /dblwebhook
aaah alright , and what aboout my webhook auth
put whatever and whatever you put, put in in auth on topgg page
Does anyone know why pinging some users doesn't add them to my thread? They do have permission to view the channel the thread is in.
When they join the server my bot adds a role to them automatically on the guildMemberCreate event and then creates a thread in the channel and pings them in it. It works for some members, but not for others. Even if I manually try and ping them myself to add them it doesn't work.
So, this is discord issue, but sometimes users can not see current threads being used so if they want get in they have find a member whos in it and ping them.
Even if I manually try and ping them myself to add them it doesn't work.
But then it will later on
even with no additional perms
itβs currently discord issue so idk
Where is this issue documented?
im not sure since this been happening for years now.
Well I've only noticed it in the last couple of weeks
ask in discord developer server
Check category permissions
They might have documentation to give you im not completely sure
@harsh aspen
I'd like to think I can figure out Discord channel permissions with my experience 
That's not the issue
You said correct permission and they have it
Everyone gets exactly the same role on joining but some can be added to threads and others can't
So it's not permissions
I even tried manually verifying them (accept rules) and pinging after that and it didn't work either
itβs discord issue
Might be you hitting the thread members limit?
It's like 7 people per thread so I doubt it?
Can't remember the exact number but iirc a thread can only have 1k members
or maybe that ^
Oh yeah lmao probably not that then 
It's for premium support tickets so no
Man I hate Discord 
That's the answer I didn't want to hear
Because there's nothing I can do I guess
lmao
you could try editing pixxie code to force them in your server
wdym?
they already get force added to the server when they subscribe. the flow is:
sub β get added β get given role β get thread made β get pinged in it
Hold on
even if they're already in the server it doesn't work
i had a guy who's been in the server for 2 months prior to subscribing who couldn't be added to the thread
You can add users by using pixxie
that's the same as just pinging though no?
#include<stdio.h>
#include<string.h>
struct info{
char name[64];
struct DOB{
int date;
int month;
int year;
};
};
int main() {
struct info usr1;
struct DOB dob;
strcpy(usr1.name, "Guy");
usr1.dob.date = 7;
usr1.dob.month = 5;
usr1.dob.year = 2005;
printf("name: %s\nDOB: %d-%d-%d", usr1.name, usr1.dob.date, usr1.dob.month, usr1.dob.year);
return 0;
}
whats wwrong here
i donβt thinks so
await thread.members.add('140214425276776449');
yeah i guess i can try that and see if it fixes it
alright i'm trying this to see if it'll work for the next ones

gotta love how unreliable discord is
like if this is the solution and i wasn't a bot dev how would i add these people to threads? 
it's been half an hour and now the manual ping works
through my account
i don't get it, like nothing changed
What error are you getting
does discordjs have some sort of list const of all default discord emojis
they are just twitter emojis according to the emoji unicode standard https://unicode.org/emoji/charts/full-emoji-list.html
theres probably an npm library that gives you a list of those emojis or whatever you need to do with them
Why not just use unicode? I don't get it 
hey guys does anyone have suggestions of what i can do here?
i think it looks decent already but i might be too inexperienced lmao
dark mode?
not sure he fully knows what hes doing but its ok
weve all been there
Align your text to the left it'll make it easier to read.
And make your top nav align with the left side of the FAQ section
It'll give the page a lot more structure
I dont want to make a massive list of unicode chars by hand
Why do you need them though? What does that package achieve?
Im making a memory minigame
Cool
It seems that it's referencing multiple things so why not group them by seevice
Maybe it helps someone -> https://gist.github.com/LautyDev/d864f7a8704fb64f0369610c63ac986f
I mean thats something anyone who reads the docs would figure out
but it's a good thing to know either way
always helps having more examples
The answer is yes btw
It is
is there any way i can append react component to a parent div ? without resetting it, i tried reactDOM.render it resets
bro

not another
?
What's this
acc made today
acc just joined
acc telling you to run a command to... verify you
Srry
acc also banned publicly in #support for being reported already
yeah

might just be my paranoia but i always check dm authors before reading their instructions lol
so do i π
I was just curios
curiosity killed the cat

You killed his cat bro
Another one

no
someones doing the haha funny
do you really need the header files though?
i find it unnecessary in my case
i don't generate any header files and it still works
what matters is the .dll/.so/.dylib file that was generated
then you can System.loadLibrary those files
i still dont think you need to generate a single header file
unless you're using C/C++ to interface with jni
wait so you are calling java from rust?
why tho

i guess you can write most of the code in rust and write some java code that interacts with the Java API
there are like 8 other jvm languages
but you would still need to use gradle to run it
all compatible with java
kotlin is pretty nice
I dislike the syntax
kotlin is like if java and js had a baby
kotlin is just java but sane
I used kotlin a while back
I actually made a issue on haku's pagination library for JDA

i like their way of function(something: value) or something
what was it about? dont remember it
429 errors when buttons were pressed/loaded
ah yes
Was a wacky thing
Wasn't until a year later that I realized you were who I was talking to
and I could of just pinged you

lmao
@harsh nova 
-b @slim turtle nitro scam
incursiowastaken#0 was successfully banned.
Hello everyone
I have a little problem in my command which is I want to creating commands VIP only for who voted in top.gg discord.js v14 like Premium users, I have a script but I don't know where is the problem , the console don't gives me anything but when I try to send the command , he still replying me by " Sorry, this command is only available for users who have voted. " I don't know why
this is the script messageCreate```javascript
client.on("messageCreate" , async (interaction) => {
if(interaction.content.startsWith(config.IGNORE_PREFIX + 'vip')) {
const user = interaction.author;
hasUserVoted(user.id).then(voted => {
if (voted) {
// User has voted, execute VIP command logic here.
interaction.reply('Accessing VIP command...');
} else {
// User has not voted, inform them this command is for voters only.
interaction.reply('Sorry, this command is only available for users who have voted.');
}
})
async function hasUserVoted(userId) {
try {
const response = await fetch(https://top.gg/api/bots/YOUR_BOT_ID/check?userId=${userId}, {
method: 'GET',
headers: { 'Authorization': config.TOPGG_TOKEN },
});
const data = await response.json().catch((error) => {
console.error(Error when checking vote for user ${user.id}:, error);
});
return data.voted > 0
} catch (error) {
console.error('Error checking votes:', error.toJSON());
throw error; // rethrow the error after logging it, or handle it as appropriate
}
}
}
})```
you have to check if user id voted using top.gg api
when I try still gaves me this one
voted already
obviously, it's the string in ur command, better using try catch / exception for error
also kindly move ur ass to #development you will get better support there
opps my bad
where we are rn
π
someone help me -_-
explain me
through top.gg api you can check if user has voted or not
there must be some endpoint for this
I can't read js
Make sure what voted is when using the command. It seems to me that despite containing data.voted, this function will return 0, i.e. if statemant will always be false
Wait, you didn't put your bot id in the URL? 
Yes, I've included my bot's ID in it. The authentication with top.gg is also set up correctly, and the API key is being passed in the request headers for authentication.
I think the problem in data.voted, It's possible that the data.voted field is not returning the expected value
<div class="row justify-content-center align-items-center">
<div class="col-md-8">
<div class="d-flex flex-column justify-content-center text-start align-items-center p-5 text-center">
<p style="color:black" class="fw-bolder fs-2">Cosmo? What's that?</p>
<p class="texer text-dark">Dive into the cosmos of Cosmo, a realm where innovation meets imagination, and possibilities stretch beyond the stars.
But what exactly is Cosmo? It's more than a name; it's a gateway to boundless creativity and endless discovery. Join us
as we unravel the mysteries, explore the wonders, and redefine the limits of what's possible. <span class = "fw-bolder"><br>This is Cosmo. This is where
curiosity knows no bounds.</span></p>
</div>
</div>
<div class="col-md-8">
<p style="color:black" class="fw-bolder text-center fs-6">Wait no more.. scroll down to reveal the secrets of Cosmo!</p>
</div>
</div>
<div class="pt-5 mt-5 row justify-content-center align-items-center">
<div data-aos="zoom-in">test</div>
</div>```
hey guys how do i put that div that contains test onto a different page?
Ignore jk
xD
bro hhh lol
I forgot
π€¦ββοΈ π€¦ββοΈ π€¦ββοΈ π€¦ββοΈ π€¦ββοΈ π€¦ββοΈ
I forgot to change the bot's ID in the api link
Yep
now it's worked
Haha OPE
that's funny
Weve all had worse not bug bugs
almost leaked your entire token
should still probably reset it
yeah @sweet matrix
leaked token???
leaked token???
Tim x 1 has been added to the inventory.```
what are you going to do, retrieve my bot stats? 
Thanks to the token, we will find out who voted for his bot and we will be able to change its number of servers 
lmao
Then we send these people information that thanks to voting for this bot they qualified for the nitro giveaway and we will give them a fake nitro gift
We will be rich 
For the most part yes.
If you want to use react that is.
Svelte is also a good alternative.
i am a svelte enjoyer and i did not appreciate that response
svelte is indeed odd at first
havent touched svelte
but it has its uses
i call it the debloated react
svelte's way of handling things is nicer than react.
Its just react is a lot more widely used due to its age, so a lot of people tend to choose it over any alternatives. With that said, svelte and solid are starting to see a rise in popularity.
i also have perfect lighthouse scores with it and i didnt even aim for a good lighthouse score
google lighthouse?
you must not do a lot of web dev then
Indeed I do not
I am a backend developer, the frontend stuff I let other people handle
its this thing in dev tools which measures websites based on a set of scales

this thing
I see, very interesting indeed.
Although aren't those ratings not super duper important?
theyre not make or break but usually point to issues and improvements in your design
especially when it comes to performance and SEO
Some of them seem like they could be obsolete and induce bad practices
Depending on what you are building, your performance will always be a problem, but not necessarily something you can avoid.
As for SEO I never really understood the point of it.
It seems like a bogus metric google made up
SEO is basically just ranking higher in google results
i dont blame that score considering it lags each time i switch channels
Could they possibliy improve their performance? Most likely, but its also a large scale chat app serving millions of users getting millions of requests.
theres still a lot of room for optimisation
I never really understood this tbh
Content should be served based on what you are searching for.
Not some ranking
backend theyve probably done it as good as it gets but discord can do a lot more when it comes to optimising frontend
Oh for sure, frontend is a pain in the ass

because it can be tough in saturated results
I dislike frontend with a passion
I refuse to do any frontend if I can help it
I'd rather eat my left shoe then do frontend
Me and CSS don't mix, I can't design anything to save my life
i used to hate and suck at css but something clicked inside of me some day
i suddenly became half decent at css and its kinda fun designing websites
but it takes like 300 lines of css to get decent results which is what sucks about it
and thats even with stuff like tailwind
π
css is just the bane of my existence. I do not have the patience to sit there and try things over and over until it looks good.
Backend stresses me out enough and stretches my patience thin as is
i would recommend practicing some frontend and overall full-stack development however
usually doing one or the other exclusively is not a good choice
when it comes to jobs or freelancing or whatever
you want to generalise yourself as much as possible
that's fair
but if I am my own boss it don't matter what I know /j
I plan on practiciing some frontend at some point.
My plate is just too full rn with backend dev and game dev
how can I use something like ngrok to forward requests from a port on a remote server to my system
well
most IDEs have a way to port forward from your remote server to localhost anyway
so using ngrok is useless now
what?
running nginx
yea?
with / for nextjs
and /api for api duh
and the server is too slow for development
running eslint and soforth
so I want to develop on my client
Okay, so you can just port forward that port?
and then forward the ports on my system to the server
so that nginx can still operate
Well, you might be able to open an ssh tunnel when you connect, but if not then using ngrok or cloudflared is definitely a good choice
ngrok is an ez "ran out of requests for this month"
i had a bug and wazah ddos'd myself
So you can't use ngrok atm?
no xd
why do you want to do this anyways
but i want to reverse tunnel to a port on my remote server
visual studio code runs extensions on the server
use cloudflared or the -L option on ssh
and most vps' won't be able to handle that
o
i think you can configure vscode to force extensions to run on your client
not all
but yeah they do warn you some extensions might bug out or not work
I mean...if you want to do development on your client you are shit out of luck
(on tsconfig, prettierrc, eslintrc, and even vsc settings)
the only real way to do so is through the remote ssh plugin on vscode
any other way will be too buggy
well that will only expose the port to localhost
no -L option is to and not from
i need requests from my nginx on my server to go to my system
-L is for opening an ssh tunnel from the server to the client
but thats not what you really want if you want to do development.
Just clone the code from github onto your local machine
π
nginx on windows?
do you have to do development on the server? cant you have a system where you can locally host the development version on your machine and then push those updates to the server by github or whatever?
well its just that my api and web are on 2 diff ports
i know
and i aint feel like setting an api url env var
you can do that on the router level and have a custom domain on your local network be available
but you shouldnt even have to do that
i have no router access πππ
Its not worth the trouble
i meant as in on your local network
can be on your machine
networks are very flexible
i just use my github as portfolio
but i do need a page indeed
readme!
i bought the domain chloe.fun just for this purpose but havent used it yet
how expensive was that
very cheap actually
shocking
$5 for a year
usually names are expensive no matter the tld
ssh -R
Specifies that the given port on the remote (server) host is to be forwarded to the given host and
port on the local side.
seems to do what -L does as well

spastic emoji
All I know is I can access my db hosted on my server
or if you want to be lazy use something like https://carrd.co/
i tried using openvpn for this π
the chronically online discord girlies tend to use it
#chronicallyonlinegang
Surprised you aren't using it then 
i was thinking of making my one stand out which you should probably do too
its gonna be a lot of work
was thinking some kind of code editor as a web page that lets you run a custom language to find out projects and other things but i thought thats a bit too complicated for the average person
super wacky
Right, who is your target audience with this π
Recruiters definitely would not like it
Looks like you copied carrd
so maybe it writes the code for you and that way i dont have to make a custom language
the gradient background
carrd wants their copyright back
honestly though
go to paint
come up with a mock design
how you want it to look
then make it
much easier to make something when you have a plan in place
shouldnt be too difficult to come up with a page for a portfolio
oh my god
my server ram was at 7.5 gib
i ran echo 3 | sudo tee /proc/sys/vm/drop_caches
and wazah down to 2 gib
interesting
just gon
alias dropcaches="echo 3 | sudo tee /proc/sys/vm/drop_caches"```
these caches you dropped are cached disk files and kernel data
the kernel uses them to speed things up
it will reclaim used memory for them automatically when its needed
this happens in windows as well but task manager doesnt show it to you in its memory calculation
so unless you want your system to run like shit you shouldnt drop caches manually
oopsies! ^-^
im transferring stuff with filezilla and didnt unselect node modules..
its been over 20 minutes
filezilla took over and i cant cancel it
winscp runs like shit for me dont recommend pls
insert node modules black hole meme here
ftp is the slowest protocol known to man anyways
erm well akshually im using sftp
even slower then because you have encryption in the way
goof around in figma
got an outline of what you want?
I just use flat colors
for my background at least
agree
on a scale from 1-10 where 1 is dogsheit
how json is this:
{Class:"Crewman"
Primary="Gun"
Secondary="Gun"
Tertiary="Mine"}
-1
10
well, NaN cuz this aint no json
FINALLY i got wxWidgets to work

i literally had to modify internal header files in order for it to compile

lmao
:3
Thinkpad 
the epitome of ```js
try {
bot();
} catch(e) {
console.log([AntiCrash] ${e})
}
definitely good code design π
do NOT let this man into a cybersecurity setting
lmfao
dude would leak military secrets faster than war thunder players
π£οΈ
Interesting 
Hey I'm not that much of an idiot
One message removed from a suspended account.
i only see discord doing the ID verification so that they can prosecute that person if their bot does something bad
but i still dont think its a good idea
theres plenty of countries with no extradition treaties with the US so they cant do shit to you
they would have to ban those countries from doing ID verification
social media platform launches
people post shit on it
wokes complain to government
government orders platform to remove/censor
platform cant be bothered with it, so they implement AI/Automation to do it
innocent people start getting fucked over
rinse and repeat
I mean I don't see why they make you renew verification, its not like your identity just changes every 3 years. Unless its a policy of how long they can hold onto those records then it makes sense I guess? (Though I doubt there is such a policy so its all up to assumption at this point)
what have you done SD?
What was the image for it to be flagged as such
Stable Diffusion can't really generate any nsfw pictures
the prompt isn't NSFW. SD just has a NSFW mind now
Right which is why I said the image π
Is that flag message returned directly from sd?
too many people tried to make naughty pictures and now it can't do anything
yea
That's what UD is for 
try self host it
Ah then you will never see the image sadly
i am running locally
Im curious what was so bad SD flagged it
how the fuck is it stopping you then
my stable diffusion doesnt do that
i changed it from A golden trophy, cartoon style, green background, website icon to A golden colored trophy, cartoon style, green background, website icon and it worked
wtf was it generating then
π
People so down bad they corrupted the stable diffusion AI
im more curious on why its censoring you when youre running a local model
something about golden
did you enable that behaviour or something
Doesn't it still use the same model?
this is all my code
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
pipe = pipe.to("cuda")
prompt = ("A golden trophy, cartoon style, green background, website icon")
image = pipe(prompt).images[0]
image.save("icon1.png")```
Is it bad ive drank 4 danimals in the past hour
nah
that is so odd a locally hosted stable diffusion shouldnt do that
are you 100% sure its local hosted
so valid
It tastes different from childhood
but somehow it tastes better than I remember
Haven't had one since I was like 7
yeah, i'm running a jupyter server on my machine
Im still confused on how a locally hosted model differs from what they host themselves
then again I know nothing about AI

so its literally running on your gpu right the model
it doesnt really but you shouldnt have any nsfw filters in place
yeah, it uses my gpu
that suggests theres some kind of filter that checks the output for nsfw
I thought that was trained into the model?
i dont believe it is
π€
that would be very fancy if it was
@proven lanternah yep so the library youre using is using a nsfw checker on top too
its completely separate from SD
it checks the output image and compares its parts to some local database of potentially bad stuff
where is that in the code?
you can disable it however if you want and it gets in the way
i want SD to not think in NSFW ways since im using it for work
its not SD doing it. Its the library by the sounds of it
It's filter flagged the image generated by SD as nsfw
i think the model is trained not to do NSFW stuff
this will probably help https://reddit.com/r/StableDiffusion/comments/wxba44/disable_hugging_face_nsfw_filter_in_three_step/
if the model is trained not to do bad stuff i think thats already sufficient so you can safely disable that filter
ChatGPT is pretrained to not talk about a lot of stuff
Is UD literally not just SD without the filters tho π€
whats ud
Unstable Diffusion
SD used to be able to generate nsfw images.
But after 2.0 they put filters in place.
Unstable Diffusion was made by the down bad people and funraised to keep training nsfw models of SD after 2.0
yes in 2.0 i believe its very difficult to get it to do anything nsfw

but since theyre using sd 1.5 that training is probably not in place
The people behind UD though seem to train SD models to generate NSFW images
sure you can always fine tune the models






