#development

1 messages Ā· Page 11 of 1

wheat mesa
spark flint
hard wraith
sharp geyser
#

This just seems like they wanna make your life hell depending on the project

#

inb4 they ask you to use the native modules to make an api

ancient nova
sharp geyser
#

It's a http status code

wheat mesa
sharp geyser
#

But in the form of a cat

ancient nova
#

I'm too lazy to type on my phone's mini keyboard

sharp geyser
spark flint
#

capy.pifw

#

pics

sharp geyser
#

I know

spark flint
#

http.capy.pics

#

no capy

#

sadly

sharp geyser
#

I was wondering if capy was a valid tld

spark flint
#

.py isn't

#

.py.someting is

sharp geyser
#

I swear I saw someone talking about .capy being a valid tld

#

šŸ˜”

spark flint
#

nah sadly

sharp geyser
#

Make it become a valid tld

spark flint
#

yues

sharp geyser
#

Start a go fund me

spark flint
#

i'll pay 100k

sharp geyser
#

It's worth starting a go fund me for

ancient nova
#

why did my tongue just start hurting

hard wraith
#

Why is console.log(data) returning undefined if when I console.log(returned) in checkImage it returns a json object?

wheat mesa
#

you're returning inside the event listener

solemn latch
#

Yeah

#

Also please use descriptive variable names, naming something returned in a return in a callback is awfully hard to explain(and read).

hard wraith
#
async function run() {
    let data = await checkImage('', '', '');

    console.log(data);
    // console.log(`Adult: ${isAdult(data)}`);
    // console.log(`Racy: ${isRacy(data)}`);
};

// function isAdult(data) {
//     return data.IsImageAdultClassified;
// }

// function isRacy(data) {
//     return data.IsImageRacyClassified;
// }

async function checkImage(endpoint, auth, image) {
    const https = require('https');

    const data = JSON.stringify({
        "DataRepresentation":"URL",
        "Value":`${image}`
    
    });

    const options = {
        hostname: `${endpoint}`,
        port: 443,
        path: '/contentmoderator/moderate/v1.0/ProcessImage/Evaluate',
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Content-Length': data.length,
            'Ocp-Apim-Subscription-Key': `${auth}`
        },
    };

    const req = https.request(options, res => {
        res.on('data', d => {
           return JSON.parse(d.toString());
        });
    });

    req.on('error', error => {
        console.error(error);
    });

    req.write(data);
    req.end();
}

run();```
solemn latch
#

Personally, I'd create a promise and return that

wheat mesa
#

^

hard wraith
#

How?

#

Like where do i put the new Promise()

solemn latch
#

Tim to the rescue.

hard wraith
#

Thank god, the docs about promises are full of jargon.

quartz kindle
#
return new Promise((resolve, reject) => {
  const req = https.request(...);
  req.on("end", () => {
    resolve()
  });
  req.on("error", () => {
    reject()
  })
})
hard wraith
#

thanks

#

wait what...

#

That wont return the data from in the res will it?

quartz kindle
#

add a data event

#

collect the data

#

then resolve the data from the end event

#

here: ```js
return new Promise((resolve, reject) => {
const req = https.request(...);
const data = [];
req.on("data", d => data.push(d));
req.on("end", () => {
resolve(Buffer.concat(data).toString());
});
req.on("error", () => {
reject()
});
})

hard wraith
quartz kindle
#

the data event can be emitted multiple times, for example when you receive a chunked response

#

so you have to collect it as many times as it takes, until the end event is emitted

hard wraith
#

Azure never responds with chunked responses

#

I asked my contact about that

quartz kindle
#

you cant really guarantee that

#

because it doesnt depend on them

hard wraith
#

They say they just push a json object back...

quartz kindle
#

chunking happens at the tcp layer

hard wraith
#

IDK why its becoming a buffer

quartz kindle
#

the data event returns a buffer by default

#

unless you set a different encoding

hard wraith
#

damn its not working

quartz kindle
#

mb

hard wraith
#
async function checkImage(endpoint, auth, image) {    
    return new Promise((resolve, reject) => {
        const https = require('https');

        const data = JSON.stringify({
            "DataRepresentation":"URL",
            "Value":`${image}`
        
        });

        const options = {
            hostname: `${endpoint}`,
            port: 443,
            path: '/contentmoderator/moderate/v1.0/ProcessImage/Evaluate',
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'Content-Length': data.length,
                'Ocp-Apim-Subscription-Key': `${auth}`
            },
        };

        let azureResponse;
        const req = https.request(options, res => {
            res.on('data', d => {
               azureResponse = JSON.parse(d.toString());
            });
        });

        req.write(data);
        req.end();

        req.on("end", () => {
            resolve(azureResponse);
        });
        req.on("error", (error) => {
            reject(error);
        })
    });
}
#

this isnt returning anything.

quartz kindle
#
        const req = https.request(options, res => {
            const azureResponse = [];
            res.on('data', d => {
               azureResponse.push(d);
            });
            res.on("end", () => {
              resolve(JSON.parse(Buffer.concat(azureResponse).toString()));
            })
        });

        req.write(data);
        req.end();
        req.on("error", (error) => {
            reject(error);
        })
hard wraith
#

I did it different but it worked.

quartz kindle
#

the data and end events should be on res, not req

#

only error is on req

hard wraith
#

Thanks

#

I can test this with filters on text too.

#

This seems weird but accurate

#

At least I know azure is handling itself lol

solemn latch
#

Imagine Tim asking a question instead of answering ^_^.
Scary.

wheat mesa
#

making good progress on the parser today

hard wraith
#

I like this...

#

I need to make sure it sleeps for 1 second between requests however.

#

Content filtering.

#

Love it.

sharp geyser
#

Bad code

quartz kindle
#

my last 3 questions in the typescript server went unanswered lol

wheat mesa
#

just spent 20 minutes debugging an error just to find out that a really basic function that I let copilot write for me fucked everything up

#
    fn matches_one<Item: IntoIterator<Item = TokenType>>(&mut self, items: Item) -> bool {
        for item in items {
            if self.check(item) {
                return true;
            }
        }

        false
    }
``` should've been ```rs
    fn matches_one<Item: IntoIterator<Item = TokenType>>(&mut self, items: Item) -> bool {
        for item in items {
            if self.match_token(item) {
                return true;
            }
        }

        false
    }
#

fuck you copilot

solemn latch
#

It was close

wheat mesa
#

close isn't close enough!

#

check does the same thing as match_token, except match_token advances the current token by 1 if it matches the current token, whereas check just returns true

#

So my parser was infinitely stuck on a star and trying to parse it as if it was a literal

#

good thing I tested... 700 lines in

sharp geyser
wheat mesa
#

I didn't rely on it

#

I saw it and it looked good from a glance so I let it write it

sharp geyser
#

Wow

#

So now you're blaming co pilot

#

Even tho it was your fault

wheat mesa
#

I've written the exact same function before, I figured it understood considering the scale of other things its written for me

