#development

1 messages · Page 31 of 1

tawdry bridge
#

how to put servercount in top.gg bot

boreal iron
#

by posting your server count frequently to their API

winter pasture
#

-servercount

gilded plankBOT
unreal steeple
#

how can i add a backround onto my bots profile page on top.gg?

boreal iron
#

by adding some CSS code to add/edit the content background

unreal steeple
#

alr

brave crane
#

Hello!

sudden geyser
#

hello

unreal steeple
wheat mesa
#

what's the </a> from

earnest phoenix
wheat mesa
#

Yeah you need an alt attribute, most of the time it's required iirc

earnest phoenix
#

alt is basically just the text that appears if the image couldn't load or deleted/not found

eternal osprey
#

hey guys i recently built my exe app using electron

#

the build however came with lots of other files

#

I don't want any people to see these files

#

how can i remove/private them?

lyric mountain
#

do note, it's very possible (and easy) to decompile your exe

knotty quartz
#

^

lyric mountain
#

I did that last time to see how game scammers do it (and shame the guy in pv)

#

all you need is 7zip

#

electron exes aren't real exes (as in, binary), they're just compressed files like java jar

knotty quartz
#
if (interaction.user.id === 'id') {
    // ...
}```

How many ID's can I have in one of these or if I was using a role to make it easier?
lyric mountain
#

as many as you want

#

tho using an array would be better

knotty quartz
wheat mesa
#

arrayOfIds.includes(interaction.user.id)

lyric mountain
#

depending on what ur doing, I'd even use a database to hold the ids

#

like, filter by a specific row value

knotty quartz
#

Thanks!!! Would it be easier to use a role if all people are group up in that role and just add a guild limit to the command too?

spark flint
#

How can I make an image a circle with Canvas? Using node-canvas and trying to make discord avatars round kek

knotty quartz
lyric mountain
#

what

knotty quartz
#

Example: :moderator: Moderation Departement

#

I am already setting up a database to begin currency

eternal osprey
#

but fuck that

#

i just need 1 exe file

#

the only issue is, my code actually needs some files so i can't compile it fully to exe

sick agate
#

then don't or embed it

eternal osprey
earnest phoenix
eternal osprey
#

I have one file that's called for example, test.json

#

I want it to be hidden, but it should be usable by the exe file

#

If i now make a singular exe file it just is incapable of finding the json file

lyric mountain
#

heck they could simply edit the exe to show them the file contents

#

if u need to keep things secret, electron definitely isn't an option

eternal osprey
#

How would i encrypt/decrypt?

#

Is there any package for that?

lyric mountain
#

search

#

also make sure to cache their contents inside the runtime because...you'll not want to decrypt it everytime

wheat mesa
#

The only true way to keep things secret is to have a server give a response that is crucial to your application that your app doesn’t have access to natively. Anything can be decompiled, after all it needs to have instructions executed on the CPU at some point in the pipeline, no matter what level of “encryption”

lyric mountain
#

I mean, yeah but barely anyone would try to decompile a real exe

#

for electron all u need is to right click -> extract

wheat mesa
#

I’m just saying that if true security is your goal, it’s likely not going to be achieved

eternal osprey
#

but that's why i don't give a fuck about security with this particular program

#

only me and my friends will be using it

#

so they can decompile, eat or lick their screen

eternal osprey
#

For the people curious, I actually found an electron lib that saves data FOR you, all encrypted.

#

Really cool. That way i won't need to require any files next to the exe and it still saves the data you need

wheat mesa
#

I mean, the data is all gonna be on the computer somewhere

#

Most likely AppData

eternal osprey
#

Yeah it's encrypted with sha tho

#

the package automatically encrypts/decrypts whenever reading/writing to the data

lyric mountain
#

sha isn't encryption

#

it's hashing

#

Secure Hashing Algorithmn

spark flint
#

ok so i store timestamps of bans in a Mongodb database, how could I filter by last 7 days?

#

timestamps are stored in the format of ok so i store

#

nvm i found out about $gt

rigid maple
#

I want to do something like this in Konva, but I can't get the middle point of the top line because I can change the size and location of the text.

#
generalTransformer.findOne('.top-center').position()
```When I looked on the internet, I found something like this, but this does not affect because I changed its location, so the x position and y position are wrong.
wary forge
#

When is Discord removing text commands?

#

As far as I remember, they announced that all applications must use slash commands

quartz kindle
boreal iron
#

Either they have the message content intent or the bot can get mentioned to receive the message content

lyric mountain
rigid maple
lyric mountain
#

u have the box size saved somewhere don't u?

rigid maple
#

I solved the problem```js
deleteButtonGroup.position({ x: x + (width / 2), y: y });

feral aspen
#

Cause I find it as normal english. ;-;

wheat mesa
#

I mean yes and no

lyric mountain
#

yes it it, a shitty way to code in javascript but it is

#

they even tried to mimic how we do in groovy

boreal iron
#

Tf is that

cinder patio
#

this is testing

#

is it really code?

#

no not really

#

it's code that tests your code

earnest phoenix
#

Can someone help me? I don't get what this issue is from. It was working perfectly before.

      "service_worker": "page.js"
    },```

Error: `Service worker registration failed`
#

The top code is for manifest.json and the error is what chrome is throwing at me

bright wyvern
#

Hey anyone has idea about how i can send mail via Gmail app from my custom domain

lyric mountain
# earnest phoenix ^
  • "It was working perfectly before" why do everyone always say this? it wasn't, if it was it'd not break out of nowhere
  • Details: where are you hosting? what language? what framework? Is it a bot or what?
  • No need to bump if the original message is 1 message away
lyric mountain
lyric mountain
#

that's not gmail is it?

bright wyvern
#

I bought a domain

#

And i want send emails from that domain by using gmail

#

App

lyric mountain
#

having a domain doesn't give you a custom email

#

all it gives you is the domain itself

bright wyvern
lyric mountain
#

"bought"

bright wyvern
#

Wdym

lyric mountain
#

you didn't buy anything if it was "free"

bright wyvern
#

I am just using improvmx.com for forwarding emails and yes it's free

lyric mountain
#

did you buy a domain or a professional email?

bright wyvern
#

I bought a domain name

#

priyansh.xyz

#

And i have mail

#

contact@priyansh.xyz

#

I am receiving mails through it

#

On my gmail address

#

But i ain't send it

lyric mountain
#

