#development
1 messages · Page 2076 of 1
can you show the full error?
I guess the number is too large
Uncaught DiscordAPIError DiscordAPIError: Invalid Form Body
communication_disabled_until: Invalid communication disabled timestamp
at DiscordAPIError (d:\Games\wallet saver - Copy\node_modules\discord.js\src\rest\DiscordAPIError.js:9:5)
at execute (d:\Games\wallet saver - Copy\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)```
Also it’s NOT 4 weeks
It's 4 weeks, how can the number be too large.
I am using exactly the maximum
Did the api block me or anything lol
Lol
I'm rather curious as to which version of discord.js you're exactly using
"discord.js": "^13.8.1",
You think they changed this in any version?
so does this mean it's an api issue rather than an issue in my code?
maybe i should set the time to a few ms below 4 weeks?
Well like my first guess, the value was too large
/webhooks/[object Object]?wait=true moment
^^^
https://discordjs.guide/popular-topics/webhooks.html#using-webhooks its literally following this lmao
Show your code perhaps?
const webhookClient = new WebhookClient({ url: 'https://discord.com/api/webhooks/id/token' });
webhookClient.send({ content:`API started` })
but the total value is literally 28 days max
thats all I'm doing
why is it saying that my value is too large?
I mean try 27 days?
If that works
Back to the day only has 23 hours @quartz kindle
Does it say SMALLER THAN 28 or 28 days max
your pc's clock could be wrong
The documentation says up to 28 days maximum
ok fixed it, for some reason it went to djs 12.5.3 even tho it deffo shouldn't
Using an old ass version of djs damn
Hmm maybe the clock of discords backend is a little bit behind
discord wants an actual timestamp
djs takes your timeout and does Date.now() + timeout, then sends the resulting timestamp
so it uses your pc's current date + 28 days
if your pc's current date is 1 second out of sync with discord server's current date, then it could make it send a timestamp that when received by discord it becomes 28 days + 1 second, which is invalid
its very common for computers to be several seconds out of sync with each other
Stupid issue but common
Is that a prefix command I see
Yes and it will be a big issue in a few years since days getting shorter
the !member if statements activates meaning somehow it's not getting the member?
Shame 🔔
I will never ever submit to using slash commands
😠
have fun having a dead bot in 2 months
That's fine I'll never live to see that
tidal acceleration
anyway what's wrong?
Correct
if you know the English word for
2ms every 100 years
``` this doesn't seem to work??? why?
Ain't no way it's 1s per year
Why the hell are you converting the args to locale lowercase
Not really as the standardization organization can’t update system clocks backwards as this has never been needed resulting in devices being out of sync a lot in the next years, especially older ones
Yes 1s per year
iirc
False
astronomy software has to keep updating itself for "leap seconds"
Tim pull the documentation out
every few years there is a second added or removed from utc
This is already happening for a few years now becoming an issue in a few years likely
in case their name goes like so hey Hey hey Hey so only the big letters get converted to lowercase
Again as long as I can do what I love idc
I'm asking you why you're converting it to locale lowercase instead of just lowercase
Yeah mostly matters for military use or gps
Which has to be absolutely in sync
Why do you need it for gps
also, those only work if the member you want is in the cache, if its not cached it wont find it
Just use maps
Wtf
yes pls
Either works
i want a zombie apocalypse
No law to tell em what I can and can't do

True
Now I don't have to feel guilty when I steal the hygiene products in a hotel room
921
Nooo
that's maybe why
Lmao
Will soon nuke the headquarters it gets developed
No way 921, must be higher priority
hotel jail
He’s save in jail
Also why is the number for the police so short
Zombies won’t get into his cell
Yeah they're save in there
ah yes, need the police? call 0800 738 348 358
Misty on his way to the TOP 10 most stupid ideas ever
Nah it's a good idea
so it's easy to remember
During the dialing process they can really think whether they need them or not
and easy to dial in case ur running away from a murderer lmfao
True and longer numbers don’t feel discriminated
What you don't wanna dial 878 897 8987
Me looking up the police number I forgot about with a slow internet connection as a murderer chases me
Facts
Oh you forgot and don't have internet? Too bad
That sounds like a you problem
Should of paid off your data plan
You can ask the murderer
Poor planning if you ask me
"yo bro can u stop chasing me for a sec I need to find a better signal"
Okay but have you ever thought about turning the tables and chasing the murderer
My problem when the intruder breaks in to Misty's house and they can't call the police, seems like that'll only be my problem then hm
Voltrex again… and his terroristic activities
"Damn bro stop chasing me, do you know the police number? I have to get rid of a murderer"
It might work
Gentle way of asking
"damn dude I know u wanna kill me and all but what's ur wifi password?"
FakE try not view my messages as terrorist-related points challenge (impossible)
Area code depends on your area
112 moment
If no one gets the reference I just made I'ma be sad
what's the emergency number in iran May i ask
Just scream you need help
Probably 827263781
110