sharp geyser
sudden geyser
#

I'm broke so I don't use copilot

wheat mesa
#

student package cus I'm still in high school

#

gotta milk it while I can

sudden geyser
#

I have it active but don't bother using it anymore

#

don't want to get locked in/closely tied when it expires anyway

hard wraith
#

I successfully just published an npm package!

#

fuck yeah!

solemn latch
#

Nice ^_^

hard wraith
#

Yeah testing it now lol

solemn latch
#

Ideally you'd test first, publish later

hard wraith
#

oh I tested that. I just wanna make sure I can use it after installing the package into another project.

#

its a private package for that reason.

sudden geyser
#

what's the package?

hard wraith
#

its a content moderation package

#

Boom

#

This means I can now use this on my discord bot safely without worrying about google lol.

#

So time for bed lol.

solemn latch
#

šŸ¤” if its private why not make a module instead?

hard wraith
#

Because it will be public šŸ˜‚

#

This is just the one that the company paid for, and as I’m also adding it to their apps for them, it has 0 error handling. The public one needs to return errors and things. I just don’t know how to do that unless I try the methods and throw err in the catch…

#

Idk I’ll look into it in the morning.

#

Like I was paid to make it by the company I work for. So like yeah. I just… need to make it better for public šŸ˜‚

sharp geyser
#

Make your own error class ez

#

Make the errors look better with a custom name space;)

hard wraith
#

Ok but here’s the thing if I have a function that calls another function and inside the second function part of it errors and I make it throw an error… will that stop all other code from executing?

wheat mesa
#

Yes

#

If you don't catch it that is

#

If you catch it, it'll go to your catch block

hard wraith
#

Cool I’ll have to add try and catch to everything that executes so I can make it throw an error for the specific part.

wheat mesa
hard wraith
#

Maybe… idk I’m too tired to think about this šŸ˜‚

#

I mean my promise rejects on error so that’s sort of error handling…

#

This is this overkill?

#

or is the reject(error) good enough? to fail a try catch when this is called?

wheat mesa
#

You don’t need to throw, that code will never be reached

#

Reject is essentially ā€œthrowingā€ in a promise

hard wraith
#

right so I don't need it here either?

wheat mesa
#

you don't, no

#

if checkText throws, so will validateText

#

if anything you'd be messing around with the stacktrace iirc

#

I'm not an expert on this, maybe @quartz kindle can look at it when he inevitably wakes up tomorrow (I hope he's asleep by now, I think it's late where he is)

hard wraith
#

Yeah sure, I will let him have access to the repo and he can look fully.

#

This is the exports for the project. So I hope the error handling is ok.

#

I might need to change the validate ones as they just return the data for isAdult, isRacy, containsProfanity and correctText in one response… so isn’t actually validation…

lyric mountain
#

ok so, ultra optimization time:

Consider the following:

  • The input is
    • A string of size higher than 3, but with arbitrary upper size
    • Guaranteed to be lowercase, UTF-8 and not containing accents
  • The list is
    • A file containing a moderately high amount of lines (100k+)
    • Guaranteed to be lowercase, UTF-8, not containing accents and exactly one word per line
    • The exact contents and format can be altered to be optimized enough for searching a specific match
#

what would be the best approach for both sides? (input and file)

#

I thought about converting the input to bytes and searching for the sequence in a file stream, but maybe there's a better approach as to not have array accesses all the time

ashen orbit
#

how do i host my website from my laptop

#

like my domain

#

there's no good tutorial

lyric mountain
#

you need to open port 80 (or 443 if you have ssl) and use a webserver like apache or nginx

#

I'm pretty sure there are a ton of tutorials

lyric mountain
#

I think I could write a lookup table on the header of the file to indicate where each initial begins

#

that way I can jump to the important part

lyric mountain
#

well, it kinda works

#

just need to get the pad size from the first line, offset by the initial letter and grab the starting index

crystal wigeon
#

Hey, anyone know how to execute code sent from the client on the server?

#

Without using eval or new Function

#

In nodejs

lyric mountain
#

eval is your only option

#

it's made literally for that

crystal wigeon
#

Hmm

lyric mountain
#

the stigma "never use eval, it's unsafe" is true only if you're allowing anyone to use it

crystal wigeon
#

I got asked in an interview and they said it can be done without eval

#

Hmm

lyric mountain
#

I mean, it can if you start a new process

crystal wigeon
#

Yeah

lyric mountain
#

but you'll have no control over it

crystal wigeon
#

How

#

Hmm

lyric mountain
#

just open a new process

crystal wigeon
#

Open a new process and then what? How do I execute the code sent from client

lyric mountain
#

once you open a new process it'll do it by itself

#

you cannot control the code in another process

crystal wigeon
#

Hmm but like how do I pass the code to the process? Any docs I can check?

crystal wigeon
#

Thanks

lyric mountain
#

you can also simply save the string to a file and call node <name of file>

crystal wigeon
#

Yeah makes sense

#

Thanks a bunch

earnest phoenix
#

Just fucking made a legit 100% automated 21+ verification using OpenCV, google vision and facial matching software to check selfies, IDs and other stuff. also uses text detection for paper verification
works fucking great
no human/mod needed to verify members who are 21+

Automated it completely. With a 78% threshold for "this person is the same person as on the ID" matching capability. I can raise it to whatever. It creates a new channel JUST for that user and admins and starts the process. its 100% auto. once the 2 photos are uploaded it checks for matches online and then scans the face for probability of a match. if its high enough it will add a role to that person and delete the channel.

Works amazingly fucking well i love it

The only thing i keep thinking is faking IDs and selfies, how hard/easy would that be? you have to take a selfie when you upload the paper verification. and your image on your ID has to match your selife.

thoughts?

fierce kindle
#

Türk varsa bana özelden yazabilirmi ?

woeful pike
last tapir
#

quick js question

#
if (...) {
    const x = 5;
} else {
    const x = 6;
    console.log(x);
};
#

this will log 6, right

#

also, should i define it as y instead?

spark flint
#

How to i export my .java into a .jar

#

i'm using intellij

#

but like idk how to actually do it kek

#

i'm at the point where I've gone Project Structure --> Artifacts --> done all of that

#

but theres no .jar šŸ—æ

boreal iron
#

You either create x being 5 or 6 depending on your condition

#

And no… if x is supposed to represent the same then calling the var y in your else clause wouldn’t make much sense

#

Since you will probably need to use the var after your statement

earnest phoenix
#
let content = object.members.cache
    .filter(user => user.permissions.has('ADMINISTRATOR') && !user.bot)

doesnt seem to filter out the bots

boreal iron
#

you wanna filter bots?

earnest phoenix
#

yes I dont want to include them when mapping

boreal iron
#

Ah that’s what you mean

#

On which djs version are you?

earnest phoenix
#

13

crystal wigeon
#
const { spawn } = require('child_process');

const child = spawn('node', ['temp.js']);

child.unref()``
Im trying to execute "temp.js"

#

but it just exists

#