well, idk exactly how improvmx works (tho I'd never use it because "free" is never free), but can't you just create a rule in your gmail?

#

like, redirect any email received in yours

bright wyvern
#

That's it

lyric mountain
#

yes, doesn't make it less sketchy

bright wyvern
#

Hm?

#

Can i dm u the video link i am following?

#

@lyric mountain

lyric mountain
#

no

bright wyvern
#

O

#

K

lyric mountain
#

why do you need to mask your email btw?

bright wyvern
#

Mask?

#

Wdym

lyric mountain
#

redirecting is basically the same as masking

bright wyvern
#

This one i tried

solemn latch
#

doesnt google charge $10 a month for sending emails through smtp?

bright wyvern
#

Nope

#

If u owned domain

#

It wont

solemn latch
#

I own my domain and I pay $10 a month

lyric mountain
#

owning a domain doesn't give you the right for a custom email

solemn latch
#

for what you're asking for

lyric mountain
#

it only gives you the right to the domain

sudden geyser
#

on google domains I think it comes included

bright wyvern
#

Yes

solemn latch
#

oh cool

#

I didnt know that

#

Did you buy your domain on google domains?

sudden geyser
#

which contributes to why it's expensive

bright wyvern
solemn latch
#

then I think to use gmail in the way you intend to youll need to pay $10 a month

bright wyvern
#

wait can u just tell me how i add it

#

I am ready to pay for it

solemn latch
#

👀 did google get rid of the individual workspace plan?

lyric mountain
#

If I understood what they want, it's basically:

  • Someone sends an email to thedomain.xyz
  • The email gets forwarded to personalemail@gmail.com
#

is that right?

solemn latch
#

the other way around

boreal iron
#

no

#

correct

solemn latch
#

sending an email

bright wyvern
#

I did already setuped it

boreal iron
#

his mx record route the mail to google

lyric mountain
#

please explain what u want exactly

solemn latch
lyric mountain
#

cuz I'm confused af

solemn latch
#

once you buy an account they link to their guide on how to do it

lyric mountain
bright wyvern
#

I want to send email through contact@priyansh.xyz
To any mail

boreal iron
#

no it's simply using a different mail server than your own

lyric mountain
#

it'd be cheaper to just buy the email no?

boreal iron
#

you can literally lead the mx record to any FQDN

solemn latch
lyric mountain
#

unless u send a ton of emails per month

solemn latch
#

for me

boreal iron
#

and then use the mail server/service of a third party provider

boreal iron
#

big companies use Google or Amazon as relayer in general

#

to NOT land in spam

bright wyvern
#

Nala u here?

solemn latch
#

I'm always around

boreal iron
#

u still wanna make sure to have valid spf, dmarc and dkim records

#

if the reciever checks the origin

#

(once provided in the mail headers)

lyric mountain
#

ah yes, the email spiral of madness

bright wyvern
#

Ic

bright wyvern
#

I want to setup that

#

But as i bought domain from other website

#

It give require some other values

#

And i just confused about that values

boreal iron
bright wyvern
#

Like SMTP server and all

boreal iron
#

This form simply sets a custom reply-to header

bright wyvern
#

Hm

boreal iron
#

You send emails from ANYWHERE adding any email address as sender u want

bright wyvern
#

Yes

#

Ik

#

That

boreal iron
#

or simply add a custom reply-to header means the sender email will be shown as the relayer email (gmail) but once somebody clicking reply the recipient is your domain

#

that's all you enter there

bright wyvern
boreal iron
#

a custom name and your email address

bright wyvern
#

In SMTP server
Username and password

#

Password of what?

#

🐔

boreal iron
#

you don't have an own smtp server

bright wyvern
#

wdym?

#

is SMTP server like from where i am getting mail of what?

lyric mountain
#

yes

#

known as "email server"

bright wyvern
#

In present i am using improvmx.com to forward mails to my gmail

#

By that domain mail

lyric mountain
#

that isn't an email server

boreal iron
#

smtp(rotocol) is used to send mails

#

and is part of your own mail server u don't have

bright wyvern
#

I don't get it

#

How i own one?

boreal iron
#

whatever form ur filling out there isn't the one u need

boreal iron
# bright wyvern

if you own a gmail account, then u enter your gmail account data here

bright wyvern
#

Yeah

boreal iron
#

to use it as sender

bright wyvern
#

And what in SMTP?

#

gmail password in password?

boreal iron
#

should be smtp.gmail.com

bright wyvern
#

Ok i try

lyric mountain
#

sometimes I think people nowadays trust way too much "free" services to put their own credentials there

solemn latch
#

just a heads up, when using smtp.gmail.com google will flag those emails as spam

boreal iron
#

that form is a google site

#

isnt it

solemn latch
#

to anyone who receives them

lyric mountain
boreal iron
#

it is

lyric mountain
#

this one

bright wyvern
#

It shows like this

solemn latch
#

google generates a password when you request one.

bright wyvern
#

What?

#

I entered my Google account password there

#

It that correct?

solemn latch
#

nope

bright wyvern
#

Then what 🥲

boreal iron
#

could be possible gmail doesn't allow auth outsite it's own domain without whitelisting it

bright wyvern
#

huh?

solemn latch
#

its not your google account password.
gmail smpt use tokens

#

its just that field is labeled password

bright wyvern
#

From where i get the token?

lyric mountain
#

gmail used to use pass but changed last year iirc

boreal iron
boreal iron
#

why not making things more complicated than needed

lyric mountain
#

I mean, using tokens for sensitive internet stuff if pretty standard

#

with tokens you can restrict what kind of operations it can do

boreal iron
#

he should just have bought his domain incl a webhosting package

#

usually including mail service

lyric mountain
#

domains are cheaper, yes, but you also need to consider the fuckton of trouble you'll have for being cheap

#

at least regarding custom emails

boreal iron
#

you aren't forced to use google a mail relayer

sick agate
sick agate
#

i didnt know that

#

i think you cna still do that though

lyric mountain
#

nope, they don't allow pass anymore for non-site requests

sick agate
#

oh

#

i remember using it,

#

but a year ago though

lyric mountain
#

my work uses gmail in the software, and we had to refactor a shitton of code due to that

sick agate
#

KEKW feels bad

sudden geyser
#

my work uses gmail in the software
civilized place

lyric mountain
#

they also concat sql queries, but what could go wrong right?

sudden geyser
#

Barbaric!

thorn spruce
#

Hey guys, someone know why when I grab data from my JSON file and put them in an array, when I edit it, it updates my JSON file in the cache?

(I do not grab the whole file only some parts and im working in class)

sudden geyser
#

Confused. Can you describe your situation more clearly?

thorn spruce
#

yep

#

I get my json file to create a temporary data array that I will use in my class.

const f = require(`../json/Floor`);

After i build the temporary data array

        let mobs = [], maxMobs = await this.getMaxMobs();
        for (let index = 0; index < maxMobs; index++) {
            let rand = getRandomInt(1, 1001);
            for (const key in this.floorData["random"]) {
                if(this.floorData["random"][key] >= rand) {
                    mobs.push(this.floorData["mobs"][key])
                    break
                }
            }
        }

And after that i modify this array. however once I made the edits I see that it has edited the json file in my cache and considering that im not only using this class only one time my cache is "Broken"

sudden geyser
#

Where is f being used in your code?

#

I imagine the issue could be with mutating the objects since they're likely passed by reference rather than value (and hence changed in multiple places)

earnest phoenix
thorn spruce
rustic nova
sudden geyser
#

immutable objects for the win

lyric mountain
#

do you maintain it regularly?

earnest phoenix
#

Never gotten that error before

#

Stack over flow said you need a script manager or something? I never did that it doesn’t work still

lyric mountain
#

I don't know much abt extension development, and ig you're in shallow water in this server

earnest phoenix
#

Yeah

lyric mountain
#

isn't there a chrome server on discord?

earnest phoenix
#

I’ll wait like a few days ig

#

I doubt it

#

I’ll check tho

#

Nope, or I don’t think so at least

manic topaz
#

hey guys, i was wondering is it against discord's rules if you log the username and stuff when the user uses a command and you contact them to ask them how they like the bot?

lyric mountain
#

if you keep the log private (as in, only you have access to it) I don't think it's against ToS, it's actually recommended to have a log of command usage should you need proof someone did something

#

as for the last part, that's not allowed at all (I believe), you should never prompt an user without request

manic topaz
#

But the request would be a friend request

lyric mountain
#

again, no

#

the users are in their own islands (server), you cannot invade their island without explicit authorization

#

it should always be user <--> bot, isolated

manic topaz
#

But I won't go in the server, I just want to speak to a user by sending him a friend reuest

lyric mountain
#

yes, you can't unless you're already in that server

#

because the user doesn't know you, you cannot use your bot to send invites to strangers

manic topaz
#

Yeah but bro, If I have his username and # I will just go send him a friend request, if he doesn't accept that ends there no?

lyric mountain
#

*sigh*

#

imagine there's a wall between you and the users

#

you can see everything on the other side, but no matter what, you cannot pass that wall unless the user allows

#

as a dev, you can see all but must not interfere unless required

#

if something is only possible because your bot has said data, then you shouldn't do that something, simple as that

manic topaz
#

ayt thx

summer vessel
#

-_-

knotty quartz
#

I am creating a if statement to determine if a person has a role to display a message.

I ran into a slight issue: ```js
else if (interaction.member.roles.has = '1005932952993136680')


I have tried `=` `==` and `===` it only displays the correct message on `=` but for everyone even if they do not have that role

Have I made an error?
quartz kindle
#

yes

#

.has is not a property

#

its a function

elfin tulip
#

Hello, I would like to know how can I fetch message in the DMS channel? (discord.js)

knotty quartz
#

I put it as a function and it said has is not a function..

#

I am so confused

quartz kindle
#

if you're using discord.js v12+ they changed it to .roles.cache.has

knotty quartz
quartz kindle
#

or you want to fetch the last X messages?

elfin tulip
quartz kindle
#

you need to get the DMchannel first

#

you can use await user.createDM()

#

this method returns the DMchannel

#

then you can do DMchannel.messages.fetch(id)

quartz kindle
#

👍

elfin tulip
#

Hello, so I tried this:

const user = client.users.cache.get("id");

const message = user.dmChannel.messages.fetch("id")

const verify = new MessageActionRow()
.addComponents(
    new MessageButton()
        .setCustomId('verify')
        .setLabel('verify')
        .setStyle('SUCCESS')
        .setEmoji('✅')
);

message.edit({ components: [verify] })

and it doesnt work.
Error:
TypeError: message.edit is not a function

wheat mesa
#

You need to await fetching the message

#

Usually any sort of functions with “fetch” in the name return Promise<Something>

boreal iron
#

Also need to create the DM channel as Tim wrote above

wheat mesa
#

In this case it’s Promise<Message>

boreal iron
#

More like Promise<Collection>

quartz kindle
#

only if you fetch multiple

wheat mesa
#

And at the point it would be Promise<Collection<Snowflake, Message>>

boreal iron
#

I don’t see any limiting option?!

wheat mesa
#

He’s fetching one of

wheat mesa
#

Id*

boreal iron
#

Oh lol nvm

#

Mobile view sucks

wheat mesa
#

Skill issue

boreal iron
#

id is in the next line

#

(for me)

quartz kindle
boreal iron
#

Actually it’s not guaranteed they exist

quartz kindle
#

well yeah, guaranteed provided the channel id is valid and exists

boreal iron
#

User could be non-existing or DMs could be denied

#

Or not?

quartz kindle
#

you can still fetch messages

#

for example messages from before you got blocked

#

afaik

#

you just cant sent new ones

boreal iron
#

Ah

quartz kindle
#

it only works if the user is active and already sent messages to your bot since it started

#

if you restart your bot and try using user.dmChannel without the user being active in the bot dms it will not work

boreal iron
#

Hmm interesting

#

Can you fetch the messages if you send a message to the user in DMs?

#

Like older ones

quartz kindle
#

you should be able to yeah

boreal iron
#

So then it should be recommended here to catch the createDM() promise I guess

elfin tulip
#

Thanks Tim ☕

boreal iron
#

Also Tim…

#

Your code comments aren’t that beautiful like Bae‘s

quartz kindle
#

lmao

wheat mesa
#

This

lament rock
#

The alternative is writing no comments like I do

#

I and only I understand my code and that's ok

sudden geyser
#

The best code is the one that documents itself.

lament rock
#

type T<t> = t extends infer R ? R : never;

#

idk if that works or not

#

might not

quartz kindle
#

can anyone help me with something in my server?

#

i added a new slash command and for some reason i cant see it

sudden geyser
#

Was it local or global

quartz kindle
#

it was local

#

got someone to check, they also cant see it lol

#

shows up in integrations but doesnt in chat

#

deleted it and created it again and it works now

#

nothing a good old "turn it off and turn it on again" doesnt solve

solemn latch
#

Its always important to remember the difference between possible and a good idea.

wooden ember
#

how to i time something in js

#

like asin make a time stamp then do some stuff and make another time stamp?

#

then subtract them

lyric mountain
#

?

#

duration = end - start

wooden ember
#

i want to know how long it takes for an operation to happen

#

like my ping command makes a time stamp when it sends a message then subtracts it from when my message was sent (and then devides it by two so its not round trip)

#

bacically that but eithought needing the message timestamp

lyric mountain
wooden ember
#

yeah i know how the math works

#

idk how to do that in code

#

the only other way ive times stuff is using console.timer or whatever its called

lyric mountain
#

const duration = oldDate - new Date()

#

ig

wooden ember
#

how to i get the date in the first place

lyric mountain
#

...

#

new Date()

#

ah wait

wooden ember
#

thats not the time in ms is it?

lyric mountain
#

Date.now()

lyric mountain
wooden ember
#

oh nice

lyric mountain
#

but I forgot abt .now()

#

use it since it's static

wooden ember
#

cool

lyric mountain
#

if you crave for precision, there's another method for getting nano

#

but it might be too precise for a ping command

wooden ember
#

its not for ping that was just me explaining how i times stuff in the past

#

its for timing how long it takes to run commands and reload them

lyric mountain
#

date.now should do

#

you don't need nano precision for such simple thing

wooden ember
#

fair enough

quartz kindle
#

i usually use performance.now()

lyric mountain
#

that's the nano thing

quartz kindle
#

but process.hrtime is technically the best option

#

just not as straightforward to use

#

performance.now() returns milliseconds with decimals, process.hrtime returns two separate values: seconds and nanoseconds of a second

#

theres also process.hrtime.bigint() which returns total nanoseconds

#

but bigints are slow so... xd

wooden ember
#

bruh whilst the more random diagnostic data the better most of that went over my head

#

ima just stick with ms

#

its enough resolution to have an idea on whats happening

#

all working

#

thx guys

#

and yes i use code blocks instead of embeds im sorry

earnest phoenix
#

Without the usage of those []

wooden ember
#

true but that looks really bad on mobile last time i checked atleast liek this on mobile its the same just not coloured

#

cuz mobile shows all the escape characters and that in the text

earnest phoenix
#

Yeah I guess, Discord iOS builds never supported syntax highlighting so that's a bummer, but the Discord Android builds do support it

wooden ember
#

they did

#

its reverted now

#

well my old phone it works but my new one it doent

#

some how

earnest phoenix
#

Probably a version mismatch

wooden ember
#

yeah

quartz kindle
#

didnt they unify the platforms?

wooden ember
#

but its updated on my new phone

quartz kindle
#

made android the same as ios

wooden ember
#

as far as i know ios is still lacking the syntax stuff

earnest phoenix
#

Yeah, the Android clients are rewritten in React-Native, but at least the Android builds still support syntax highlighting unlike the iOS builds

wooden ember
#

well ill have to see if i can reinstall it

#

my old phone was like some 5 year old bargin brick

#

always thought it was my bad internet that images took a bit to load on discord and instagram

#

but no was just the cpu and dying storage

#

1gb ram moment

earnest phoenix
#

is it possible if a mod can change my bots id on the website?

quartz kindle
#

why did your bots id change?

earnest phoenix
#

i kind of deleted my bot but then i regret deleting it so i dont wanna resubmit it and wait days

lyric mountain
#

guess what?

quartz kindle
#

you guessed it right!

bright thorn
#

Is there any way to give 1 message for cooldown after that ignore if the user is spamming a command

sharp geyser
#

you can store the users who used the command in a map, and if they exist in the map before the cooldown is over just ignore execution. Ofc after the cooldown is over you wanna remove said person from the map somehow

#

This is one method I could think of

bright wyvern
sick agate
#

nice

rigid maple
rustic nova
#

ansi isnt supported on mobile

earnest phoenix
earnest phoenix
elfin tulip
#

Hello, how can I get description of this embed? (discord.js)

#

I tried message.embeds[0], but it just gives me error

Error: TypeError: Cannot read properties of undefined (reading '0')

sharp geyser
lyric mountain
civic scroll
#

Collection does not have property embeds

#

so it's undefined

#

and you tryna read 0 from it

#

ofc it's gonna error

#

you wanna get the first element of that collection <Collection>.first() then you may access the embeds field

messages.first().embeds[0]
elfin tulip
#

Oh 🤦‍♂️

#

Thank you so much!

civic scroll
rotund river
#

hello, i need help with express

#

i use express for my verify bot, and i set a reverse proxy with nginx

#

it upload the file is on the directory assets (css and js) but it doesn't upload the js directory

#

why?

#

i tried to put the js directory into the css, but it doesn't upload it

solemn latch
#

are you actually importing the js anywhere in your html?

#

ie
<script src="js/myscript.js"></script>

rotund river
#
        <script type='text/javascript' src="../js/particleground.min.js"></script>
        <script type='text/javascript' src="../js/particles.js"></script>```
pale vessel
#

Check the console

rotund river
solemn latch
#

what does ../ do in src 👀

lyric mountain
#

up one directory

solemn latch
#

for html script imports?

#

doesnt /js just do /js

lyric mountain
#

I believe /js would look at the root folder called js

#

while ../js would go up one directory and inside js

solemn latch
#

I didnt know html could process stuff like that

#

neat

lyric mountain
#

I usually see that for icons 'n assets, relative paths are blessed

solemn latch
#

I'm not a web developer flaze :p

lyric mountain
#

flaze? 💀

solemn latch
lyric mountain
#

lmao

#

flaze stalking here right now

rotund river
#

this is the express line:

app.engine('html', require('ejs').renderFile);
app.use(express.static(path.join(__dirname, '/assets')));
app.use(express.static(path.join(__dirname, '/assets/js')));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));```
solemn latch
#

oh yeah sorry we got distracted

lyric mountain
#

the issue is where ur html is looking for stuff

#

it's looking for an url, not filepath

rotund river
# lyric mountain it's looking for an url, not filepath

i don't know very well html, in this method it's not correct?

        <script type='text/javascript' src="/js/jquery.min.js"></script>
        <script type='text/javascript' src="/js/particleground.min.js"></script>
        <script type='text/javascript' src="/js/particles.js"></script>```