Her
You know, like real life activities
oh ok
Proof?
Right cause you're parked
FakE's car is his house
Yes send proof specifically your vin
@.@
Only looks like you're 50 feet in the air
Yeah you just have the invisible mode turned on, your car is right there
lol nvm the pic is quite a few days old
important question: salt vs pepper?
Sure
Either works /s

About git:
I have pushed some changed etc. to a branch (master) in a repo. Now it says compare & create pull request. If I click on it, it says "There isn’t anything to compare. main and master are entirely different commit histories.". What to do?
It's a repo of my org if this matters. Do I have to fork it first, create a branch and after push then create a pull request?? 
Can I have Credits please

pay with your credit card to get credits
Did you create two different git repositories (as in instances)?
get votes, get credits
is it better to connect to database before starting node server or discord client or after?
I don't think it matters too much, unless you need to get some data from there, I do it after.
Like what? I only have 1 repo. How could I've created two instances?
Before of course, without a database connection a client initialization wouldn’t make sense if you rely on data in the database
Not only to connect it before also make sure the connection works
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
any idea why this doesn't work?
no errors btw, it just doesn't log anything
could u...say what doesn't work?
ok, so it should be logging?
yes
what is it supposed to log?
well I tried changing the guilds name as an example but it didn't work
do u have the partial enabled?
did u try adding console.log("something") to the first line of the event to see if it's being called at all?
I haven't, but I'll do it right now
always do that when trying to debug events
yea it's logging
don't u need to await this?
not really sure I mean it works with the channelCreate event like this
console.log(channelCheck) before this line
!== undefined 
also u don't need to compare with undefined, it's falsey by default
if (channelCheck)
awaited still doesn't work
I have it like this in other events as well and they work properly
doesn't matter, do it
also why are u saving the channel as a mention?
just save the id
but sure ig I'll try
If you don’t 100% comparing your value against undefined, then it’s pointless
Would only make sense if null would be a valid value for
if the user tries doing it by mention I also have to filter that out I have no choice
you do have
u can get mentioned channels
or apply the regex before saving
there're 0 reasons to save a mentionable as a mention
ur send message is inside if (!oldGuild.vanityURLCode && newGuild.vanityURLCode) scope
hold on what?
oh jesus christ I'm so stupid
🤣
it took me a while to figure out the formatting
please use brackets for if clauses
even if it's a single line
Never seen such a terrible formatting especially inside statements
Confusing as fuck
I mean, it does have proper tabs, but the missing brackets just makes everything confusing
Which missing brackets?
const settings = getSettings(invite.guild);
if (invite.guild && settings.modLogChannel !== undefined) {
const modLogChannel = settings.modLogChannel;
const modLogChannelRegex = /^<#(\d+)>$/;
let channelCheck, channelID;
if (modLogChannelRegex.test(modLogChannel)) {
channelCheck = invite.guild.channels.cache.get(modLogChannel.replace(/<#(\d+)>/, "$1"));
} else if ((channelID = modLogChannel.match(modLogChannelRegex)) !== null) {
channelCheck = invite.guild.channels.cache.get(channelID[1]);
} else {
channelCheck = invite.guild.channels.cache.find(_ch => _ch.name.toLowerCase() === modLogChannel.toLowerCase());
}
if (channelCheck !== undefined) {
const inviteCreateLog = new MessageEmbed();
inviteCreateLog.setTitle("Moderation Logs (Action: Invite Create)");
inviteCreateLog.setColor(commandColor);
inviteCreateLog.addField("Code", invite.code);
inviteCreateLog.addField("Channel", invite.channel || "None");
inviteCreateLog.addField("Creator", invite.inviter);
inviteCreateLog.addField("Indefinite", toProperCase(invite.temporary));
if (channelCheck.permissionsFor(invite.guild.me).has(
[
Permissions.FLAGS.VIEW_CHANNEL,
Permissions.FLAGS.SEND_MESSAGES,
Permissions.FLAGS.EMBED_LINKS
]
)) {
return channelCheck.send({embeds: [inviteCreateLog]});
}
}
}
their ifs don't have brackets
since we're talking events do you have an idea why this might not work either?
I'm pretty sure it's all correctly formatted this time
Oh you refer to something else than the screenshot you shared?
the whole code has no brackets for single-statement if
I only do that for singe line if statements imo it makes them look better
they don't, trust me
else things like that happen
the only, I said ONLY allowed usage of bracketless ifs is for guards```
if (something) return
// code
or ```
while (stuff) {
if (otherStuff) break;
// code
}
Ah nvm haven’t seen it so far
for anything else, please use brackets
yeah no worries
but??
I don't really see anything wrong with this
unless they lied to me and inviteCreate event doesn't exist
log channelCheck
Did you check the docs?
I don't think they were official but ye
I mean all events are listed
I'm adding every single event that's listed there
I better don’t ask
yeah I just checked it's a real thing
one sec
for that I'd suggest making a generic log generator
that can accept any event and return a pre-made embed or something
single-responsability rule
I can't because it logs different things for different events it would be quite confusing to get working properly
and it would probaby be messier
having one big, streamlined code is better than having 50 repeated and 99% identical code
I mean It literally needs to log all args that’s all
Which the event handler could already handle, like include it
since js allows transforming everything into json, simply do an intersection of both old and new
identical properties get removed, only different ones remain
then log that
lol I literally can't start my bot up anymore wut happened
Object.entries(new).filter((k, v) => v !== old[k])
check the log
maybe u hit the identify limit
what is even that?
u can only login so many times in a set timeframe
Do you suppress all errors?
I mean awaiting all promises as well as having an error handler literally tells you anything
no the VPS's docker keeps getting stuck and then it reboots for no reason
it's not my bots fault I think
check the logs for a reason
I know I'm literally camping there I'm not stupid
if any error showed there I would've sent it here
not the bot logs, docker logs
is it a shared vps?
ye
maybe the other people hit cloudflare limit?
_PC not starting, let’s check the temperature outside _

it's possible but I have no idea of knowing lol
well, you'd need the logs
if they did hit cloudflare ratelimit, then rip until tomorrow
might as well add all the events I wanted to add and check if they're working later
rocker
can I ping u guys if my bot goes active again?
well, you could try debugging it urself first
there are a ton of tools for that
but my best tip is try to make a handle-it-all solution instead of writing the same thing for all events
What sort of environment you’re playing around with which has no access to logs?
trust me, you DON'T want to have 50 copies of the same code spread along your codebase

don't ever write assembly then
I don't plan to thanks, willing to keep my sanity
assembly has functions though?
I get some logs but not those that could compromise the VPS itself
I think that's fair
Else you will end up like speedy going crazy, sadly getting banned because of that
Rip
lmao
did speedy get banned lmao
Yeah 
for what 
I mean, speedy is the master of disguises, he could be me, he could be you, he could even be...dylan!
ah yeah, I forgor
what the heck is pho
food
pho is viet noodles
I doubt my phone knows that
😳
if I have roleUpdate event how exactly do I detect which permission is changed if I only can get the bitfield of the permission?
err....using the bitfield
By resolving it to its flags if you need to
how tho?
bitfield is just a boolean array compressed into an integer
Lemme open the docs only I can open it seems like
every perm is stored as a bitflag
genshin impact joke
like 1 is the first perm, 10 is the second, 100 is the third, and so on
and got a 1 month mute for it
what lol
then ban evaded and got perma banned
VPS booted up, but it doesn't wanna auto boot
it's just stuck at "node index.js" and doesn't respond at all
¯_(ツ)_/¯
just a question, is the vps a free service?
After seeing screenshots being shared in here I can understand why he’s joking about it

what does it return? can't really test because my bot is down
soon to be banned
A bit field is a data structure that consists of one or more adjacent bits which have been allocated for specific purposes, so that any single bit or group of bits within the structure can be set or inspected. A bit field is most commonly used to represent integral types of known, fixed bit-width, such as single-bit Booleans.
The meaning of the ...
Wtf
The docs say what it returns
read this, good knowledge to have
Returns: Array <string >
Which account was his alt
I knew it
<role>.permissions.toArray()[bitfield]
```?
oh
[bitfield] will literally try to grab negative indexes depending on the perm
bitfield is a boolean array compressed into an integer, think about it like arrays not like values
Yes <role>.permissions.toArray()
You can then log them or use the flags to check if they are included
Which would be nonsense since the permissions resolver already comes with any() and grt() methods but still
I think something like this is fine
const oldPerms = oldRole.serialize(),
newPerms = newRole.serialize(),
permUpdated = [];
for (const [key, element] of Object.entries(oldPerms))
if (newPerms[key] !== element) permUpdated.push(key);
roleUpdateLog.addField(
`Permissions ${oldRole.permissions > newRole.permissions ? "Lost" : "Gained"}`,
permUpdated.join(", ");
);
It’s possible
brackets
Sheesh
I have brackets this time lol
oh
btw, u could remove that for loop and simply use filter
yeah I do that both in c# and javascript all the time
Totally okay if it doesn’t cause a syntax related issue
permUpdated = oldPerms.filter({key, elemet} => newPerms[key] !== element);
something like this?
don't u need Object.entries() there?
👌
I wonder if it actually would be faster to turn both bitfields into arrays and eliminating all identical items
To show which perms you got or lost
just do bitwise nand
Tim benchmark when?!
But it seems like he needs the flags anyways as he wanna log the results aka. lost or new permissions
oh wait, not nand, xor actually
/home/container/events/roleUpdate.js:62
permUpdated.join(", ");
^
SyntaxError: missing ) after argument list
Turning into an array of flags before or later doesn’t make a big difference
that's impossible
if u do XOR then you'll convert to array just once
instead of twice
if (oldRole.permissions.bitfield != newRole.permissions.bitfield) {
// Log the bitfield change.
roleUpdateLog.addField("Bitfield Changed", `${oldRole.permissions.bitfield} -> ${newRole.permissions.bitfield}`);
// Create some variables.
const oldPerms = oldRole.serialize(),
newPerms = newRole.serialize(),
permUpdated = [];
// Filter out permissions.
for (const [key, element] of Object.entries(oldPerms))
if (newPerms[key] !== element) permUpdated.push(key);
// Update the embed.
roleUpdateLog.addField(
`Permissions ${oldRole.permissions > newRole.permissions ? "Lost" : "Gained"}`,
permUpdated.join(", ");
);
}
is this not valid?
it isn't
I hope you mean the windows original one
no I'm using my VPS built in text editor it doesn't have any syntax check whatsoever 🤣
why
Thought you wanna log the flags he lost or got not the IDs
aka nano
does anyone know why this happened? wth
gonna paste the entire code to pastebin one sec
Dude for real
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
At least use source bin
I think i know why this happened
Or hastebin
why the paste bin hate?
Because it’s ugly, especially on mobile and bloated with pop ups
As bad as discord embeds
ads + privacy concern
Actually most concerning fact is that is locks the code width to your screen size like discord
Not showing the full width letting you scroll through
oh ic
Which is like I said the same as the discord embeds
hastebin is my second fav so I'll switch to that
it looks normal to me cuz I'm on PC and I got like 3 adblockers on
hatebin (no "s") >>>
so I don't see any bloat
Because you’re a common internet user pressing accept anything at any time anywhere
So it won’t pop up anymore
I never press accept to anything
I'm not that stupid believe me lol
nothing pops up because the adblock I use is connected directly to my routers tunneling
everything works besides the permissions gained
quite annoying
hmmm...that color is wrong
it's hex
discord doesn't allow alpha
o
and even then, the digit count doesn't match
I'm just doing <role>.color so idk
how to?
you live dangerous
Just use the color resolver of djs
hold on before we do that can we fix the permissions gained field?
hehe
old XOR new then parse to permission array
no risk no fun, sir
XOR?
old ^ new
^ is a thing in JS?
it'll get u the difference between both
it's a thing in pretty much all langs
hold on can u use that in a snippet?
I've either forgotten or never heard of that before
need to remind myself
that...that was a snippet already
ye, it'll get u the difference between 2 bitfields
the fuck?
XOR
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0
arithmetic operators = + - / *
comparison operators = || && !
bitwise operators = | & ~ ^
didn't you want to upload the code to hastebin?
I already uploaded that to pastebin but ig you're waiting for me to upload it to hastebin sorry lol
This page is no longer available.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
for example```js
let oldVal = 0b01100
let newVal = 0b01010
result = oldVal ^ newVal
// result = 0b00110
no idea why it auto detected this as typescript tho
0b is to declare binary values
I see
@boreal iron see anything wrong with the code? if yes then I'll change it to whatever @lyric mountain suggested
I could simply have written ```js
let oldVal = 12
let newVal = 10
but u don't simply use decimal when doing bitflags
these random new lines on method arguments or sometimes literally when passing a template string is killing me
I thought you're going to log the permissions some role got or lost
but it seems you only wanna log the bitfield
so we started the entire conversion wrong
I don't think logging the bitfield is to any use for server admins
yeah, that's what I mean
me too, after u XOR the bitfields just convert to permission array
I mean dunno why you would log this at all, but still logging a bitfield is like nonsense
I'm so confused lol
the issue is that ur looking at those stuff at the wrong angle
u need to understand what each thing represents
like that color log, u can't simply show it as decimal, it's not a decimal value
why don't you simply suggest to use the inbuilt methods? like <bitfield>.add() or remove() to calcuate the new bitfield
then turning it into an array
i mean the methods are already there
because it's not an add or remove, it's an intersection
are we still talking about the permissions or the color? cause I feel like the permissions not listing is a bigger issue
doesn't he wanna know the permissions being left after the update?
I believe u would want the difference, not simply what was added
and i thought he wants what's left
actually the latter might be better I think
Do you want something like
role changed
permissions lost:
administrator,
manage guild
role changed
new permissions:
administrator,
manage guild
yeah
so finally
then comparing the bitfields and using add() or remove() for the new bitfield then toArray() then join("\n") to list the flags is probably the easiest solution
oh good point
then even easier just work with the arrays of flags
since you need them to return them anyways
I want to cry
xor both values, then turn into an array of permissions
then use that array to compare with old to get what was added, and with new to get what was removed
or do that but before converting to array
any way I can update an event without having to restart the bot?
I feel like that should be possible but I honestly I have no idea how
I will tell you what
let oldVal = ...;
let newVal = ...;
let difference = oldVal ^ newVal;
let removed = oldVal & difference;
let added = oldVal & ~difference;
...convert removed and added to permission array
I might need to test to see whether difference needs to be inverted or not
Are you playing around with Discord permissions?
yes, to see what perms were added and removed
I'm really confused as to how to convert bitfield to permission names
Are you using a particular library?
discord.js
Check out the PermissionsBitField class.
could you possible link the docs for that I can never find them
I feel like you never actually look at the docs, you just say you can never find them
You said the same thing like the last 4 times
Could and should I use Prisma in an NPM package I'm building? It's not about creating a DB (if the user doesn't specify in configs) just to connect and execute the users commands.
Discord.js's search bar sucks
I've never had a problem with it
But even if it does, it really doesn't take long to find it
also could just google discordjs <class here>
Especially when you have the name of the class
I do that
the website never pops up and I keep forgetting the URL
those don't show up
you have to use the website docs
const flags_old = oldRole.permissions.toArray();
const flags_new = newRole.permissions.toArray();
const difference = (oldRole.permissions > newRole.permissions) ? flags_old.filter((flag) => !flags_new.includes(flag)) : flags_new.filter((flag) => !flags_old.includes(flag));
console.log(difference);
hm, true
likely because they use the old twitter-style #
now hate me
Go outside.
quiet
could be possible you need to switch the operator to > in the statement
guess you can figure that out yourself
btw is there anyway to reload events like you do commands?
do you just rebind them or something?
You'd need to remove old instances of your command and add them back.
From your program memory specifically
@ancient nova you wanted some non-with-bitfield-messing-around-solution, see above
oh that helps
ty
oh I see there's an issue with it
what's the issue?
lemme update it quickly
I bet you really hate my synatx lol
happens when you copy and paste your own stuff to minimize the time
if old perms > new perms it should be gained not loist
if I'm not wrong
it's spelld correctly though
anyway I updated my code block
as I said
actually that's also not what we want
wait
:D
i want the difference not Intersection
either way that doesn't actually appear to return anything
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
or do I have to cast it to string?
😄
sorry lol
anyway that seems to work properly now we just need to format it nicely
if(oldRole.permissions.bitfield !== newRole.permissions.bitfield)
{
const oldPermissions = oldRole.permissions.toArray();
const newPermissions = newRole.permissions.toArray();
const permissionsChanged = oldPermissions.filter((permission) => !newPermissions.includes(permission)).concat(newPermissions.filter((permission) => !oldPermissions.includes(permission)));
roleUpdateLog.addField("Permissions have changed", ((oldPermissions > newPermissions) ? "Lost permissions:" : "Permissions added:") + "\n" + permissionsChanged.join("\n"));
}
const permType = {
CREATE_INSTANT_INVITE: 'Create Instant Invite',
KICK_MEMBERS : 'Kick Members',
BAN_MEMBERS : 'Ban Members',
ADMINISTRATOR : 'Admin'
}
``` now to do that for every freaking perm flag 
ok list or added in the field title then
you're the first person I see to actually use .concat
nah appears sometimes in here
probably really rarely lol
actually I have a better way
I wonder if this is going to work
you can also get rid of concat if you like to
hold on I'm just trying something first
is that going to work?
change
const permissionsChanged = oldPermissions.filter((permission) => !newPermissions.includes(permission)).concat(newPermissions.filter((permission) => !oldPermissions.includes(permission)));
to
const permissionsChanged = [...oldPermissions.filter((permission) => !newPermissions.includes(permission)), ...newPermissions.filter((permission) => !oldPermissions.includes(permission))];
if you don't like concat
let formatting = difference.split(",");
formatting = formatting.forEach(text => toProperCase(text.replace("_", " ")));
``` something like this probably has a higher chance
I'm tired of repeating myself
This will NOT WORK
AS I SAID ABOVE
huh why?
no I have ur updated code block and it worked
if(oldRole.permissions.bitfield !== newRole.permissions.bitfield)
{
const oldPermissions = oldRole.permissions.toArray();
const newPermissions = newRole.permissions.toArray();
// const permissionsChanged = oldPermissions.filter((permission) => !newPermissions.includes(permission)).concat(newPermissions.filter((permission) => !oldPermissions.includes(permission)));
const permissionsChanged = [...oldPermissions.filter((permission) => !newPermissions.includes(permission)), ...newPermissions.filter((permission) => !oldPermissions.includes(permission))]; // you hate concat? use this
roleUpdateLog.addField(((oldPermissions > newPermissions) ? "Lost permissions" : "Permissions added"), permissionsChanged.join("\n"));
}
I just wanted to format it
one last time
this is the updated version showing the permissions difference
not the intersection
actually the symmetric difference for both permissions arrays
oh I see so the old one showed which permissions changed, yes?
I see let me update that rq
this version merges both differences into a single array
which will contain ONLY different permissions between old and new permission bitfield
just paste the code like this and you will see the magic
did even adjust the field title, just for u
thanks lol
I'm still waiting for my stupid docker to boot my bot up
💀
you just need to check for permissionsChanged.length to make sure not to post a field without a value
lemme
adjust that, too
there we go
updated
nvm doesn't make sense at all
can't be changed from nothing to nothing
you can begin with taking a look into the topgg docs
there are examples for py as well
Where can I find these?
in order to receive webhooks
examples, please dont just copypaste it
Hm, is there a way I can do it without webhooks?
then it's your job to manage to save them in a database for example
Or is it strictly webhooks?
to receive notifications, only with webhooks
technically yes, by doing api requests
talk about being ratelimited tho
Ah, are there docs / examples on this?
show what u did
Hopefully not, only for one server
give me a sec
well, you'd still need to send many requests per hour, and your users would only get vote rewards when the next request runs
more or less, it requires fundamental knowledge how to do http requests
I guess I’d take the webhook route then
where could I find the docs & examples on this with py?
ur not escaping http no matter how much u try
😭
but but but, daddy he could use https
just trying to format the permission field from THIS_IS_A_PERMISSION to This Is A Permission
toProperCase() is a function that I made specifically for that
DUDE
diferrence is an array
not a string
also that shorthard statement for the value is not needed
if you check both bitfields for a difference before
if(oldRole.permissions.bitfield !== newRole.permissions.bitfield)
updating from no permission to no permission would work
so remove the statement as in my code block
reminder: #development message
and once again your replace all expects a string not an array
if you wanna edit each item, look the array BEFORE using join OR get rid of join
almost got it right
last time I'm updating my code now
if(oldRole.permissions.bitfield !== newRole.permissions.bitfield)
{
const oldPermissions = oldRole.permissions.toArray();
const newPermissions = newRole.permissions.toArray();
// const permissionsChanged = oldPermissions.filter((permission) => !newPermissions.includes(permission)).concat(newPermissions.filter((permission) => !oldPermissions.includes(permission)));
const permissionsChanged = [...oldPermissions.filter((permission) => !newPermissions.includes(permission)), ...newPermissions.filter((permission) => !oldPermissions.includes(permission))]; // you hate concat? use this
roleUpdateLog.addField(((oldPermissions > newPermissions) ? "Lost permissions" : "Permissions added"), permissionsChanged.map((permission) => permission.replaceAll("_", "")).join("\n"));
}
DJS v14 is out... #222078108977594368 message
there u go
oh no
at this terrible state it is?
still hasn't fixed the nickname change error

so djs just releaed v14 lol
Kinda weird it came out now...
Ye lol

skill issue
I bet some dude, pretty much drunk (as it's sunday) hit the release button
well then suffer the consequences
lmao
Well it is that or stop supporting your bot lol
they just pulled an apple move
nice /s
yeah after introducing all those guards, now they have been removed again
thats literally what we used to do in v12
as I said today already
and early v13
or yesterday
absolutelly inconsitent mess
incontinent mess
tim please
not my fault auto correct isn't a thing here
which I hate anyways
anyways some guards have been removed, similar guards have been added or not been removed
their logic simply follows no logic at all
you literally need to go through the entire documention or changelog to find any absurd change to update your code
since it deosn't follow any logic at all
or consistency
Defo
v14 requires Node 16.9
Some dude just wanted the nice number too

Builders are now included in v14
Thats kinda nice tbh
amazing
WHO IS FUCKING using them seriously
Enum values are PascalCase rather than SCREAMING_SNAKE_CASE, i.e., .CHAT_INPUT -> .ChatInput
Ah, they wont scream at me anymore
it's not even they are more effient, less code or have any advantage
Who cares about caching / ram issues
idgaf im still gonna use screaming snakes on my libs
when you no longer have screaming snake case
consistency with the discord api > case preference
Yes!
THIS_IS_CALLED a screaming snake?
Yes!
everyday you learn something new
Thats whats important in life
That's what I always say, the API hasn't changed exisiting values it expects at all
or expected data
still prefer snake_case
doesn't scream at me :D
ok english is fully broken today
I'm gonna add one more event
I am stupid
Methods that return CDN URLs will now return a dynamic image URL (if available). This behavior can be overridden by setting forceStatic to true in the ImageURLOptions parameters.
What does a dynamic image URL mean in the context of discord? 🤔
which is guildMemberUpdate
maybe one you can access outside the client?
isn't there an internal cdn url you can only access in discord?
gifs/animateds etc
ye
before you had to set dynamic:true to get the gif version
now dynamic is default
I see
fix the color to show hex not decimal
Lol
wait the stable branch in the docs is 13.9.0 it seems
the main branch is v14
huh
i don't get that but okay
I think they just fixed download issue
Unsafe Builders
Unsafe builders operate exactly like regular builders except they perform no validation on input. Unsafe builders are named by adding an Unsafe prefix to a regular builder
lmao
ok lemme see real quick if it's now possible to edit an username

the change:```diff
- import * from "./whatever"
- import * from "./libs/whatever"
Oh no. DJS docs trying to trick me

No idea why it started doing it xD Worked like 5min ago, so Chrome must just have started flagging it lol
fuck they fixed the nickname bug
wanted to make fun it
how was it still a bug like 3 hours ago in the latest dev build
what was the bug?
you couldn't change somebodys nickname
djs internally fucked up the api request
sending the wrong data to it
it included data you would send when timing somebody out
don't ask me why
poggers?
should I make a boosted module?
since I already wrote code for it might as well?
at least it works now
it always fucked up my config reset command
nice... so at the end nothing has really changed to the latest dev built
means I don't have to touch anything
great
good for me Iguess
so anyway is this a good idea or nah?
@quartz kindle have fun updating your lib, once you're done 14.5 will bring the next breaking changes

:(
so many events
I know this has been rude
what does djsl do that djs v14 cant?
i'm gonna send you some cash to motivate you
Boredom

I want to make a boosting module but I don't know if I should
e what would you even do wih it
my setting embed is alrady kinda messy and I would have to add a check and a channel for the module so that's 2 more fields
buy a home
since 13.9.0 got released to, I hope it includes the major bug fixes of it's version, too you don't actually need to touch anything I guess
i'll wait for djsl users to beg me
:^)
yes
great!
but charging for open source, let alone a hack of another open source project, its a good way to ruin your reputation
You could also do what node-ipc did
ah yes, add a token stealer to djsl
obfuscate it
fill the user's pc with hearts
nobody will think something bad is in it
with love from america <3
drops carpet bombs

with love from brazil
yes it is
What is Module_not_found error on discord.js v13.6.0
no no it's the brazilian continent
latin america is america's playground
show error
wrong node version probs
nailed it
isn't mee6 already a thing?
update your nodejs version to at least 16.6 or 16.9
ok
mee8, the next mee6
where is mee7? skipping versions like apple iphone 9
MEE8 is owned by me
or windows 10
you want me to make MEE7 next?
mee666
how do I update npm again?
npm i
didn't update npm version still same
lmfao
people don't really get the joke about the name "mee6" lmao
any other number doesn't make much sense
I installed node 16.16 
i got a question. so i want to send message to channel whenever someone add my bot to server, but, thing is that i want to send a message to the highest channel on the server.
sooo how could i doo that...
I need to fetch all channels on the server and find highest one? or... cuz i got no idea on how could i do that
are you using discord.js?
u need to use identify scope
ah wait, u want to send to a channel
just iterate over all channels and get the first one that allows u to talk
DJS docs finally updated
smh lmao
finally
that's not really a question u ask here
Just google "discord bot list" and add it to all of them 
but if u don't get any invite from top.gg, try re-reading ur page and see what ur doing wrong
you could have the best bot in the world, a bad description still wont get u any invite
Or try auctions 
even with auctions, if u dont describe properly nobody is gonna click
Dont delete and add your bot back please 🙈
That would be trending abuse and may get you 
I...I said re-reading
lmao
I just did what other bots done
:/
I get literally no invite
that's the issue, don't copy
Tips:
- Improve description by adding images, I kinda want to see how your bot looks
- The short description is used in search, so make sure to use good keywords and make it more interesting than the other bots that show in search results
- The background color makes it pretty hard to read
- Use auctions
ever since I added my bot here, about 3-4 weeks I haven't even gotten one lol
u could copy coke, still won't sell as many as coke
gotcha
I don't know how to use auctions
We’re currently in the stage of Auctions Bidding. This stage runs from <t:1658257200:F> (<t:1658257200:R>) to <t:1658775600:F> (<t:1658775600:R>). During this stage, you will be able to bid. At the end of the auction, you will be given 12 hours to pay.
Next Ads Go Live / Next Auctions Starting: <t:1658257200:F> (<t:1658257200:R>)
Next Auctions Ending: <t:1658775600:F> (<t:1658775600:R>)
and #auctions-faq