no errors

#
console.log("temp file executed...")```
#

am i doing something wrong?

boreal iron
earnest phoenix
#

yes

#

from the guild create event

boreal iron
#

Ok well not all members are cached at any time anyways

crystal wigeon
#

help bois

boreal iron
#

If you have the privileged intent then fetching all members is required as first

#

Without that you won’t be able to fetch ā€˜em all

earnest phoenix
#

well I have added await object.members.fetch() before doing the filtering and mapping

#

but doesn't seem to change a thing

#

the bots with administrator are still included when mapping

boreal iron
#

Well because you’re confusing yourself

#
let content = object.members.cache
    .filter(member => member.permissions.has('ADMINISTRATOR') && !member.user.bot)
#

!user.bot doesn’t exist as property

crystal wigeon
#

yo

#

help

boreal iron
#

it’s literally a guild member object

crystal wigeon
earnest phoenix
boreal iron
#

And user is a property of it and bot a property of user

earnest phoenix
#

yeah got myself confused

boreal iron
#

So when naming your var properly you don’t confuse yourself

earnest phoenix
#

fair enough😭

boreal iron
#

I would also rename object to guild

#

Makes more sense in that context

#

Since the parameter is an object but represents a guild (object)

earnest phoenix
# boreal iron I would also rename object to guild

well my object is dynamic and I'll just do a condition to see if property exists to ensure I can reuse my function for not only guilds
( unless I should use separate functions for each case instead, idkk )

boreal iron
#

But your function returns that object you can actually name whatever you like?!

#

Since you said it’s inside the guild create event what else it is supposed to be?

crystal wigeon
#

elp

earnest phoenix
#

uh

#

where is the name property

crystal wigeon
#

displayName

crystal wigeon
earnest phoenix
crystal wigeon
boreal iron
#

You wanna get the user’s name

earnest phoenix
#

.displayName

#

why the fuck is it not named username/name like in other objects

#

they make it so complicated by addressing the name differently in every object

#

can't even test my bot properly because of those retarded captchas I get every time I do something

boreal iron
#

captchas?

boreal iron
#

The nickname can be set differently for each guild

#

It will be null if unset

#

displayname as property in other objects actually guarantees you to return the currently shown name of the user in that context

#

Either it’s a nickname if set or the username

#

It can not be null

earnest phoenix
#

alright

#

so why is there no username property that isnt overwritten by nickname

#

The username exists in the user instance, which is <GuildMember>.user, and for the nickname you can just access the nickname property

earnest phoenix
#

Because that's the user instance, not the username

#

oh alright

#

<GuildMember>.user.username

#

ic

#

I tried clicking on .user to see where it leads me to

#

had to click on ?User instead to see those properties

boreal iron
#

That’s what the property user returns

earnest phoenix
#

it did not display username ( the preview thingy where u see properties when u type them out )

#

so I assumed there wasnt one existing

boreal iron
#

An user always has an username

#

But it’s not guaranteed he has a custom nickname in that guild

earnest phoenix
#

If so, those won't show if the type of the value you're using is not defined, or not defined properly at least

earnest phoenix
#

ic thanks for clearing up my confusion then

feral aspen
#

Apparently, the button isn't disabling once the condition is met.

#

After some testing, the entire disabling isn't working.

#

Did I do something wrong? I followed the documentation, as well.

boreal iron
#

Did you log to see if the condition was met?

feral aspen
#

Lemme double check, once again.

feral aspen
boreal iron
#

Ok lemme get of the shower reałhhj qu

#

Oh god

feral aspen
boreal iron
#

Water on screen oldEyes

feral aspen
#

Lmaooo.

boreal iron
#

Pass your row when editing the message again but replace your button builder shit by row.components[1].data.disabled = true;

feral aspen
#

Waaat?

#

What do you mean?

#

if (...) row.components[1].data.disabled = true;?

boreal iron
#

Show me how you edit the message

#

You should pass row as component

feral aspen
#

Oh, the row alone?

boreal iron
#

You can also log row after trying to disable the button to see if the property disabled applies on the button

#

When editing the message do you pass row as message component?

#

You can not edit a single button without sending the entire row again as message component

#

So… show me the .edit(…) line

boreal iron
#

Ok the please log row after editing the button

#

Or use what I already posted above

frigid canyon
#

Hi

#

Wrong chat

feral aspen
#

So I'm confused, when am I supposed to use the .from() method and when am I supposed to use the above?

boreal iron
#

Yeah you can use this method on any action row component

#

row.components represents an array of action row components

boreal iron
#

Why don’t u just log it?

#

Without using the setDusabled method

#

To see what it returns

feral aspen
#

Moment.

boreal iron
#

I don’t like or work with the builders so..

feral aspen
#

Returns the Button Builder class.

#
ButtonBuilder {
  data: {
    type: 2,
    custom_id: 'reset',
    label: 'Cancel Subscription',
    style: 4,
    emoji: undefined
  }
}
#
ButtonBuilder.from(row.components[2])
#

My bad, that.

boreal iron
#

one second

#

Ah you didn’t read the docs carefully

#

from()

Creates a new button builder from JSON data

#

It doesn’t overwrite your existing builder

#

It creates a new instance

eternal osprey
#

hey guys, why is it impossible to create a channel with these parameters: js let pointchannel = message.guild.channels.cache.find( (channel) => channel.name === "🚦 | UE Modz Traffic" );for some reason my channels can't contain spaces, only - marks

feral aspen
#

So, wait, I need to re-define or something?

boreal iron
#

Why would you use that method at all?

#

row.components[i] returns your button builder as well

feral aspen
#

Oh, wait, so hold on. It's like defining a new Button Builder when using such method?

boreal iron
#

Yea

feral aspen
boreal iron
#

It creates a new button builder

#

Means you would then need to replace the old

#
row.components[2] =  ButtonBuilder.from(row.components[2]).setDisabled(true);
#

But this looks so awful

feral aspen
#

Extremely, back to plan A.

feral aspen
boreal iron
#

No need to use button builder from here as row.components[2] is your button builder already

feral aspen
#

For sure, and I mis-understood the changes.

boreal iron
#

Yeah tbh it’s a little bit confusing

hard wraith
#

ok so I need to make a global queue of interactions that rotates through every second... However I need it to push to the queue from inside a command then trigger outside of that command in a queue handler to complete the interaction... Is this possible in node?

boreal iron
#

I don’t understand the use case but as long as your queue is in a global scope you can access it anywhere

hard wraith
#

Would it be best to make something like client.queue = [] then push to that in the command?

hard wraith
#

I can only do X interactions a second.

boreal iron
#

But you’re aware interactions have a timeout?

hard wraith
#

You defer reply.

#

Then edit reply

boreal iron
#

It still has a timeout

#

You can only reply within 15mins

hard wraith
#

And if it stops working… I’ll just swap to the paid api version that lets me pass in 10x the interactions at a time.

boreal iron
#

Well then yes a queue makes sense

hard wraith
#

I’m just trying to make sure the command doesn’t error because of the limitations of the api.

boreal iron
#

Yeah sounds Leguan

#

FUCKING AUTO CORRECT

#

legitimate

hard wraith
# boreal iron legitimate

It’s azure… unlimited free requests to the api as long as it’s 1 interaction a second.

#

I think that my subscription covers up to 15000 a second but that’s at Ā£20 per X interactions šŸ˜‚

#

Companies love charging to use their machine learning šŸ˜‚

boreal iron
#

More easier than creating a queue here would be to create a global var representing the last execution of the an api request (timestamp), as soon as the current time is > 1s you at first update the global var with the current timestamp then await the api request

hard wraith
#

Still need a queue

#

Of some sort

boreal iron
#

Why would you

#

That ensures only one api request would be fired per second

hard wraith
#

What you said still creates a queue… but it has every pending interaction fighting to be next in a clusterfuck fight…

boreal iron
#

I mean you can increase the timeout to two seconds too, to be safe

hard wraith
#

The queue makes it orderly and you never have two commands fighting to be first as it’s first come first served.

#

I had this conversation with people smarter than use at work when making the build service for our apps. The best solution was a queue

boreal iron
#

I prefer a chaotic system awaiting the right moment than a continuous interval checking your queue

#

But all up to you

hard wraith
boreal iron
#

And what do you think an event listener is?

hard wraith
#

I see your point.

boreal iron
#

Checking for an event on each tick is literally the same

#

But tbh it would be overkill to optimize this down to the smallest level

#

Triggering an event by pushing items to an array representing your queue might be the best solution for your use case

#

Not sure tho if a simple interval per second checking your array (queue) length and taking action, then slicing the item wouldn’t be more efficient

#

Probably the same efficiency as the interval will also be checked on an process tick

#

Good question for @earnest phoenix

#

Or our benchmarking god Tim

eternal osprey
#

hey in djs v13, is it reaction.message.guild or reaction.guild

eternal osprey
#

soo it's message, thanks fake!

boreal iron
#

Also hasn’t changed in v14

#

The class simply represents the reaction (object) like you get it from the api

#

Which will most likely not change, I guess

eternal osprey
#

I see, awesome!

#

What about choices, because the guide only covers addChoice, but it's changed to addChoices right?

hard wraith
#

This for slash command options?

#

Look at the slash command builder to see the structure of it… and then decide if you want to convert it to a pure object without using the builder or use the builder.

#

const { SlashCommandBuilder } = require('discord.js');

const data = new SlashCommandBuilder()
    .setName('gif')
    .setDescription('Sends a random gif!')
    .addStringOption(option =>
        option.setName('category')
            .setDescription('The gif category')
            .setRequired(true)
            .addChoices(
                { name: 'Funny', value: 'gif_funny' },
                { name: 'Meme', value: 'gif_meme' },
                { name: 'Movie', value: 'gif_movie' },
            ));```