timber fractal
#

why does new Date() always return the same date in my case?

lyric mountain
#

did u change the code since ur last snippet?

rotund river
#

and why css load and js not

lyric mountain
timber fractal
#

i dont think so

lyric mountain
#

show code

lyric mountain
rotund river
timber fractal
#

i mean, there is a lot of other code in there so i cant show it at once

lyric mountain
lyric mountain
rotund river
timber fractal
lyric mountain
lyric mountain
timber fractal
#
    console.log({ msg: "test", time: new Date() });
earnest phoenix
timber fractal
solemn latch
#

one possible reason date might not update is some platforms lock it.

rotund river
pale vessel
#

I hope you put it inside a function

rotund river
solemn latch
#

nope thats not one of them ^_^

timber fractal
#

weird

solemn latch
#

I meant stuff like cloudflare workers

timber fractal
#

ow like that

#

anyway, would there be any way for me to fix this?

earnest phoenix
#

Node.js is independent of those time locks

#

You're probably doing something very obscure, can you show the code around the part where you're getting the date?

#

And is it inside a function?

rotund river
#

i think it's a problem of express, maybe i need to specify the file to pubblicate?

timber fractal
#

i do use a replaced console.log function though

earnest phoenix
#

Then that can probably be the reason, it could be using the older logs for whatever reason

