#development
1 messages ยท Page 2080 of 1
lmao
kekw
privileged?
didn't you guys get that taken away recently
Presence Intent, Members Intent, Message Content Intent
very privileged indeed

i don't run verified bots
of course that wont backfire
I don't see why the badge exists, given 99% of bots will be forced to adopt app commands anyway.
the actual exe or just the installer?
Soon as I install the setup exe defender quarantines it

says Webtorrent is scareware
so not harmless just an annoyance
that is how it is classified as anyway
Ima install it anyway cause why not

Actually ima setup a vm
just in case
that same thing was detected in utorrent as well according to google
so it might be something with torrenting software in general
i already use it
ic
i mean, i use a streaming app that is built with webtorrent
ic
do you need the EmbedBuilder when making an embed?
you dont "need" it
i cant find out how to remove the builder, with the buttons and select menus i found out that i had to provide a integer type outside the json but i cant find anything about it for embeds
lmao
so i was right but there was just an issue with the embed itself
thanks
does sb know how I can make a ternary operator condition for methods like .sendMessage and .editMessage while using the same embed settings
I dont want to do do condition ? .editReply ( embed settings ) : .sendMessage ( embed settings ) because I would unnecessarily use the embed settings twice
well, technically you can do this ```js
somethingcondition ? "editReply" : "send"
oo
do you have an example on the internet what this would be called because I have never seen this before, I cant find anything when I look up "js ternary operator for methods"
edit: now I see, that's amazing
its just a ternary with object keys
so i got an embed and when i log it i get this as expected but in the message the timestamp isnt included
can u show the message
he forgot a '#'
no, I mean, sending as a number is valid too
decimal value
0x FF FF FF FF
A R G B
decimal color codes
but it makes little sense to send it as a string instead of a number
since it'll need to be converted on the other side
i got it stored as a string
what happens if u do timestamp: new Date(), ?
doesn't discord use unix seconds?
you use v13?
v14
oh
are u sure that field is supposed to be an ISO date instead of unix epoch?
it is meant to be unix i believe
when i do Date.now()
oh
my bot was made 7 days ago and has 400,000 members.. is 4v dedicated cpu, 2.7ghz good enough for this?
8gb ram, too
member count is irrelevant
oh?
how many servers?
9
9 servers?
you're far from having to worry abt server specs
yeah u can run 9 servers on anything
excellent ๐
more members = more events = more power
it starts becoming a thing when u near like 5-10k servers or so
this is what i was thinking
not really
members are almost never loaded at all times
lmao my bot is just like yours except I reverse search anime images
the cache keeps like a fraction of that
๐
the only real metric is server count, because more servers = way more events
that
cpu matters for events per second, which usually increases with member count
ram matters for cache, which usually increases more with guilds than only members
also, if your bot is single threaded, the number of cpus wont matter
ill look into multi
with js it'll be a litte tricky
i use py
with py too
threading is usually acompanied with sharding, which is only relevant once you reach 1k+ guilds
ah
is there anyway to force discord-hybrid-sharding to launch more than 1 cluster with very little servers?
interaction[sendCondition ? 'send' : 'editReply']({ .... blabla })
I get this error
interaction[(intermediate value)(intermediate value)(intermediate value)] is not a function
my goal was to do a condition to see if its true/false and then do interaction.one of the methods({})
no cuz
when I do interaction.send({ }) it works perfectly fine ( sendCondition is true in this case )
but when I add the ternary operator to that it throws that error instead
interaction is when true a channel to send the message to and when false a message to edit
(sendCondition ? interaction.send : interaction.editReply).bind(interaction)({..}) try that
property of bind is undefined
Try logging interaction to see what you get
a textchannel
( to which I want to send a message to )
replacing send with reply causes the same error
is interaction a CommandInteraction or a Message
hm, editReply is not a thing on textch
if sendCondition is false, interaction will be a message that I want to edit
so interaction is dynamic? it can be TextChannel or Message?
prob this will work (interaction.edit ?? interaction.send).bind(interaction)({..})
if edit is undefined, which is textch, use send
<33 it works, arigato
I guess that's how I do it with dynamic arguments, learned smthing new then
glad i can help, no prob ^-^
weird, the methods should not be losing their context just from that
https://www.virustotal.com/gui/file/f15b063c631f542ababb6e301a5226a4ab48d4034f8eefd85a4e9909a0ffac0d do you guys think this is safe?
VirusTotal
apks are safe imo
its not like u gonna catch a virus and next day ur device wont work at all anymore
also depends where u got the apk from
you're dead wrong about tht
no
I replaced mrs major on android in 1 day
yeah, the worst an apk can do is show you ads when you open it, unless you explicitly give it permissions to do more
whats mrs major
also made 2 ransenwares
bloatware and malware
rasenganware
ransenware is a type or malware that encrypts all files and you have to pay to get them back
u can just deinstall it lol
its called ransomware dude
its spelled ransomware lol
nope, make the app the system app and boom u can't untinstall
exactly, the only way an app can do something is if you somehow give it system perms
u literally cant fuck up ur device in one day unless u grant it some system perms or root ur device ( which I honestly dont even know how to do and why would an apk require those in first place. an apk requires default settings or settings like reading ur contacts or images, from there u can just judge whether u want to install or not )
there's many holes in the android OS that allow u do that
u can man
fucking up rooting process can perm brick ur device so that's 1 way
example
tell me how do u grant system perms
and fuck up ur device ( by that, I mean to be forced to set ur device back to default + u lucky if u can backup somehow ) just by installing an apk
never seen that happen, every phone these days has an emergency mode where a new image can be flashed
u would have to explicidly install and open it, there is ways to bypss the prompt as well
regardless of how bad you fuck it up, you cannot rewrite the emergency mode area
well at least back when I tried rooting my old samsung I bricked it so bad u couldn't even turn it on
what samsung model
Samsung s9
ok elaborate
like no power at all?
u were not able to get into emergency mode or like
holding ur buttons long enough
it showed the samsung logo but then instantly tuned off again
where u can access stuff like setting ur phone back to default or requiring backup
yeah because u didnt know how to access the emergency thingy which is not affected by the virus at all, u can just access it
I did, I tried as well
ok what happened
it just didn't turn on
no
yes
power button + buttom volume button right?
e.g. u were bootlocked
power + volume up button, hold it for a while until u can access the menu
ic, still it was pretty dead eitherway, the final 5 minutes it was on I couldn't open any app, install anything etc.
???
I would have to factory reset most likely
yes but changing some of them crashed the settings app
I tried changing some of the settings related to the app I used for rooting but it crashed the settings app when i tried doing anything
package manager got fucked up too I couldn't install or uninstall anything
bro u can just go to the developer settings and then enable that usb device thingy and from there u can literally transfer all ur data onto ur pc
and when i tried rebooting it just wouldn't turn back on
there are 3 ways to turn on an android phone
normal boot
recovery mode
download mode
download mode is the only one that cannot be tampered with
there is no way u were able to click the settings but not being able to toggle the usb thing
this is recovery mode
download mode?
this is download mode
oh that
yeah that
didn't try download mode but it's usuless now either way since I bought a new phone
download mode is like turning your phone into a usb device open for writing, you plug it into a pc and use a software to install a new image on it
is that even a thing 
thats amazing ngl
huawei doesnt have :(
it should have
u can make custom software with that too
yeah I had to somehow make enough space on internal storage
and then wait until battery drained
then I was no longer bootlocked
you can install anything with download mode, even something broken
that seems like a big issue wtf
I want to edit an ephemeral message because i need to await something, but each time i get "undefined", here is my code
using djs v13
if (interaction.customId === "test") {
const msg = await interaction.reply({ embeds: [embed], ephemeral: true });
console.log(msg) // return undefined so i can't edit
}
you cannot ever break download mode itself
why not?
do interaction.reply(blabla).then(msg => console.log(msg))
its another variant .then
because download mode is a hardware thing
a specific combination of hardware buttons and turn on your usb hardware in that specific mode
still undefined
that's really cool
show code
if (interaction.customId === "test") {
interaction.reply({ embeds: [embed], ephemeral: true }).then(msg => console.log(msg));
}
you need to add fetchReply: true
it doesnt return the reply by default
Hey, will text commands stop working for all bots or just verified bots?
For any verified bot
Up to 75 (100) guilds unverified bots can still enable privileged intents - for testing purposes or private usage
oh okay
stills the same thing
lmao
Does anyone using asp.net?
Just wanted to ask something about wrapping on controller
Hey guys, I have a HTML/javascript related question.
Basically I use JSDOM and Axios to get some data from a website
but then I see this part
I know how to get html values but
I need this url in particular
I don't know how to reference javascript stuff inside HTML
here is my best (working) try;
const websiteData = await axios.get(getUrl)
const websiteDom = new JSDOM(websiteData.data);
const links = websiteDom.window.document.getElementsByTagName("a")
let urlList = [];
for (let i=0; i<links.length; i++) urlList.push(links[i].getAttribute("href"))
const imageUrl = urlList.find(url => url.includes('img3.gelbooru.com'))
console.log(imageUrl)
but I feel like this is unnecessary code and maybe can be reduced
Why not just links.some(link => link.getAttribute('href').includes('url'))
Sorry I had to edit that message about 30 times because mobile moment and Iโve been rusting for too long tonight
client.on('messageCreate', async message => {
console.log(message)
})```Hey guys why is this event not firing?
Show me the intents you have enabled for ur bot
i have enabled the message intent
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });```Yeah this is the issue
You'd need the GULDS intent yes
Is there any place where all the intents are listed?
I can't seem to find them in the guide
the docs
You're still using v13?
I think a lot of people are voltrex
It's better to upgrade then
Bro ffs is there a v14 already?
I ain't going to switch
it has been ou for a few days now
v14 was released 2-3 days ago
Did they do a lot of changes?
v14 is also a cist pool
It wouldn't be djs if they didn't
Like the fucking humongous changes from v12-v13
my god
they honestly need to chill their ass
There are way too many changes that pissed almost everyone off
I think that i will stick with v13 man
Yes, caching is a good way to avoid ratelimits and stuff
they are making everything so hard for no fucking reason
I was thinking of letting the users handle the caching themselves
Well you shouldn't handle caching that much by default, and let the users configure the caching behavior
Mmmm what would you say is an ideal result?
What do you mean by that?
- new MessageEmbed().addField('Inline field title', 'Some value here', true);
+ new EmbedBuilder().addFields([
+ { name: 'one', value: 'one' },
+ { name: 'two', value: 'two' },
+]);```wait they really changed the way embeds should be formatted now?
Yes, they removed the addField() method
waaaaht?
Like what all should I do on my end
is it safe to just continue with v13 as v14 seems like shit imo?
at somme point you will have to swap to v13
the api endpoint v13 uses will someday be deprecated
Not really, although fixes will be backported from v14 to v13 for a while, support for it will soon be dropped and will probably break just like the previous versions did
What all should I do on my end as a lib dev?
I also gotta think of a system design that will allow for caching to be implemented seamlessly. Before I had a lot of circular dependencies that were biting me in the ass
999995519839502346 so close to 19 length id
If your id number is lower it means your account is older right?
yes
957347862314905610 my account is sadly newer
my other accounts got deleted/banned
๐
why so hard. I would throw an easy string generator in java and call it a go
yeah
Snowflakes are easier
same with the emoji in discord
also twitter
twitter make so much useful stuff outside of their site
Snowflakes are guaranteed to be unique iirc
yea
which is always increasing
bootstrap sucks
.addChoices({
name: 'Planetary Raid',
value: 'raid'
}```how would i add multiple choices?
yeah
[{name value},{name value}]
Well then again, you have to take care of caching, and mainly ratelimiting, there are design concerns as well but that's not much of an issue
mmm who knew lib dev was so hard
๐
.addChoices([{
name: 'Planetary Raid',
value: 'raid'
}, {
name: 'Rumble Round',
value: 'rumble'
}])```it expects it to not be an array
oh
the docs say it takes in an array though
.addChoices(
{ name: 'Funny', value: 'gif_funny' },
{ name: 'Meme', value: 'gif_meme' },
{ name: 'Movie', value: 'gif_movie' },
));```this is their method
addChoices(...choices) maybe
smh