boreal iron
stuck dawn
#

how can I a close my Modal in the component himself and set the open state in the other component that is using it?

#

tried this way and it doesn't work..

sudden geyser
#

You need to pass setOpen down there

#

Though I don't know if the preferred way in React is to pass state down as parameters

stuck dawn
#

how can i do that?

#

ah i think i understand

#

i will try

#

but there's other way?

#

if you were the one to do it, how you do it?

#

ok i did it ty

feral aspen
#
let server = result.fields.getTextInputValue('serverInput'); // It's logged as "wpojrng".

if (...) {} else {
    server = await bot.shard.broadcastEval(client => client.guilds.cache.get(server))?.then(x => x.find(x => x));
}
#

Apparently, the server inside .get(server) is not defined even though it is.

#

Error [ReferenceError]: server is not defined

wooden ember
#

anyone know why my bot is multiplying?

#

if i leave it for a while and use alot of commands eventually i will start getting double responces

#

this is without restarting or reconnecting

#

and now its started to get worse

wheat mesa
#

are you running 2 instances somehow

#

or managing to call client.login more than once

wooden ember
#

i know but ive not started another

#

i tryed to reload the connection with my new command

#

but now theres 4 instances running

#

lol

#

but its not consistant

#

it works90% ofthe time

earnest phoenix
#

Do you happen to use a process manager?

wooden ember
#

nope

opaque seal
#

anyone good at nuxt js?

wooden ember
wheat mesa
#

== true :C

wooden ember
#

?

boreal iron
#

start awaiting your promises sir

radiant kraken
wooden ember
#

what prommises?

opaque seal
#

I want my div to listen to changes to my alertText variable, how do I do that in nuxt3?

<template>
  <div>
    <div v-if="alertText !== null">
      {{ alertText }}
    </div>
    <button @click="changeData">Just do it</button>
  </div>
</template>

<script setup>
let alertText = null

const changeData = async () => {
  alertText = "Some random text"
}
</script>
wooden ember
#

other than the msg send ones

boreal iron
#

anything is a promise, send returns a promise, destroy(), login() etc.

wooden ember
#

oh bruh

#

forgot about that

boreal iron
#

this will most likely try to login before the client is destroyed

#

whatever is faster

wooden ember
#

how though?

boreal iron
#

since you don't await things it will be fired immediately

wooden ember
#

guess thats why i should await it

boreal iron
#

you should await any promise

#

there are only a few use cases you don't need to

#

this one isn't one

wooden ember
#

is there a way to check if the bot is logged on already? like if(bot.connected) or somthing else

boreal iron
#

yeah

#

isReady() is a method of your base client

lyric mountain
#

you see, there's a thing about child processes: they won't show errors or logs in your console

#

because they have their own console (which isn't attached to your current's)

#

that's why it exits immediately, not because it errors but because it has nothing more than a console.log

wooden ember
#

also, how does .then work?

#

i have it used in my ping command

#