timber fractal
#

oh dang it

#

i found the issue

#

i was using an older date instead of the new date

#

lol, thanks for all the help

rotund river
#

how can i resolve?

winged juniper
#

is there anyway to put SubcommandGroup in a SubcommandGroup?

earnest phoenix
pale vessel
#

I don't think so

winged juniper
#

then i cant make my bot to slash command💀

lyric mountain
#

I'm back

lyric mountain
#

ah nvm

#

try using the very same path as your css

#

just replacing the folder name

rotund river
#

On assets

rigid maple
ancient nova
#

SyntaxError: Unexpected token < in JSON at position 0

#
const data = await response.json();
#

anyone know of a good way to prevent this error?

lyric mountain
#

see what response is returning

#

< tells me it's returning an html page instead of a json

#

what are u trying to fetch?

ancient nova
lyric mountain
#

probably

ancient nova
#

it's the phishing API db

lyric mountain
#

you should be checking the status returned before u try to parse it

#

anything that's not in 1xx/2xx range should be treated as error

ancient nova
#

I see

lyric mountain
#

tbh even 1xx because those are informational statuses

ancient nova
#

I'm not sure how to check for them now as the error only happens sometimes, it's kinda annoying when it does happen tho

#

should I just check if the status isn't 200?

lyric mountain
#

response.status

#

ig

lyric mountain
#

or Math.floor(status / 100) === 2

#

that's probably better

ancient nova
#

alright thanks

frigid robin
#

Is there a way to check if a user is a server administrator OR has a specific role with the convenient decorators, without creating a custom one?
Example:

@commands.is_owner()  # Either this
@commands.has_permissions(administrator=True)  # OR this
async def somecommand()
earnest phoenix
solemn latch
#

Dont owners inherently have admin?

earnest phoenix
frigid robin
#

but not the other way around

earnest phoenix
#

just keep the @commands.has_permission then

solemn latch
#

you could just check admin and it would cover both.

#

*should

frigid robin
#

if I'm the owner of the bot but not an admin in the server where it's used, will it work just with the admin check?

solemn latch
#

oh isowner checks bot ownership?
I thought it checked guild ownership

#

Well, generally speaking bypassing permissions because you are the bot owner is a bad idea.

#

for example if you happen to join a server your bot is in you're giving yourself access to permissions you should not have

frigid robin
#

I see. I don't really mean this in a malicious way but more so I can execute some commands in the bot DM and it would recognize that I'm the owner, and also administrators would be able to run the same commands in their servers

frigid robin
#

so basically I want to allow any admin to use the commands, but in DM I want only me to be allowed

sharp geyser
#

Malicious intentions or not

#

still not allowed

solemn latch
#

I imagine discordpy wont even let you do it.

sharp geyser
#

If your account gets hijacked and some random guy takes advantage of this and reeks havoc

frigid robin
#

What about allowing either a specific role or any admin (without that role)?

sharp geyser
frigid robin
#

So the admin of a server would not have to have the "bot admin" role assigned to them

sharp geyser
#

You can just check permissions yourself

#

without decorators

frigid robin
#

I wanted to use decorators since I'm moving to prefix commands now and wanted it to be clean and efficient

solemn latch
#

moving to prefix? 👀

sharp geyser
#

you mean slash?

#

I really hope you mean slash

solemn latch
#

it would be a bad time to swap to prefix

frigid robin
#

haha nah I was simply checking message prefixes before, that's why I'm changing it cause it was bad and I know it was

sharp geyser
#

Especially since its now going to be basically impossible to get the content intent

#

You'd need a super valid reason

frigid robin
#

You're right but I'm not gonna have to move to slash cause I got the message content permission from Discord

#

I had a super valid reason 😛

sharp geyser
#

What does your bot do?

frigid robin
#

Also mod bots of course

#

they all need that intent

sharp geyser
#

I mean depending on the features the bot has

#

not every mod bot needs it

solemn latch
#

I wouldnt be surprised if they start forcing slash commands one day

#

even with the intent

sharp geyser
#

There is virtually 0 reason to use the other option

frigid robin
#

My bot learns what to reply to messages so it needs to be able to look at every message

sharp geyser
#

You are quite literally making your life a living hell

frigid robin
#

it's a really unique bot I haven't seen anyone else do it

#

and the functionality cannot be accomplished otherwise

#

Unless I literally take every message that it learned and make it a dynamic prefix which would be horrendous

sharp geyser
#

Not to mention, with prefixes people are constantly having to remember what your prefix is

#

especially if its customizable

frigid robin
#

so the prefix is not customizable

sharp geyser
#

Either way I don't wanna have to remember how to use your bot

frigid robin
#

I want all commands to have the same prefix, and then whatever doesnt get caught with the prefix will simply go through inspection of the content

tired panther
sharp geyser
#

I'd rather it be easy and just type / and look for your bots icon

frigid robin
#

It's not a trojan horse

#

not everyone is a criminal

solemn latch
#

I dont think anyones accusing you of anything

sharp geyser
#

No one said you were

solemn latch
#

just curiosity

#

its different.

frigid robin
#

sure, just sounds like everyone is trying to find what I did wrong lol