but when using it like await bot.destroy().then(()=>{} it says cannot read properties of undefined

#

thats exactly how its used on the ping command exept thats on a msg send event

#

and it works fine there

#

could some one enlighten me on why im wrong?

vivid fulcrum
#

...do you have a variable named bot?

wheat mesa
vivid fulcrum
#

you can promise chain like that

lament rock
#

In this case, useless, but you can do processing in .thens and the await will return the value of all the chains

wooden ember
wheat mesa
#

Not to mention, destroy isn’t even a promise

vivid fulcrum
#

there's the problem

wooden ember
#

bruh someone said it was like 10 minutes ago

zinc dawn
#

why is components.push(new MessageButton().setLabel("Invite Link").setURL(client.getInvite()).setStyle("LINK"));
deosnt work?

wheat mesa
#

You should read documentation and not rely entirely on what someone says all the time

wooden ember
#

true

lament rock
#

MessageComponents needs an action row

wheat mesa
wooden ember
#

bruh its edited now

lament rock
#

you have to have at least one action row with at least one component

wooden ember
#

it was a trap

#

but anyway back to finding a way to make sure that the bot only starts back up when its been destroyed and not at the same time

wheat mesa
#

Await your login call

#

Destroy is a synchronous operation, login however is not and relies on information sent by the gateway

wooden ember
#

bruh but how would i make it so that i know the bot has been for sure disconnected befor reconnecting

wheat mesa
#

I don’t know exactly what’s causing you to have multiple instances but that’s a possibility

wooden ember
#

its the bot just not disconnecting

wheat mesa
#

The gateway connection is destroyed nearly instantly

lyric mountain
wheat mesa
#

He’s trying to make a relog command

lyric mountain
#

a

wooden ember
#

for some reason if the bot is doing anything whilst i fire disconnect() it wont

wheat mesa
#

That calls client.destroy and then client.login

boreal iron
#

guess he ignored my edit

wheat mesa
#

Ah wait client.destroy might be destroying the client entirely

#

I’ll look at the source rq, in the meantime just try what I said to do

wooden ember
wooden ember
wheat mesa
#

Yes

#

Ok from looking at the source code you should be able to just call destroy and then login again

wooden ember
#

spammed a whole bunch of commands at it and it seems to be not multiplying anymore

zinc dawn
#

  let components = [];
  components.push(new MessageButton().setLabel("Invite Link").setURL(client.getInvite()).setStyle("LINK"));

  if (SUPPORT_SERVER) {
    components.push(new MessageButton().setLabel("Support Server").setURL(SUPPORT_SERVER).setStyle("LINK"));
  }

  if (DASHBOARD.enabled) {
    components.push(new MessageButton().setLabel("Dashboard Link").setURL(DASHBOARD.baseURL).setStyle("LINK"));
  }

  let buttonsRow = new MessageActionRow().addComponents(components);
  return { embeds: [embed], components: [buttonsRow] };
}

Any ideas? components[0].components[1].url: Scheme "1000421766751072296" is not supported. Scheme must be one of ('http', 'https', 'discord').

boreal iron
#

well your first component has no valid URL

#

Also which djs version do you use?

#

client.getInvite() can't seem to find getInvite() as method in any of them

boreal iron
#

no response means everything works as intended, everything is nice

#

Appreciate your help @boreal iron Thanks!!1!

#

Np mmulu

eternal osprey
#

huh, js Uncaught DiscordjsError RangeError [EMBED_FOOTER_TEXT]: MessageEmbed footer text must be a string.

tribal crow
#

Hello! Can anyone read through my code and see if there is anything wrong? I'm trying to make a command that sends a message to every guild the bot is in, but sometimes it works and sometimes it doesn't, and I don't see why it doesn't

eternal osprey
#
let embed1 = new MessageEmbed()
    .setTitle(`Ticket System`)
    .setColor("GREEN")
    .setFooter({content: 'UE Modz | Tickets'})
    .setTimestamp()
    .setDescription(`React with šŸ“© to create a ticket. The staff team will answer as soon as possible!`)```
#

oopsie, it's text

boreal iron
#

Yeah there’s no content option

#

God I’m drunk

wheat mesa
#

inb4 fake suggests using no builders

eternal osprey
#

Why did they change the footers to only contain a text property while all embeds etc etc use contents?

wheat mesa
#

ok this is the appropriate time to suggest not using builders

eternal osprey
#

The developers are honestly fucking this api and making it harder for no reason

tribal crow
#

Waffle u free?

boreal iron
tribal crow
#

y?

boreal iron
#

Also random messages without opt in feature can be understand as spam

#

And api abuse

wheat mesa
#

^

tribal crow
#

its not tho

#

its an embed with info abt the development to the 50 guilds its in

boreal iron
#

Make a command, let em show details about the progress if they want to

wheat mesa
#

Again, still not recommended. Put a link to your support server in the bot's about me, and then if people care, they'll join. Or that too ^^

tribal crow
#

yeah ok

#

but whats potentially stopping me?

#

the bad idea or rate limits etc?

wheat mesa
#

Nothing technically, but ratelimits will stop you

#

And people do not like unsolicited messages they did not sign up for in their servers

boreal iron
#

As well as the api guidelines and rules

wheat mesa
#

^

tribal crow
#

but what if you send one every minute or smth?

#

will that be rate limited?

#

i wont do it, just trying to understand

wheat mesa
#

sounds like you wanna do it :^)

tribal crow
#

just curious :p

boreal iron
#

Well… you gotta figure it out, it doesn’t take much long until a bot gets flagged, I heard

tribal crow
#

alr

#

thanks ig

boreal iron
#

When continuously sending messages to users or guilds

#

Like I said make it a command OR attach some info like a button, quote etc. to other command responses

#

Like

#

there’s some progress, execute /info to see details

#

After a regular response text, embed etc

wheat mesa
#

discord reserves the right to monitor their api usage, and if it's deemed to be against the rules (Which spam is potentially one of those), they can block you from the api

tribal crow
#

but the way dank does it is allowed right

#

like notifs when sending messages

#

alertbox or whatever its called

wheat mesa
#

I don't know of such feature

#

If it's opt-in, then it's likely allowed

#

But sending messages to all of your servers without their knowledge of your intent to do so can definitely be deemed as spam

boreal iron
tribal crow
#

^^

boreal iron
#

I think he means something like this

tribal crow
#

yeah

boreal iron
#

Which is part of a regular response you sent if somebody executes a command

tribal crow
#

alr

boreal iron
#

No random message to a guild or user

zinc dawn
#

What does this mean? I don't understand what the mistake is.

  let components = [];
  components.push(new MessageButton().setLabel("Invite Link").setURL(client.getInvite()).setStyle("LINK"));

  if (SUPPORT_SERVER) {
    components.push(new MessageButton().setLabel("Support Server").setURL(SUPPORT_SERVER).setStyle("LINK"));
  }

  if (DASHBOARD.enabled) {
    components.push(new MessageButton().setLabel("Dashboard Link").setURL(DASHBOARD.baseURL).setStyle("LINK"));
  }

  let buttonsRow = new MessageActionRow().addComponents(components);
  return { embeds: [embed], components: [buttonsRow] };
}

DiscordAPIError: Invalid Form Body
components[0].components[1].url: Scheme "1000421766751072296" is not supported. Scheme must be one of ('http', 'https', 'discord').

lyric mountain
#

they answered u already

zinc dawn
lyric mountain
#

no you didn't

zinc dawn
#

oh

lyric mountain
#

u didn't even try the suggested solution

lyric mountain
zinc dawn
#

i have

lyric mountain
#

no

#

I'm 101% you haven't, else you wouldn't paste the very same message

#

the issue is that you are sending the server ID

#

where it's expecting an url

zinc dawn
#

šŸ¤” No

#

Thats the server invite

lyric mountain
#

no it isn't

#

Scheme "1000421766751072296" is not supported

#

else it wouldn't show the id

boreal iron
#

Let’s make it easy

#

Log all 3 vars you’re using as URLs

#

And you will see what’s wrong

lyric mountain
#

inb4: "how"

boreal iron
boreal iron
eternal osprey
#
  setTimeout(() => {
                           channel1.messages.fetch().then(async messages => {
                          console.log(`${messages.size} messages.`);
                          let finalArray = [];
                          const putInArray = async (data) => finalArray.push(data);
                          const handleTime = (timestamp) => moment(timestamp).format("DD/MM/YYYY - hh:mm:ss a").replace("pm", "PM").replace("am", "AM"); 
                          for (const message of messages.array().reverse()) await putInArray(`${handleTime(message.timestamp)} ${message.author.username} : ${message.content}\n`); 
                         
                      });
                    
                    }, 20000);``` why is messages.array not a function?
lyric mountain
#

you really really shouldn't do that inside the condition of the for loop

wheat mesa
#

messages is Collection<Snowflake, Message> which has no function .array()

#

documentation is useful, make sure to use it

#

Also why is putInArray an async function if you're not using any sort of async stuff in it?

#

Same thing with the anon function in the .then callback, you don't need the async if you remove the async from putInArray

ancient nova
ancient nova
#

what do you guys think of the name "Milkshake" for abot?

rustic nova
#

boring, too common

ancient nova
#

is it at least better than "Anonymous Hater" (The old name)

#

I have no other idea

wheat mesa
#

"Anonymous Hater" makes literally 0 sense for a bot name tbh, anything is better

ancient nova
#

it was a bot that used AI to annoy people

#

like someone said "bruh" and the bot would respond with ""bruh" what are you an idiot?"

#

so I just took that name thinking it was good

boreal iron
wheat mesa
#

lol

#

saw someone that claimed they were using ai but when you looked at their repo it was just a bunch of if statements

ancient nova
wheat mesa
#

saved messages from a chat... 🤨

ancient nova
#

but it got barely to like 20 guilds

ancient nova
#

anyway what would be a good name then 😭 I want to verify my bot but I don't have a good name

boreal iron
#

Maybe you should do something people need, which is unique and isn’t annoying at all

wheat mesa
#

inb4 someone spams racial slurs and your bot gets terminated

ancient nova
#

that's why the bot didn't work out too well

wheat mesa
#

perhaps you should think of a name that is at least remotely related to what your bot does

#

and when you come up with a name, search to see if it's on top.gg before you decide on that name

#

otherwise the more popular bot will forever overshadow you

ancient nova
#

well my bot is a multipurpose bot

eternal osprey
#

hey is there a bulkDelete() method to delete a cetrain amount of messages

ancient nova
#

so I don't think any name would fit it?

wheat mesa
#

YAMPB

boreal iron
ancient nova
#

bulkDelete(amount)

eternal osprey
wheat mesa
#

yet another multipurpose discord bot

ancient nova
boreal iron
#

Well Waffle

#

Soon lots of em will go offline

#

You know why…

ancient nova
#

wot

wheat mesa
wheat mesa
#

you should probably make a feature that isn't offered by 10 thousand other bots and market off of that

ancient nova
#

my bot has original commands though sad_cat

boreal iron
wheat mesa
#

Well, if you're marketing as multipurpose then nobody is going to care

pine nova
wheat mesa
#

Focus more on one thing

#

giant multipurpose bots like YAGPDB and MEE6 and Dyno already dominate that space

ancient nova
wheat mesa
#

No

#

Because everybody has seen 20 million "Multipurpose" bots

#

It's not unique

ancient nova
#

yes it is, I personally think my bot has better moderation that dyno and definitely better welcome messages than mee6

#

I forgot what YAGPDB did

wheat mesa
#

Unfortunately nobody is going to care because those options already exist and are known to be reliable

ancient nova
#

okay first I need to think of a name

wheat mesa
#

Nobody is going to want to use your bot if it doesn't have many servers and it does the same things as existing giants in the space

ancient nova
#

then I'll properly brand it as something

wheat mesa
#

You need to offer more unique features

#

A name isn't going to have THAT much of an effect on your growth

ancient nova
#

I think I do

wheat mesa
#

What do you offer

ancient nova
#

well I can't tell you much from the top of my head, but many plugins, anti spam, anti malware, afk and working on a anti raid system. Couple unique commands paired with those not so unique, lots of games and fun commands, lots of utility commands as well

#

you would have to either take my word for it being unique or join my server to see for yourself

wheat mesa
#

sounds like it exists in 20 million other bots

#

:^)

#

every general purpose moderation bot has anti raid, afk, and anti spam

ancient nova
#

I don't see many bots that have anti raid

wheat mesa
#

Which from that whole list sounds like the most important features of your bot considering you didn't mention any others, other than the malware

ancient nova
#

dyno doesn't

#

the only one I can think of is wick

wheat mesa
#

Which I suppose you could expand on what you mean by "anti malware"

wheat mesa
#

Well known for being the best option

ancient nova
wheat mesa
#

Didn't we already go over that previously? I thought it marks all discord files as malicious

ancient nova
#

no no I don't use discord cdn to upload that

#

I get the hash from the attachment then send it over to the virustotal API

wheat mesa
#

The... hash...?

ancient nova
#

the unique key any file has

wheat mesa
#

Which is from what property of it exactly

ancient nova
#

let me google rq

#
Hashing is a process that transforms arbitrary-length data into a small, fixed-length string of characters called a digest or message digest. Malware hashes are used by virus protection systems to identify viruses. They consist of calculated numerical values of code unique to the virus.
#

and virustotal has an API to check for that hash and if an user uploads any malware that's been scanned with virustotal previously it will check for the detections

#

if it has over 3 it will flag it as malicious and delete the message

#

simple

wheat mesa
#

Ok

#

The problem is that at a glance your bot is not unique

#

You need something to make it stand out

wooden ember
#

^^

wheat mesa
#

Don't market under "multipurpose", find something specific

wooden ember
#

yeah 90% of all discord bots are mostly the same some one that doent know the first thing about bots is just gonna use one of the populare ones and wont sirch for anything else

ancient nova
#

yeah but to do that I need to find a matching name with the thing I wanna go for

#

I literally have negative ideas right now

#

my brain empty

wooden ember
#

bruh

ancient nova
#

I had 2 suggestions from other people but u guys said it's bad and generic

#

so help me find something good enough 😭

wooden ember
#

idk name it after som obscure medicine

wheat mesa
#

You should not be focused on the name, focus on what features you want to market under. THEN, you can pick a name

wooden ember
#

those have pretty whacky names

wheat mesa
#

Getting stuck on the name is pointless

#

Brainstorm features

wooden ember
#

just call it jeoff

wheat mesa
#

Perhaps you'll come up with something after thinking of features

ancient nova
#

I'll call the bot Paracetamol KEKW

wooden ember
#

lol

ancient nova
#

ngl that actually sounds kinda mad

wooden ember
#

i mean i called my test bot uganden hank hill

ancient nova
#

since it does have commands from most generes

#

only missing music and economy commands

wooden ember
#

i mean you can add the general use commands but if this isnt the only bot in a server then i doubt they will get used

ancient nova
#