sharp geyser
#

With a bot like yours viewing every message

#

ofc

#

Especially if you store those messages

#

idk if you do

solemn latch
sharp geyser
#

but if ya do

frigid robin
#

anyone who has the message content intent does

sharp geyser
#

Hm?

#

Does what?

frigid robin
#

I do appreciate ur feedback regarding slash, I tried it but had a few issues, probably since this isn't really stable or I was missing something

solemn latch
#

slash is very stable

frigid robin
#

i say many bots do

sharp geyser
#

Viewing every message isn't really the concern

#

its a matter if you store those messages or not

solemn latch
#

mostly storing them

#

yeah

#

and especially incorrectly storing them

sharp geyser
#

Storing them is a completely different topic

frigid robin
#

but guys, I was just asking for now if u know whether I can allow a server admin - or - a specific role to invoke a command 😅 how are we discussing the malicious ways my bot can be used

sharp geyser
#

Messages are private to people outside the server or who doesn't have access to them

#

so if you store them not saying you do be careful

tired panther
#

You have to hash the content, when you store them

solemn latch
solemn latch
sharp geyser
#

You can't with decorators as far as I know

#

you have to do it yourself

frigid robin
#

yeah but the command won't get invoked if I do one of the checks with the decorators

sharp geyser
#

as for how you do it, I haven't used dpy in a while so I have no idea just read the docs

frigid robin
#

it would be inconvenient to divide my commands to certain roles and then have one without any decorator at all, checking them inside the code

sharp geyser
frigid robin
#

wdym?

sharp geyser
#

Well, before you execute any of the actual code that does something

#

do logic checks before it

frigid robin
sharp geyser
#

inside the command block

#

so if you find they don't have admin or that special role

#

halt execution of any further code in that block

frigid robin
#

guess ill do that, thanks

sharp geyser
#

I see no other way unless someone knows of a decorator to do it

frigid robin
#

or the other way would be to create a decorator that checks for either bot server admin or specific permission

sharp geyser
#

Also, it may of been annoying to talk about how malicious your bot could end up being, but I would take what we said to heart. We aren't bashing you, we just want to make sure you never get bit in the ass

sharp geyser
solemn latch
#

mmm oysters

frigid robin
#

oh that's fine mate I'm just used to lots of cynical talk in this server so I'm already assuming people are trying to find my evil intents

sharp geyser
#

Nah

#

We only care about the tos here

frigid robin
#

and I will take that feedback as well to see if I can improve it even more

sharp geyser
#

It's always good to talk to new people about that kind of stuff. Get a fresh input for a change

tired panther
#

Your terms of service looks good, would make the privacy policy more detailed + describe the process of data deletion

frigid robin
#

Thanks! blobdance

#

sounds good

rigid maple
#

frontend 💀

sudden geyser
#

Confuzzled.

wheat mesa
#

This seems misleading, just saying

#

Sounds like you work for Facebook, WhatsApp, twitter, and Instagram building their APIs

#

I would say “I work with popular social media APIs”

#

Not “I work on popular social media APIs”

sudden geyser
#

"with" sounds like one is formally affiliated with it.

#

If one were creating libraries that use said social media APIs, it would probably make more sense to write "I work on libraries that interact with social media APIs (..., etc.)"

wheat mesa
#

Maybe then “I interact with popular social media APIs to build tools for others”

rigid maple
#

"I use popular Social Media API's to create various projects" how about if i write like this

#

but I still don't know how to move the portfolio span next to the sentence

quartz kindle
#

do you have any default css on the span element?

#

sounds like its being set to block instead of inline

rigid maple
#

Same for tag a, same for tag p

quartz kindle
#

try adding display: inline

rigid maple
#

thanks

#

🧡

quartz kindle
#

its normal for p to be block, but a and span should be inline by default

#

unless you have some css that changes it globally

rigid maple
#

display: inline; worked

#

thanks

stark abyss
#

Is anyone aware of the weird way to use && in js? Like somewhere i saw (true condition) && (code to execute) I don't mean the ternary operation though

sudden geyser
#

&& means "and" in JS and runs left to right, short-circuiting when one of the conditions are falsely.

#