I had a couple big servers add my bot

#

a 1k a 25k and 7k servers and they use it as their default bot

#

also a 3k server added it today

wheat mesa
#

member count doesn't matter

#

server count and usage is what matters

#

my bot is in a 25k server, they have never used a single command

ancient nova
#

bruh 😭

#

I mean I would be fine wit that tbh

wheat mesa
#

If you insist on making it a general purpose bot, then have fun. The chances are that you will not succeed in that space

ancient nova
#

they give me good stats idc if they acc use it KEKW

ancient nova
wooden ember
#

my bot is only really used in small servers

ancient nova
#

but it will truly be easier if I had a name first

wheat mesa
#

it literally wont lmao

#

think about what you're going to market it as then come up with a name

wooden ember
#

litterally just call it Paracetamol

wheat mesa
#

you think that burger king came up with their name before coming up with the idea to make burgers? Cmon, common sense here

wooden ember
#

at this point

ancient nova
#

@wheat mesa I just thought of a name whilst looking at my fridge

wooden ember
#

electrolux

ancient nova
#

how about "Shea"? I thought of it when looking at butter KEKW

#

it sounds kinda cool

ancient nova
ancient nova
#

and if I have name corresponding to some theme I can then make commands more based on that theme

wheat mesa
#

My man you should come up with something of actual substance before you come up with a name

ancient nova
#

I can't

wheat mesa
#

I don’t know how many times I have to say it

ancient nova
#

my brain is legit empty I don't even have an actual command idea

#

if I have a name, I can think of a theme and if I have a theme I can think of commands that work with the theme

#

:/

wheat mesa
#

its

#

the

#

other

#

way

#

around

#

please you're going to fucking kill me

ancient nova
#

😭 please

solemn latch
#

Make super auto pets in a discord bot.

Make it seasonally themed.

Name it super auto bots.

wooden ember
ancient nova
#

I have no idea what to even do with the bot anymore

wooden ember
#

bruh

#

i just game up and made a bunch of shitpost commands

#

like open the dvd drive

#

beep the server bios buzzer

crystal swallow
#

if you want to make a bot for it be popular and successful, good luck lol, if you want to make a bot to practice coding, than just make anything

wooden ember
#

play the cd in the cd drive

#

just random stuff

crystal swallow
#

dont try to force something to happen if it doesnt need to happen or youll just be disappointed

solemn latch
#

One of the issues with asking us what you want is we don't know what you want(the weird phrasing is intentional).

If your goal is a multipurpose bot the name wont likely matter much though.

lament rock
#

Make a game in Discord

ancient nova
boreal iron
#

For real… who tf wants to play a game in a chat

ancient nova
#

I have 3 games

#

acc 4

#

working on the 4th one

wheat mesa
#

ā€œInsanity is doing the same thing over and over again and expecting a different resultā€

solemn latch
ancient nova
#

but those are generic names, as you guys said earlier. And you guys say every name I come up with is also bad, forgettable or generic

sharp geyser
#

Are you trying to determine the name for your bot?

solemn latch
#

I think thats the issue you're missing, if your bots generic then whatever you name it doesn't matter.
If you dont want to pick something specific about your bot you want to be the focus then every name will be generic too.

sharp geyser
#

Multi purpose bot problems

ancient nova
#

I need a name that does not sound boring as you guys said

solemn latch
#

Name it a random german word.
German is an interesting language, so itll sound non boring ^_^

crystal swallow
stuck dawn
#

why is this not returning?

#

i solved..

ancient nova
#

anyone know - char but the circle one?

rustic nova
#

bulletpoint

#

Ā·

#

"Ā·"

quartz kindle
#

panzerkampfwagen

#

flamenwerfer

#

krankenwagen

boreal iron
quartz kindle
#

uberrachung

#

naturvisenschafen

boreal iron
#

At least those names make it look interesting

#

Tim being afk the entire day, as soon as the trolling begins he’s here to participate

quartz kindle
#

:^)

boreal iron
wheat mesa
#

Ehrmantraut šŸ˜‰

ancient nova
#

I'm making a quite weird server setup command will any actual dev be able to test it? I don't know if asking people who don't know how bots work to test it yet

#

if you have a moment dm me your server invite so I can join

earnest phoenix
#

Im having alot of issues getting passed a point in my bots features.

the bot scans your ID for text and your face on the ID, then you send a selfie and if the ID and the selfie match it does paper verification. if that matches too you get verified. the issue is people can just add say 01/01/2004 to their ID, overtop their DOB and the bot will think theyre 18 and they will pass.

currently, if the image isnt messed with, it works SUPER well. its great! but people can just use paint to add 1/1/2004 to their DOB and they'd be 18 according to the server.

How can i stop that?

#

trying to remove humans from ID verification

hard wraith
#

Didn’t have anything specific about it I wanted to highlight… so dead friend became who it was named after

hard wraith
solemn latch
#

stripe age verification using machine learning?

hard wraith
#

It’s not ā€œage verificationā€ it’s just their identity platform.

solemn latch
#

doesnt stripe use humans, not machine learning?

hard wraith
#

Nope

solemn latch
#

which is why it costs so much

#

ah

hard wraith
#

It’s machine learning.

#

That’s why I use stripe for payments and identity verification.

earnest phoenix
boreal iron
earnest phoenix
hard wraith
#

Meaning that other than the azure alternative… it is the best and most accurate way to verify age and identity.

earnest phoenix
earnest phoenix
solemn latch
#

I doubt a free bot can really use stripe though

hard wraith
#

That my 5 months of researching came up with once I removed human’s.

earnest phoenix
#

can go to my website -> verify live -> return

boreal iron
#

There’s a reason companies exist doing live video checks to verify you while holding your ID card in your hands

lyric mountain
hard wraith
earnest phoenix
hard wraith
#

I got around it by creating a digital ID platform that other bots can ping a discord ID to and get if the person is ā€œverifiedā€ and if they are over 18.

#

The user can choose to get verified. But they have to pay the stripe fee to do so.

lyric mountain
hard wraith
lyric mountain
#

not about that, but dealing with personal documents at all

solemn latch
#

especially in discord

hard wraith
#

I just store discord id, over 18 confirmed. Identity confirmed. Free of liabilities.

lyric mountain
#

the law is reeeeeeeally stict regarding handling IDs and other stuff on the internet

earnest phoenix
hard wraith
#

Yep…

lyric mountain
#

especially after GDPL

boreal iron
#

I don’t see any use case except payments requiring a reason for such a verification

lyric mountain
#

ye

#

if anything, simply use the user email, then ask for confirmation

hard wraith
#

Fuck GDPR is making me create automated systems for users to request all their data from me and my third party providers that handle their payments etc… and request deletion.

solemn latch
#

its a good thing though

earnest phoenix
#

what bout dong this, sorta

#
#

live capture of ID

#

yes? no?

hard wraith
#

Plus… it’s a cool gimmick to sell to onlyfans creators that you can automatically verify the ages of their users at a 90% accuracy for a set cost per X users šŸ˜‚

solemn latch
#

tbh, it probably makes more sense to limit alcohol or anything that requires 18+ until later when you have a larger team.

boreal iron
solemn latch
#

youll want a legal team to even begin selling alcohol.

hard wraith
#

But yes, I checked with lawyers… and then created my platform to cover age verification to a legally protected state.

#

That’s why it took over 6 months to make.

#

I wouldn’t recommend going down that route unless you have a specific product you need it for.

solemn latch
#

still you're handling the data, you're responsible.

Are you handling it based on the shipping address? my state doesn't allow shipping of alcohol to home addresses, 25 minute drive and you can have it delivered, unless you're in the city then you cant again.

boreal iron
#

cough megaupload cough

ancient nova
#

any way to do this better?

hard wraith
#

I have very strict rules on what I can sell and where due to the UK and brexit and stuff.

solemn latch
#

šŸ¤” it seems you need a license to sell alcohol online in the UK.

hard wraith
#

And if you check my website payment support it’s GBP, USD and CAD.

hard wraith
#

For the one company in talks with me to create a webstore for home brew… I am just handling the site hosting and age verification. They are the one needing the license not me.

ancient nova
#

can anyone check the code out???

boreal iron
ancient nova
#

my first attempt at a server setup command

#

never done this before no idea what to actually do

boreal iron
#

Your replying like 100 times to a message?

ancient nova
#

yeah but it's asking different question each time

hard wraith
ancient nova
#

about what to setup and how to set up

#

I'm tired lol this took about 40 minutes of copy pasting and typing different thing for each prompt

boreal iron
solemn latch
#

you are selling it though, is a grocery store not selling alcohol because they have a cashier?
If you're handling data your need to comply with the laws, the same as any other business or person.
You dont have to be the one shipping something to be part of the sale process.

ancient nova
hard wraith
ancient nova
#

can anyone test the server setup command in their server? I wanna see if there is any errors or problems or anything

boreal iron
hard wraith
#

I literally have 3 months of conversations with lawyers about this… you have like 10 minutes of rudimentary information about the most thought out product I have.

#

I know I am covered. And what I need. And I got it.

ancient nova
boreal iron
#

So you wanna enforce em to set the settings

ancient nova
#

look at my code, if they don't reply the value remains at default

hard wraith
boreal iron
ancient nova
#

oh I forgot about modals...

hard wraith
ancient nova
#

ah I can't use modals because they're exclusive to PC

boreal iron
#

Buttons like previous and next step make things easier

#

No modals aren’t exclusive to PC

ancient nova
#

they are? the prompt doesn't pop up if you're on mobile

#

or did they fix that

boreal iron
#

They do

hard wraith
#

Are you…

#

Modals work 🤣

boreal iron
#

Already since they got officially released

hard wraith
#

They made it official? Or still ā€œtext input onlyā€?

ancient nova
hard wraith
#

Nah I’ve been using them with unsupported components on my test bot version of my bot for a support ticket command.

boreal iron
#

What you mean is a select menu inside a modal, not the modals itself my gosh

#

And no they aren’t released yet

hard wraith
#

Since v14 was in dev version only.

#

I’m waiting on them to officially support select menus.

boreal iron
#

It will probably be released with more field types

hard wraith
#

Thank fuck… I want radio buttons.

boreal iron
#

I doubt but I already saw a date picker

#

Finally

hard wraith
#

Select menus are great for a lot of data inputs. But sometimes you just want agree, disagree.

boreal iron
#

Choices for fields may also work

#

As this is already integrated anyways

hard wraith
#

That’s not a ā€œwe need you to agree to us processing this data under GDPRā€ select buttons.

#

Like select menus for that are great but… not really.

#

Radio buttons work better.

proven escarp
#

i like radio buttons

#

they should also add sliders

boreal iron
#

Well providing a modular and dynamic way to build the modal with their action rows especially combining elements is very tricky

hard wraith
#

Especially when you enable multichoice. Modals here should work like modals in html. And those contain forms. Forms take all sorts of easy to implement features from html such as radio buttons select menus text input sliders etc.

hard wraith
#

Lookup what discord is developed in…

proven escarp
#

what is it?

#

i think it's typescript, rust and elixir

#

if im right

hard wraith
proven escarp
#

go??

#

wtf

#

why would they use c++

#

elixir and rust do the same job

solemn latch
#

my guess, attachment processing

proven escarp
#

šŸ¤·ā€ā™‚ļø

sharp geyser
#

Elixir makes sense

hard wraith
#

All support form inputs equal to html forms and are therefore easy to implement into their methods

sharp geyser
#

Its a good API language

hard wraith
sharp geyser
#

It's confusing asf tho

#

Elixir is like trying to learn C

hard wraith
sharp geyser
#

No one's even talking about python

hard wraith
#

Python is basically a simpler C at its core…

wheat mesa
#

no lmfao

#

Not at all

sharp geyser
#

It's not even in the conversation

wheat mesa
#

Nowhere even close

proven escarp
#

python is nothing like c

sharp geyser
#

I'd only ever use python for ml

proven escarp
#

literally

boreal iron
#

The issue is not the implementation, the issue is to make it a modular and user friendly system.
For example your radio buttons…
One per action row, maybe two maybe three?
What if a label is added to them?
Then one per action row?
What if you wanna combine it with a ā€œsmallā€ text field per line
Etc.

It’s not html, it’s an API which needs to register anything and an UI which has lots of restrictions need to be enforced to prevent things get messed up

proven escarp
#

it's like saying html similar syntax to brainfuck

boreal iron
#

You can’t compare that to a simple html form

#

Not at all

hard wraith
proven escarp
#

written in c

sharp geyser
#

I'm not going to read all of what fake said as I'm not part of the conversation

proven escarp
#

but not based on c

ancient nova
#

how do I create a channel with preset permissions in discord.js?

wheat mesa
#

Written in C does not mean based on c

proven escarp
#

you don't

wheat mesa
#

Lmao

ancient nova
#

huh?

proven escarp
#

waffle is hecking right

wheat mesa
#

A lot of languages are written in C, doesn’t mean it’s based in C

sharp geyser
proven escarp
#

kinda stole my thing but still right

hard wraith
boreal iron
hard wraith
#

Like a select menu.

wheat mesa
#

Like I’m writing my language in rust, doesn’t mean it has anything similar to rust

proven escarp
#

send repo pls

#

i wanna see 😳

wheat mesa
#

When I’m done

sharp geyser
#

Waffle would never

hard wraith
#

This the breakfast language?

wheat mesa
#

I don’t have a repo yet

sharp geyser
#

His code is too bad to make a repo

hard wraith
#

Can I code with pancakes yet?

boreal iron
sharp geyser
#

Also waffle is pancake a valid keyword in your language?

ancient nova
sharp geyser
#

Yes

sharp geyser
#

Why

wheat mesa
#

And waffle is not valid

ancient nova
#

very nice

sharp geyser
#

WHY