So true && false && console.log("Nay") will result in true and false being evaluated, but not the console.log(...) (it returns false since that's where it ends).

#

You see the pattern sometimes in React apps where there isn't support for proper if conditions so people use that instead.

#

Or sometimes by people who want to write compact code

#

I wouldn't recommend using && as a replacement for if statements or ternary expressions unless you have to.

quartz kindle
#

i use it a lot

#

you can do things like: ```js
return promise.then(x => console.log(x) || x)

lyric mountain
#

average ternary enjoyer

sudden geyser
#

spy style

function spy(x) {
  log(x);

  return x;
}

return promise.then(spy);
lyric mountain
#

promise.then(!return)

quartz kindle
sudden geyser
#

It's an awkward way of accomplishing the same thing as if.

stark abyss
#

Yeah that's true

sudden geyser
#

Plus, && eventually returns a value (either the first falsely value or the last value in the chain since everything was truthly), which may be annoying in some contexts where it's not appropriate (e.g. React's notorious "0" when rendering).

stark abyss
#

Okay 👍

spark flint
#

Is it possible to create forum channels with Discord.js?

earnest phoenix
wheat mesa
#

I'm gonna build a basic web api with rust, should I use actix-web or rocket

sudden geyser
#

I'd say try Rocket

wheat mesa
#

(I'm down to use either, just gonna try making the same basic student API in both and compare experiences for yall)

sudden geyser
#

Last time I used Rust it was still in development while actix-web was production-ready

#

So Rocket may have new interesting ideas

wheat mesa
#

I believe both are prod ready now

#

I'll try it tonight and get back to you on the experience

#

I feel like it's fun to try out different frameworks and compare the pros and cons between the two in a language I enjoy with a task that is pretty simple at its core

earnest phoenix
#

Generally Actix-Web is more mature than Rocket as it has received a lot of fixes and web-related implementations

#

But Rocket can also be interesting, so I'd say give both of them a go, do a few tests

sudden geyser
#

Though Actix-web had that one incident where the dev quit due to the community

earnest phoenix
spark flint
#
(async () => {
  await message.guild.channels.create("forums-test", {
    type: 15,
    permissionOverwrites: []
  })
})()```
#

evalling that

earnest phoenix
#

Wait, what discord.js version are you using?

spark flint
#

v13 skule

#

might be why ig

#

raw API might work ig

earnest phoenix
#

Why not update to v14? Or is that in-progress already?

spark flint
#

not started yet

earnest phoenix
#

Damn

spark flint
#

fails when making request manually as well

uneven tartan
#

what the fuck is invalid or unexpected token with this:

const sprite=require(`../assets/locations/dungeons/${ randDung }/${ randEnemy }.png`);
#

@earnest phoenix

earnest phoenix
spark flint
#

just asked someone and they said its because my server isn't in the rollout yet

earnest phoenix
uneven tartan
#

probably not

earnest phoenix
#

They would have to read the PNG file and return a bitmap of some sort, what you're looking for is probably canvas

#

To load the image, use the loadImage() function

woeful pike
#

I mean this is normal with webpack but yeah

uneven tartan
#

im just trying to send an attachment in an embed

earnest phoenix
uneven tartan
#

aye but then i get this hmm

wheat mesa
uneven tartan
#

which of these doesnt use current dir as starting point

#

its supposed to be ...\Documents\RPG-Bot\assets\ ...

spark flint
#

tried in a server with 316k and it still didnt work skule

earnest phoenix
uneven tartan
#

ohho kay

#

i kinda forgot how to code since ive had copilot

#

i cant just tab to win

#

its still reading the dir incorrectly

#

oh i think ik why

#

i got it

#

but it failed to put the image inside the embed hmmm

wheat mesa
#

honestly it's not a terrible idea

#

although I'm sure there's some sort of argument to not be doing that

uneven tartan
#

why is it failing to put the image inside the embed ive had this issue before but i dont remember the solution

wheat mesa
#

petition for @earnest phoenix to add this into js

earnest phoenix
# uneven tartan but it failed to put the image inside the embed hmmm

You're supposed to do this, this is just an example

import { AttachmentBuilder, EmbedBuilder } from 'discord.js';

...

const attachment = new AttachmentBuilder('../images/cat.png', 'cute-cat.png');

const embed = new EmbedBuilder()
  .setImage('attachment://cute-cat.png');

await channel.send({
  attachments: [attachment],
  embeds: [embed]
});
uneven tartan
#

im using v13

#

and im not using embed builder

earnest phoenix
#

Then replace AttachmentBuilder with Attachment, and EmbedBuilder with MessageEmbed

wheat mesa
#

the concept is still the same

uneven tartan
#

oh its attachments not files

#

never mind

#

attachments isnt valid outside modals

#

or i did something wrong

earnest phoenix
#

You're doing something wrong

#

Show code

uneven tartan
#
        await first.edit({
            embeds: [{
                title: `You have encountered a ${ randEnemy }!`,
                fields: [{
                    name: "Health:",
                    value: `${data.enemies[randEnemy].health}`
                }],
                thumbnail: `attachment://${randEnemy}.png`
            }],
            files: [`./assets/locations/dungeons/${ randDung }/${ randEnemy }.png`]
        });
#

too lazy to trim indents

earnest phoenix
uneven tartan
#

what could it be

#

ive had this issue before i forgot how to fix

earnest phoenix
uneven tartan
#

elaborate

wheat mesa
#

#AddingOneDependencyInRustBeLike

#

(That's only about half of it)

earnest phoenix
# uneven tartan elaborate

For example

files: [
  {
    attachment: `./assets/locations/dungeons/${randDung}/${randEnemy}.png`,
    name: `${randEnemy}.png`
  }
]
uneven tartan
#

oh whattt since when does that exist

earnest phoenix
#

And then you're supposed use the name you've given to the attachment after the attachment:// prefix

uneven tartan
#

that was a fail as well. still put the image outside the embed

earnest phoenix
#

Show code

uneven tartan
earnest phoenix
uneven tartan
#

nope

lyric mountain
#

try printing it

#

easiest way to debug

uneven tartan
#

figured it out

#

turns out thumbnail needs to be formatted like this now:

thumbnail: {
  url: `attachment://${randEnemy}.png`
}```
earnest phoenix
#

This is why you should use builders such as the MessageEmbed class, there's literally no reason to not use them

boreal iron
#

Literally no reason to use em

earnest phoenix
#

Not only do they look cleaner but they can also avoid things like this

boreal iron
#

Chaining methods over multiple lines as well as adding their arguments over multiple lines looks cleaner than an object/array with accurate brackets?

uneven tartan
#

hey volt do you remember how to filter out button pressing from people who didnt start the cmd

#

like inside of this

lyric mountain
#

compare the interactor id with the original user id

uneven tartan
#

i think there was a way to do that

lyric mountain
#

wait, a built-in method?

earnest phoenix
lyric mountain
#

d.js users have it too easy

uneven tartan
#

no i dont think theres a built in method for that

boreal iron
#

The button has a message property as reference to the original message and it’s author

spark flint
#

why not just use interactionCreate instead of awaiting it sus

uneven tartan
#

because i need to collect it one time why would i make my event listener longer

earnest phoenix
uneven tartan
#

ive done this somewhere i dont remember where though

earnest phoenix
#

For example, interaction.user.id === i.user.id

uneven tartan
#

wait yes i do

#

haha old commits. would this be valid?

boreal iron
#

But yeah

wheat mesa
#

Anyone know of some good REST API planning tools/software? I'd prefer to just have something online but if I have to download a tool I'll bite the bullet if it's appealing

boreal iron
#

Especially Since djs enforcers the API structure as arguments builders have become more useless

earnest phoenix
wheat mesa
#

Just trying to keep my plans organized here so I can ensure I build the exact same api in each framework

earnest phoenix
#

For example, the setColor() method does conversions for easier setting of the colors, the setAuthor() method sets to nested properties that the developer may not be aware of, some others also do validation, and other things

boreal iron
#

Guess we have different opinions about that like always

#

Well I’m not saying I don’t use any util

#

For colors there’s an util resolveColor()

earnest phoenix
#

That's what the setColor() method uses

boreal iron
#

Yeah so doesn’t actually matter which method I call here

#

Unless I’m passing my colors like the api expects anyways

earnest phoenix
#

But yeah I get what you're saying, the way you mention is straightforward if you know exactly what the structures look like and don't really need validation then you're free to throw the builders away, while thinking that you won't forget how the structures look like

#

Builders are just there to make things easier and better 👀

boreal iron
#

Like I said while I have to remember the structure I do also need to remember the equivalent builder methods

#

Something I have to check the docs in cases I forgot

#

No matter which docs I check

#

And still I don’t suffer ridiculous name changes of djs versions

#

As the api structure most likely doesn’t change

earnest phoenix
#

That's what the IntelliSense is for, usually when you're working with objects that have no references to the typings then you'd have to remember the properties/options, while for the builders it's always there, regardless of you remembering or not

#

And it always guides for the values you need to provide as well, while also performing validations

boreal iron
#

Well ok that’s a different perspective tbh

#

I don’t have intellisense used ever before

earnest phoenix
#

Do you know what IntelliSense is?

#

Usually when you write code, it can suggest the variables you've declared, or the functions, a list of the things you've imported, and suggest methods based on the typings, that's what IntelliSense is

#

It's available in almost every code editor and IDE, and usually enabled by default

boreal iron
#

Working with the methods it auto completes for u might be easier then

#

Well connection lost

#

Fucking trash country

earnest phoenix
#

At least you don't lose connection for hours at a time

boreal iron
#

not today

#

It’s most likely how you grew up with things

#

As I never used that auto complete feature I tend to prefer the raw object structure as I’m needed to study the docs anyways

#

And it however still looks cleaner in my opinion

#

But i get your point especially when it comes to code validation any typing checks

earnest phoenix
#

It doesn't really auto complete, but rather suggest the things that already exist, almost everyone uses IntelliSense (except for the folks that use text editors that don't really support it, such as GNU nano, Vim, etc etc)

#

But I suppose it's just preference I guess

boreal iron
#

Yeah suggesting … auto complete … I mean when you click the suggested option

#

It’s auto complete for me while yeah it’s just a suggestion

#

You have to confirm or not

earnest phoenix
#

If that's what you meant by autocomplete in this case then yes that's kinda autocomplete

#

The conclusion here is just preference I suppose

boreal iron
#

Yeah

fallen holly
#

what is this

                 ^

Error [ERR_REQUIRE_ESM]: require() of ES Module

ancient nova
#

how do I get a free domain? anything with butler in it is fine
just want do have a domain so I can make a sub for my dashboard
instead of having the domain be a sub of an already existing website

earnest phoenix
#

the most free domain is just free for one year

#

you're likely not going to find any permanently free domain

ancient nova
#

ah I see 😭

fallen holly
ancient nova
wheat mesa
#

import * as ms from "pretty-ms";

ancient nova
#

I hate import

wheat mesa
#

cry about it

ancient nova
fallen holly
#
import * as ms from "pretty-ms";
^^^^^^

SyntaxError: Cannot use import statement outside a module

wheat mesa
#

well then you've got a problem

#

can't really mix and match require and import

fallen holly
#

any alternative for pretty-ms

#

anything else i can use

#

or can i down grade pretty-ms

lyric mountain
#

you could just write ur own parser

#

millis to duration is extremely easy to make

fallen holly
#

how to check if a variable is number or not for my timeout cmd

lyric mountain
#

isNaN

ancient nova
#

I can't write a good decription for my bots about me

#

can anyone help pepeStraightFace

#

I want to keep it short and concise, that's what I initially come up with

lyric mountain
#

"The Best Discord bot" when will you stop being so bold?

#

it's bad to self-elevate like that

fallen holly
# lyric mountain isNaN

no work

   if (isNaN(duration)) return message.reply({ embeds: [timeEmbed] }).then((sent) => {
            setTimeout(() => {
              sent.delete();
            }, 10000);
          });
lyric mountain
#

how exactly didn't it work?

#

btw, isNaN will check if it isn't a number

fallen holly
#

if i say !mute @member 1m it will say not a number

lyric mountain
#

read what I just said

#

isNaN will return true if it is not a number

#

you have the condition inverted

ancient nova
boreal iron
#

Im curious if it makes more sense to tell people to move to slash commands instead of solving common command issues

#

Especially if people state they don’t have the privileged intent anyways

ionic sphinx
#

i need developer guys

sudden geyser
#

for what

ionic sphinx
#

for my serveur

sudden geyser
#

but for what

#

as in to do

#

to help with a problem you're having or to work on a bot for you

ionic sphinx
#

creat room and rols

ionic sphinx
sudden geyser
#

Do you need help with a specific bot you already have?

ionic sphinx
#

And I want to have a server and I want help on this my friend

sudden geyser
#

You may want to check if that bot has a support server

ionic sphinx
wheat mesa
#

what

#

lmao

sudden geyser
#

So much so that I grew up and became a materialist

ionic sphinx
winter tapir
#
 Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
    at new NodeError (node:internal/errors:371:5)
    at defaultResolve (node:internal/modules/esm/resolve:1032:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
    at ESMLoader.import (node:internal/modules/esm/loader:332:22)
    at importModuleDynamically (node:internal/modules/cjs/loader:1036:29)
    at importModuleDynamicallyWrapper (node:internal/vm/module:437:21)
    at importModuleDynamically (node:vm:381:46)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
    at MyClient._loadCommands (C:\Users\-\Desktop\Dank-Assistant-TypeScript-Rewrite\dist\src\structures\client.js:68:70)

Why would I get this erorr when trying to run this code in it’s compiled state


const moduleMeta = (await import(resolve(metaPath, moduleMetaFileName)))
                .default as ModuleMetaPayload;

i’m using the v18 node

#

logged the path and it is js C:\Users\-\Desktop\Dank-Assistant-TypeScript-Rewrite\dist\src\commands\chat-input\module.meta.js

lament rock
winter tapir
lament rock
#

Neither as iirc, you can import modules over the network. The api is to be similar to the web import statement as that one is all about web requests

#

without a handle, I'm guessing it assumes it's a web url

#

Unless you're using esm because "insert library here" is esm only, then I'd probably just stick to cjs as esm isn't where it needs to be and seems to only further divide the js ecosystem with all of its nuances and requirements that need to be fulfilled specifically for that purpose

carmine summit
#

Which is faster? n === 0 or !n?

rustic nova
#

they're the same, if n is treated as a boolean and not a number

cinder patio
#

you won't notice a difference

tender iron
#

hello this function is not working

#

anyone help me?

quartz kindle
#

does this work?

tender iron
#

no

quartz kindle
#

where is this code hosted? what is your top.gg webhook configuration in your bot's top.gg settings page?

tender iron
quartz kindle
#

thats not what i asked

quartz kindle
#

and what did you put in top.gg?

tender iron
#

a weebhook

quartz kindle
#

never used that service, did you configure it correctly?

tender iron
#

i go create a new wehhook