#development

1 messages · Page 2043 of 1

slender thistle
#

This is a direct link

#

The og:url property one is what you need

upper current
#

so what am i doing wrong then

#

oh

slender thistle
#

I had to pick out about 50 Tenor gifs and realized I was doing it wrong like this

#

it was painful to go through several files replacing each gif URL

quartz kindle
#

its easy to test

#

if you copy and paste the link into your browser, and it opens the tenor website, then its not a direct link

#

a direct link will open the pure image/video in a blank page

upper current
#

ahhhhh

#

hmm

#

well unless i'm pulling the api wrong, this is the only link (other than the one similar to what discord sends, which also isn't right)

quartz kindle
#

then do what i said before

#

fetch the page and parse the opengraph tags

upper current
#
   {
     id: '17626088',
     title: '',
     content_description: 'Hand Writing GIF',
     content_rating: '',
     h1_title: '',
     media: [ [Object] ],
     bg_color: '',
     created: 1593161374.024217,
     itemurl: 'https://tenor.com/view/hand-writing-writes-cat-headbutt-gif-17626088',
     url: 'https://tenor.com/bl7vU.gif',
     tags: [],
     flags: [],
     shares: 1,
     hasaudio: false,
     hascaption: false,
     source_id: '',
     composite: null
   },
#

meh, i'm about to tell him his idea can play with the racoons in the dumpsters.

quartz kindle
#

what is the content of media?

upper current
#

looking now

#

didn't see it till now

#

i was looking for url's

quartz kindle
#

looks like it

upper current
#

will try again. if this doesn't work he's just SOL

#

ty

tacit citrus
#
//event#messageDelete
console.log(deletedMessage.author)
//Log: null
quartz kindle
#

only the message id, channel id and guild id

#

if you dont have the message cached beforehand, you cannot get it any other way

#

the audit logs will only give you information if someone else deleted the message

#

not if the authors themselves did

tacit citrus
#

i just want to make it an if for author#bot but i see

#

auditlogs showing self-deleted messages?

quartz kindle
#

no

#

the only way is to have the messages stored before they are deleted

tacit citrus
#

how can i do that 😃

#

wdym by storing

#

like database

#

?

quartz kindle
#

yes

tacit citrus
#

hmm but if i do it i should add all messages in the server

#

it can be useful actually

#

im using mongoDb for that

#

i can*

quartz kindle
#

if you cannot guess or predict which messages will be deleted, then yes, you'd need to store them all, which will quickly become a lot of data, so you will need a lot of storage

#

and you will also have to deal with privacy concerns

#

for example your bot will need to inform people that it is storing all messages, and the users must explicitly consent to it

#

otherwise you are violating privacy laws

boreal iron
#

Not if you state you’re doing it for national security reasons

tacit citrus
#

special for a server

split hazel
#

just throw some clause in a 50 page tos and call it a day

tacit citrus
#

ethic

fathom sonnet
#

just a quic question, why when i paste my text inside input field of my slash command on bot, it formats and looks like this

#

and not like it looks in txt editor:

sharp geyser
#

Seems to me that is how discord handles it

fathom sonnet
#

yep it could be

#

which kinda sucks

sharp geyser
#

It might look properly if you actually send it

fathom sonnet
#

nah i tried

sharp geyser
#

rip

#

I don't think slash commands support multi line text rn

#

I could be wrong tho

fathom sonnet
#

ahh i will try creating prefix command maybe it will work then

boreal iron
sharp geyser
#

Probably, but i don't think slash commands as of late does

boreal iron
#

Who knows if they ever will

sharp geyser
#

Yea lmao

boreal iron
#

Why app discovery is getting a thing when apps can’t use the features they’re forced to use

#

Because discord can’t move forward quick enough

upper current
#

if that helps

fathom sonnet
#

ok i goona try that, tnx

fathom sonnet
# upper current I had this issue with a couple of things, this is more annoying to do? but you c...

but...amm how should I use that, since msg that i sending is custom message? I use slash commands so idk will that work... ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const { MessageEmbed } = require('discord.js')
const { OWNER_ID } = require('../json/config.json')
module.exports = {
data: new SlashCommandBuilder()
.setName('message')
.setDescription('Send Message to selected channel')
.addChannelOption(option =>
option
.setName('channel')
.setDescription('Select channel.')
.setRequired(true)
)
.addStringOption(option =>
option
.setName('content')
.setDescription('Message you want to send.')
.setRequired(true)
)
.addStringOption(option =>
option
.setName('url')
.setDescription('You can provide url with message, it is optional.')

    ),

    async execute(interaction, client) {
        try {

            if(!interaction.member.permissions.has('BAN_MEMBERS') || !interaction.member.id === OWNER_ID) {
                interaction.reply('You are not allowed to use this command!!')
                return 
            }

            let msgChannel = interaction.options.getChannel('channel')
            let url = interaction.options.getString('url')
            let msg = interaction.options.getString('content')


            let mEmbed = new MessageEmbed()
            .setDescription(`**Local Message LOGS**
            Message Succesfully sent to the **${msgChannel}**
            -
            **Message Content**
            ${msg}`)
            .setColor('GREEN')
            .setTimestamp()

            if(url === null) {
                msgChannel.send(`${msg}`)
                interaction.reply({embeds: [mEmbed]})
                return
            }
                msgChannel.send(`${msg} \n ${url}`)
                interaction.reply({embeds: [mEmbed]})
            
            
        }
        catch(err) {
            console.log(err)
        }
    }
}
upper current
#

down at the bottom where you have ${msg}

#

it would be ${msg.replace(/\\n/g, '\n')}

#

in all spots

#

then when you type out that message via the command, anywhere you you want to shift+enter, you'd type \n and the bot would do it for you

fathom sonnet
#

ahh tnx for explanation man

#

goona try that

upper current
#

you're welcome

#

you care if i DM you?

fathom sonnet
#

you can no problme

#

problem*

tacit citrus
#

@upper current may i add you friend

upper current
#

ye

spark flint
#

weird place to bond lmao

sharp geyser
spark flint
#

ye

sharp geyser
#

lel

upper current
spark flint
#

too busy buying a $6 a year vps

sharp geyser
spark flint
#

some random place

#

only shit specs

sharp geyser
#

smh

spark flint
#

1gb ddr4 ram, 10gbssd

#

i don't need any storage really

#

its for testing shit

sharp geyser
#

send me link in dms

#

I wanna see this

spark flint
upper current
#

it right here brO

spark flint
tidal parrot
#

imagine paying for a vps when you can get 4 cores/24gb ram for free

spark flint
#

i already claimed that

#

lmao

tidal parrot
sharp geyser
#

from whom

spark flint
#

oracle moment

sharp geyser
#

I tried that

#

I didn't have the temp fee they wanted

#

now I do actually

sharp geyser
tidal parrot
#

you dont have a card?

sharp geyser
#

Nope

#

Only cash app

tidal parrot
#

parents card? it doesn't charge does it?

sharp geyser
#

It charges a 1$ fee then gives it back

tidal parrot
#

rip

sharp geyser
#

So when saving an image being uploaded to my api should I grab the buffer of the image and save it to my database and remake it when I need to serve the image again or just save a hard copy to the drive

quartz kindle
#

database is better for small data, disk is better for large data

sharp geyser
#

I see

spark elbow
#

I don't have access to the old account

#

But I was able to recover the bot

#

(with teams)

boreal iron
#

You may wanna ask in support

#

Or maybe ping one mod as it’s written down now anyways

spark elbow
#

Ok

dry imp
#

fake is a mod

boreal iron
#

Mods are fake

pine nova
#

💀

earnest phoenix
#

visual studio used to open my bot's output in windows terminal, how do i do that now rather than have it sent to the inbuilt terminal

quiet shoal
#

an example would be bin\Debug\net6.0\ProjectName.exe

#

oh

#

just realised you're not using .net

#

however a way around this is to open your bot's folder in windows terminal and then use whatever command you run to execute your bot

earnest phoenix
#

that doesn't debug it though

quiet shoal
#

i think the builtin debug console is required if you wanna debug

earnest phoenix
#

it didn't used to be

#

it used to open it in windows terminal

#

at least in vs 2019

quiet shoal
#

i found this

earnest phoenix
#

yes that used to be the case

#

now it is not

#

i have wt as the default but now it opens the output in its own window rather than an external window

earnest phoenix
#

and microsoft decided to not give the end user any choice

#

thanks for that

fathom sonnet
#

so for my welcome system, I managed succesfully set channel for welcome messages, saved it to db, but now i dont really know how should i send message in that channel, I have welcome.js file which actualy need to send message, but it dosent, i know i miss something in my code but cant find out what exactly:

setchannel.js: ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const {Permissions, MessageEmbed } = require('discord.js')
const Schema = require('../database-schema/welcomeSchema.js')

module.exports = {
/*
/**
* @param {Client} client
* @param {Message} client
*
*/

data: new SlashCommandBuilder()
    .setName('setwelcome')
    .setDescription('set channels for welcome messages')
    .addChannelOption(option =>
            option 
                .setName('channel')
                .setDescription('Set the channel where you want bot to send welcome messages')
                .setRequired(true)
        ),

async execute(interaction, client, message) {
    try {
        
        if(!interaction.member.permissions.has('ADMINISTRATOR')) return interaction.reply('You are not allowed to use this command')
        const channel = interaction.options.getChannel('channel')

        Schema.findOne({Guild: interaction.guild.id}, async(err, data) => {
            if(data) {
                data.Channel = channel.id
                data.save()
            } else {
                new  Schema({
                    Guild: interaction.guild.id,
                    Channel: interaction.channel.id,
                }).save()
            }
        })
        interaction.reply(`${channel} has been set as welcome channel`)
        .then(console.log)
        .catch(console.error)

    }
    catch(err) {
        console.log(err)
    }
}

}

#

there is no error or crashes...bot stays online and works fine

bright thorn
#

How can we get best radio station linkl

#

for radio bot

#

anyone have any website?

wheat mesa
pine nova
wheat mesa
#

No? He’s just listening for an event that would never get sent without the intent enabled. Would not throw an error.

#

If anything, sending embeds the way he did would’ve thrown an error (or at least sent a deprecation warning of some sort)

fathom sonnet
fathom sonnet
wheat mesa
fathom sonnet
wheat mesa
#

…what? OAuth is not an intent

#

Can you show what intents you’ve enabled in the developer portal with a screenshot (unless your issue is fixed already, in which case congrats)

timber fractal
#

I'm using nodemailer to send an email, but can I style html wich I'm sending with the mailOptions?

fathom sonnet
fathom sonnet
wheat mesa
#

Are you sure your event is even loaded?

#

Also, try logging data before you do anything in the callback function

earnest phoenix
#
let am = reply[Math.floor(Math.random() * reply.length)];
      const attackment = new MessageAttachment(am)
        interaction.followUp({files: [attackment]})```
#

when it send the image with link it sent like a box

wheat mesa
#

What is reply?

fathom sonnet
#

i think you cant get random links like that, you should use loop to go trough reply variable to get link since your reply variable is an array.

wheat mesa
#

Just because something is an array does not mean you have to loop through it

pine nova
wheat mesa
#

^ pretty sure that’s the issue

fathom sonnet
pine nova
#

wot

wheat mesa
#

The way he’s doing it is perfectly fine

#

I don’t see why you would ever need to loop through an array to get a random index of it

pine nova
#

yea thats what i was about to say 💀

quartz kindle
wheat mesa
#

imagine you do something like this ```js
let selected;

for(let i = 0; i < randomNumber; i++) {
selected = array[i];
}

doStuffWithSelected(selected);

#

surely v8 is smart enough to optimize that though

quartz kindle
#

i dont see how, that will still try to loop x times

#

and update a variable x times

wheat mesa
#

well I was thinking it would see that no matter what, selected will always just end up to be array[randomNumber] and optimize it like that

quartz kindle
#

i mean, sure, but idk if v8 is that good

#

im guessing that would need some kind of AI assistance similar to what modern gpus use and shit

#

AI accelerated processing

wheat mesa
#

interesting

spark flint
#

How can I SSH to an ipv6 VPS from an ipv4 ip

#

Or a network without ipv6

quartz kindle
#

you shouldnt need to have ipv6 to be able to connect to ipv6

earnest phoenix
#

all links are expired

#

i restored it and now it works correctly

quartz kindle
#

also why is your vps ipv6 only? everything is dual stack these days

#

ipv4 is still required everywhere for compatibility reasons

spark flint
#

its an ipv6 only vps because its cheap lmao

#

$9 a year

wheat mesa
#

Is ipv4 on everything though? My router seems to only have an ipv6 address which sucks for me because I can’t host a minecraft server with ipv6

quartz kindle
quartz kindle
quartz kindle
#

is ipv4 that expensive?

earnest phoenix
#

this time

spark flint
#

idk

#

but $9 a year for a 1gb ram ddr4 vps is fine for me

#

its for testing shit

quartz kindle
#

wtf lmao

spark flint
#

wait no $6 a year

quartz kindle
#

do we really live in a world where ipv4 accounts for 80% of the costs of a vps?

#

and nobody knows?

wheat mesa
#

ipv4 should’ve never existed

quartz kindle
#

i mean, thats the same as saying 32 bit should've never existed

#

and 16bit

#

they were needed stepping stones

wheat mesa
#

Well to be fair I guess the people inventing it at the time didn’t expect to ever run out of addresses

quartz kindle
#

well a bit of googling says you need an ipv4->ipv6 tunnel to access an ipv6-only vps

#

also cloudflare seems to have that

boreal iron
#

even hetzner is moving away from that

#

They're charging a ridiculous amount of when ordering IPv4s

#

look at the setup prices

quartz kindle
#

the same way there's still a shit ton of pcs running windows xp

boreal iron
#

ipv6 only is already the default for dedicated servers and will become the default for their cloud servers in the future

#

they're just not done developing the network tech yet

#

as stated in the forum

quartz kindle
#

will their plans become cheaper tho?

boreal iron
#

which never public their ipv4

boreal iron
quartz kindle
#

can you make an http request to an ipv4 website from an ipv6 vps?

boreal iron
#

yeah by using the internal routing of hetzner

#

you use their load balancers of course

quartz kindle
#

without paying for them?

boreal iron
#

no you pay for them, but you can add the servers to your virtual network using the virtual switches and you don't ipv4 anymore

#

as the target server never publishes it's ipv4 as the connection is only passthrough

#

either you use the virtual switches or their services like load balancers and firewalls

#

that's up to you

#

but the dedicated firewall (server) should of course have an IPv4

lofty cedar
#

I'm not sure if this is off-topic or not: how can I link a domain to a specific port of an ip?

boreal iron
#

but the passthrough connection to the targets can be either a virtual network and/or straight IPv6 behind the scenes

boreal iron
#

There's no such a DNS protocol supporting this except SRV records

#

But literally no fucking service today really supports SRV records for some reasonm

lofty cedar
#

so i basically need 2 different servers for 2 websites?

boreal iron
#

what is the goal?

#

what do you wanna do?

lofty cedar
#

those 2 website just don't belong to each other

boreal iron
#

and they're hosted on the same server?

lofty cedar
#

I'd like to

boreal iron
#

well that's when your webserver comes in place

#

you create the virtual host(name) which is your domain name, set the directory for it the server will listen to and that's it

lofty cedar
#

and i should point like an A name to the ip of the machine right?

boreal iron
#

yeah, usually you create a few records pointing to the target

#

gimma one second

quartz kindle
#

and you have a webserver like nginx

#

who points the connection to different websites by parsing the domain name

boreal iron
#

IN A www. -> target IP
IN A @ -> target IP
IN A * -> target IP

lofty cedar
#

thanks! what does * stands for?

boreal iron
#

which is obviously www.yourdomain.org, @ usually is the base tld itself and * is any wildcard

lofty cedar
quartz kindle
#

django is a framework, not a webserver i believe

boreal iron
#

the DNS consoles or zone management is different from hoster to hoster

quartz kindle
#

you need a webserver in front that points the correct addresses to the correct django processes

lofty cedar
boreal iron
#

some use @ for the TLD, some just leave the hostname empty

#

that's what you need to find out

quartz kindle
lofty cedar
#

yes

quartz kindle
#

have you ever used nginx?

#

or apache?

lofty cedar
#

actually no

quartz kindle
#

or litespeed

lofty cedar
#

yes used apache a little

quartz kindle
#

basically those are the most popular linux-based webservers

boreal iron
#

well if you have already used apache a little bit, then think about sticking to it

quartz kindle
#

for example you can install nginx or apache directly from your distro's package manager

boreal iron
#

Tim changing his messages again

quartz kindle
#

then lets say you have several websites, each one running on a different port, by a different script

#

you will use the nginx/apache webserver to match the domain names, and forward them via reverse proxy to a port inside the vps

boreal iron
#

each one running on a different port

assuming they're running on an own webserver

lofty cedar
#

ok i got it, thank you guys

boreal iron
#

static sites also exist

#

it's actually not that difficult once you got into it a little bit

split hazel
#

right so ive ran into a problem

#

is this 'unicode' character 2 bytes?
\©️

#

because it seems js is classifying it as a single character while my database parser disagrees

wheat mesa
#

does it have an ascii value? if not, 2 bytes I believe

split hazel
#

i think i may need to count the buffer bytes instead of how long the string is because js treats it as a single character

wheat mesa
#

doesn't look like it's on here, so

#

also, it's summer for me now so what should I do

#

I need a project to get off my lazy ass and do

split hazel
#

a database

#

:trollface:

wheat mesa
#

meh

#

I've thought about that but it requires a lot more effort than I'm probably thinking it does

split hazel
#

it really does 💀

wheat mesa
#

I've realized that I'm broke and I need something to work on to hopefully make some money out of lmao

boreal iron
#

you can go on doing my trivial work on my page but you will need to get into php a little bit :P

#

i have literally no fucking time i can spend atm

pine nova
wheat mesa
#

$10/hr for 40 hours a week is not only unappealing, but it'll make me like 2 grand over the entire summer at the cost of being miserable

pine nova
#

💀

boreal iron
#

$10/hr for 40 hours

#

weow

#

gonna pay you 20$ for 80 hours!!

#

take that offer, now!

wheat mesa
#

lol

boreal iron
#

you're cheaper than my one time investment Tim

#

ive got a lot of work to do sir

wheat mesa
#

I wanna build something that makes money but at the same time it feels like I lack the experience to create anything sophisticated enough to make money with

tidal nymph
#

should I go for servercheap or galaxygate for around 10$ vps

boreal iron
#

I wanna build something that makes money

good luck

wheat mesa
#

yeah exactly

boreal iron
#

I mean I'm working my entire life even as child

#

and im coding as hobby

#

starting today with a lot of experience, time and effort you can bring in there's a good chance of getting into something you can earn cash with

wheat mesa
#

I started programming about 1.75 years ago

#

But I'm quickly realizing that I need to make money pretty soon lol

split hazel
#

just dont go on these freelance bidding websites 💀

wheat mesa
#

And getting a job is an option, but I feel like it would burn me out of life while making pretty much no money doing so

boreal iron
#

burning you out of life---

#

wtf

#

you're young

wheat mesa
#

yes I am

#

school was pretty much doing that already lol

split hazel
boreal iron
#

im working 18h straight or even more if it's required

wheat mesa
#

And I don't wanna waste my summer playing video games and sitting here doing nothing

boreal iron
#

but as fucking employee you cant have an more stress-less life

wheat mesa
#

I want to at least build something that gets me experience

#

Even if it amounts to nothing in the end

boreal iron
#

hmm getting involved into something real quick is probably not really realistic

cinder patio
#

I just wanna say -- I got a job offer thanks to my open source projects. I feel like in this day and age open source projects on github / gitlab can help a lot in finding a job

#

just building a cool open source tool or website or anything really will yield at least something

boreal iron
#

I wouldn't rely on that only when it comes to the time you gotta have to pay your bills

wheat mesa
#

The problem with that is I feel like I don't have the experience to make anything open source

#

Well, I don't have any bills right now other than paying for gas and dates pretty much

split hazel
#

let me rip off a bunch of projects to fill up my github portfolio

wheat mesa
#

So right now is the perfect time in my life to do something that gets me experience

split hazel
#

tho i dont have to because i have so many projects i havent published to github

cinder patio
wheat mesa
#

I'm still only 16 so I have time

boreal iron
wheat mesa
#

I just want to make the most of my time

#

Yes 100%

boreal iron
#

you may change your opinion and will do something completelly different later on

#

happens to quite a lot of people

wheat mesa
#

At the moment I'm completely set on computer science

#

There was a point that I was very interested in physics, but once I actually did physics I find that I'm not very interested in it

boreal iron
#

lol

wheat mesa
#

Computer science and programming is basically the only thing that I genuinely enjoy doing

#

(When it comes to career options)

boreal iron
#

well... there're way more options possible nowadays than back in time like 10-15y ago

#

I mean why not

#

would have been helpful if you're already involved in a project you can now spend "more" time on

#

but finding something you can involved to is quite hard

#

and developing and releasing something completelly built on yourself people will use is even harder

cinder patio
#

As long as you have an idea and motivation it's not hard

#

At your age you should focus on building cool projects you can show recruiters

boreal iron
#

I mean programming has big range

#

what are really interested to do in exactly, Waffle?

wheat mesa
#

I'm really interested in lower-level stuff, compilers specifically

#

But I also have fun doing higher level stuff as a break from low level stuff

vivid fulcrum
#

my problem is that my greatest accomplishments are closed source

#

ideas i capitalized off of

#

though i made an open source app recently

#

so that's something

#

working on doing a good 2-3 large open source projects to expand my portfolio with different stacks

split hazel
#

anyone know how you can make a div ignore the styles of its parents?

cinder patio
#

yup that's a great thing to do

cinder patio
#

that the div inherits

split hazel
#

that might take a while

split hazel
#

an email is just a html web page

timber fractal
#

i cant attach a style sheet?

cinder patio
#

<style> </style>

split hazel
#

dont know about that one

timber fractal
wheat mesa
cinder patio
#

A programming language on your resume is pretty impressive

wheat mesa
#

Yeah that would look quite good lol

#

I should learn llvm

#

all the stuff I've made so far is from scratch without any llvm

#

Honestly maybe I'll do that

#

Because llvm makes it 1000000 times easier

#

(From what I've heard at least)

cinder patio
#

Definitely easier than generating assembly yeah

split hazel
#

its also sandboxed which is great for my email rendering feature

outer niche
#
@tree.error
async def on_app_command_error(interaction: Interaction, exc: AppCommandError):
    if isinstance(exc, commands.CommandOnCooldown):
        await interaction.response.send_message(f'This command is on cooldown. Please wait {error.retry_after:.2f}s')

    elif isinstance(exc, commands.MissingPermissions):
        await interaction.response.send_message('You do not have the permissions to use this command.')```So when using the error handler I don't get anything back. But I also don't get an error inside of my side on my panel I'm using discord.py 2.0
split hazel
#

unlimited trheads?

#

what is it supposed to be?

#

a thread?

vivid fulcrum
#

don't use a program in the first place

#

learn a programming language and code it from the ground up

#

i can provide you with a list of reliable hosting providers, but i need to let you know none of those are free. you will never find good free hosting

#

Need to run your bot 24/7? Get a cheap VPS.

https://www.scaleway.com/ - Incredibly cheap but powerful VPSes, owned by https://online.net/, based in Europe.
https://www.hetzner.com/ - Germany-based VPSes, with prices starting from as low as €2.96
https://www.digitalocean.com/ - US-based cheap VPSes. The gold standard. Locations available world wide.
https://xenyth.net/ - A hosting solution made by Discord bot developers, aimed at a lower price range, starting from $2.49.
https://www.ovh.co.uk/ - Cheap VPSes, used by many people. France and Canadian locations available.
https://www.time4vps.eu/ - Cheap VPSes, seemingly based in Lithuania.
https://www.linode.com/ - More cheap VPSes!
https://www.vultr.com/ - US-based, DigitalOcean-like.

Self-hosting:
Any modern hardware should work 100% fine.

Free hosting:
No. There is no good free VPS hoster, outside of persuading somebody to host for you, which is incredibly unlikely.

#

...so it isn't good

split hazel
#

i think autocode uses its own library

#

so you cant exactly port it easily

timber fractal
# cinder patio `<style> </style>`

what I've found out:
variables don't work
margin:auto doesn't always center it?
even a linear-gradient is considered an external image :/

vivid fulcrum
#

hosting isn't free because it simply has maintenance fees just like your parents have to pay the electric bills

#

impossible without some investment

#

and the chance of your bot really growing big is extremely low

#

what you have built, someone built it better

#

used to

#

ages ago

wheat mesa
#

There's some free options for hosting, but there is always a drawback to using free hosting services

boreal iron
vivid fulcrum
#

i used to have a generic bot that was a mix of everything, it went nowhere and generated no profit because there's already bots that do that better. still, if you want to try to go big, you'll have to invest some money

timber fractal
wheat mesa
#

You can use free hosts while your bot is small, but as it expands your needs will also likely expand

#

The hardware is generally the limiting factor

timber fractal
#

you could also get a pc wich will always be on and let your parents pay electric bills

timber fractal
#

although most parents probaly wont like that

wheat mesa
#

Buy an rpi and host it on there 😉

vivid fulcrum
timber fractal
wheat mesa
#

Well, no money means you're going to be limited

earnest phoenix
#

I hate it when people try to latch onto free stuff as much as possible, and then complain when something breaks or doesn't go as expected

timber fractal
#

get a job

wheat mesa
#

I want a tesla, anyone have teslas for free?

#

😉

pine nova
timber fractal
#

in my country you can do newspaper from 13 y/o

vivid fulcrum
wheat mesa
#

I use Oracle's free tier VPS for hosting my bot. The hardware is limited, but my needs are limited. It works just fine for me, never been charged a penny.

split hazel
#

someone made a cool list here but the mods wont pin it

timber fractal
#

only deliver, just to be clear

vivid fulcrum
#

by the time you find a way to actually generate reliable income you'll grow out of your bot development phase

timber fractal
#

and from 14 you now can work stocking the supermarket cause they haven't got enough people so they lowered the minimum age lol

split hazel
#

not in my country

wheat mesa
#

14 years old is when you can start working in the US I believe

timber fractal
#

why dont you start freelancing

split hazel
#

minimum working age in uk is 16

timber fractal
#

learn html & css and make websites for people online

#

fiverr idk

#

you live in the netherlands???

split hazel
#

lol there is no easy solution the world isnt a fair place

timber fractal
#

i was talking aboutthe netherlands all the time

#

i live there

split hazel
#

you just have to get lucky and find something free or host yourself

timber fractal
#

you won't get 3 euro/yr for a newspaper delivery

#

at 13

vivid fulcrum
timber fractal
#

doesnt matter

#

online courses

#

or make discord bots for other people

#

and sell them

#

you made discord bots right?

timber fractal
pine nova
#

youtube 🗿

timber fractal
#

bad idea in my opinion

vivid fulcrum
#

you just have to figure out which tech stack works the best for you, and if it works at all

timber fractal
#

you'll only copy paste

vivid fulcrum
#

some people are just not meant to be in the IT sector at all

pine nova
#

i mean i learnt from youtube and i dont copy paste but try to understand the code

#

😔

earnest phoenix
#

The guides on YouTube are mostly outdated, which leads to deprecation or completely breaking behavior, which is why it's considered as a bad idea

timber fractal
#

w3schools might help

earnest phoenix
#

And it's like one of those Minecraft guides where the YouTuber says "I did some building off screen" and comes up with a giant walking redstone machine

#

So many steps skipped that you have no idea what even happened

pine nova
timber fractal
#

why doesnt color work on fonts with the html in an email?

#

oh nvm im dumb

vivid fulcrum
earnest phoenix
vivid fulcrum
#

most people click off the latter because they don't want to spend their time learning, god who would do that

sharp geyser
#

😔

pine nova
#

docs are sometimes hard to read to beginners

#

relatable to me

pine nova
#

but i eventually learned to read them

timber fractal
#

pretty weird

sharp geyser
#

Only person I found that actually taught me something was Traversy Media

pine nova
#

same

vivid fulcrum
#

the youtube algorithm sometimes blesses me with youtubers who know what they're doing, and it's always the small ones, because again, they're not meant for the masses

pine nova
sharp geyser
#

I learned my piss poor knowledge of react from em (mainly cause I was hardly paying attention)

earnest phoenix
#

For most people it's just a deadend since they just don't want/tend to read the documentation or official guides

pine nova
sharp geyser
#

At least I myself have always managed to learn something from em

#

Ima take a break from this api for a bit and actually try and use some web dev stuff tbh

vivid fulcrum
#

very good decision

#

departing myself from discord bots was the best thing i could do

sharp geyser
#

I have turned from making discord bots to make a discord bot library

earnest phoenix
#

It would be understandable if you want to rather watch YouTube videos to learn if the official documentation and guides of the thing you're trying to learn are too hard to read or too confusing

pine nova
#

i learnt nodejs and js by making discord bots 💀

earnest phoenix
#

Such as Detritus' documentation troll

sharp geyser
#

some people just simply can't learn unless they see it for themselves in action voltrex

#

reading docs is cool but not everyone can learn that way

earnest phoenix
#

Too bad

sharp geyser
#

its not too bad cause a lot of people make vids on it so

sharp geyser
#

to be fair detritus documentation is kinda ass

#

google feud made it mildly better

earnest phoenix
#

A lot of people making videos on it doesn't mean it's a good way to learn either, nor should be the preferred way even for beginners

wheat mesa
#

it's better now that feud updated it

vivid fulcrum
#

if there's still people in this convo interested in web dev i absolutely recommend these guys - https://youtube.com/c/DesignCourse & https://youtube.com/kepowob

wheat mesa
#

it just doesn't hold your hand like djs's docs

#

since not as many people use it

vivid fulcrum
#

i cant remove embeds on the new android app

earnest phoenix
#

People spend more time writing good documentation and guides than those people who make janky videos on them

pine nova
#

frontend too hard fr 😔 (designing in xd or figma and stuff)

timber fractal
#

this is pretty weird

#

the centering on the email works on mobile, but on pc it just is somewhere like 1/3rd on the screen

#

could it be the inbox?

#

like the email client

sharp geyser
vivid fulcrum
pine nova
#

💀

earnest phoenix
vivid fulcrum
#

i still do it though mmLol

earnest phoenix
#

As I said, it's understandable if the documentation/guides of said thing you want to learn is janky

sharp geyser
#

I mean it is bad if you don't do it properly

#

If you are trying to do what they are doing as they do it you aren't taking anything in as you're not paying attention to what they are saying you are just copying, if you wait for them to finish what they are saying then try it you will retain that knowledge better

wheat mesa
#

making a design that works on multiple device screens is what truly sucks about frontend

#

one of the biggest turn-offs of frontend for me

sharp geyser
vivid fulcrum
#

i remove that weight by starting off with a ui library

#

all of the styles for responsiveness already done for me

earnest phoenix
vivid fulcrum
#

then from there start customizing your components

sharp geyser
earnest phoenix
#

And that is exactly my point

pine nova
#

💀

sharp geyser
#

who plans anything when doing frontend

vivid fulcrum
pine nova
#

fr

cinder patio
#

The only coding videos I watch are the ones which benchmark tools which market themselves as BLAZINGLY FAST

#

everything else is a bore tbh

vivid fulcrum
#

so, every npm lib ever? mmLol

earnest phoenix
#

🚀🚀🚀🚀🚀

vivid fulcrum
#

#1 LIBRARY FOR X, BLAZINGLY FAST

cinder patio
#

starred

pine nova
#

rust 💀

pine nova
earnest phoenix
#

"with a few(1092 🚀) dependencies", average Turkish Discord bot

pine nova
#

XD

sharp geyser
#

aint no fucking way

#

even as a joke why

pine nova
#

his cargo.lock really has like a lot of dependencies 💀

cinder patio
#

It has everything necessary to create a hello world

pine nova
#

lmao

vivid fulcrum
#

tfw the only piece of your actual code in the bot is the token

earnest phoenix
#

Don't forget the infamous discord-buttons for extra bloat performance and express for no usage totally necessary web-server running in the background

vivid fulcrum
#

the prophecy comes true

pine nova
#

💀

sharp geyser
#

ur mom is right next to node_modules

pine nova
#

lmfao

earnest phoenix
#

The only thing heavier than the node_modules directory is a Turkish developer's will to write the most cursed code in humanity

boreal iron
#

lol

sharp geyser
#

I bet I can write worse voltrex

vivid fulcrum
sharp geyser
boreal iron
#

that's your opinion

earnest phoenix
vivid fulcrum
#

BLAZINGLY FAST

pine nova
#

brainfuck moment

sharp geyser
#

a lot of message listeners I see

pine nova
vivid fulcrum
#

i don't know if it's just me because im not as active anymore, but i noticed a huge decrease in just absolute moron code in this channel

earnest phoenix
#

Hey I Have a discord bot with 141 cmd and i wanted to know if anyone wanted to help make 14 of them slash cmd

sharp geyser
#

no

#

Voltrex you call for turk turk comes

#

😔

earnest phoenix
pine nova
#

that indentation tho

civic scroll
#

auto

vivid fulcrum
sharp geyser
pine nova
earnest phoenix
civic scroll
#

javascript 💤

pine nova
#

lmao

pine nova
#

bruh 💀

sharp geyser
oblique palm
#

code is dancing

civic scroll
vivid fulcrum
#

me when your mom

#

i mean what

sharp geyser
earnest phoenix
earnest phoenix
vivid fulcrum
pine nova
vivid fulcrum
#

they took molly

boreal iron
#

thought Tim's the only capitalist here

sharp geyser
earnest phoenix
sharp geyser
#

sad thing is this code probably works

pine nova
#

i mean it works, the bot is well and alive

#

dem

civic scroll
#

can't wait to delay entire application when call wait func

sharp geyser
#

I doubt that is the actual code for luca

earnest phoenix
#

It isn't

#

It's just for the funny

pine nova
sharp geyser
earnest phoenix
#

If you're ever bored, take the code in that Luca repository and rewrite it to actually be optimized for fun

sharp geyser
#

only thing is uploading files is broken

civic scroll
vivid fulcrum
#

good lock soldier

earnest phoenix
civic scroll
earnest phoenix
#

Prertty simple id give the scr

civic scroll
sharp geyser
civic scroll
earnest phoenix
civic scroll
#

for some granular controls

#

mostly animation triggers

vivid fulcrum
sharp geyser
#

I need to learn more react

#

but idk what to make in react to actually use the features react offers rather then doing simple shit

#

🤔

civic scroll
# earnest phoenix

those are simple and with a bit of knowledge you should be able to do them

#

we will help

#

but not code for you

earnest phoenix
#

Oof

civic scroll
#

since it's not a topic of this channel

earnest phoenix
pine nova
#

uptime is like 1 liner

#

💀

vivid fulcrum
#

i wish people came in here with more original ideas

earnest phoenix
#

I don't think that will ever happen

vivid fulcrum
#

it's so fun to work on a problem that stems from an original idea

pine nova
#

fr

boreal iron
#

imagine not copying other people's stuff

earnest phoenix
pine nova
#

everytime i look for project ideas on net, every fucking website shows the same shit

acoustic reef
earnest phoenix
vivid fulcrum
#

i just dug up this absolute gem of a video

#

needs to be passed down the generations

earnest phoenix
# acoustic reef WYM kitchen sink

Kitchen sink bots are bots that copy other bots' commands and the developers try to shove as many commands as possible to it with absolutely no originality

acoustic reef
earnest phoenix
tidal nymph
earnest phoenix
civic scroll
#

@earnest phoenix this code stucks in an infinite loop

boreal iron
pine nova
earnest phoenix
pine nova
#

@earnest phoenix bruh metal gear rising chad?

#

😳

earnest phoenix
#

Yes

pine nova
#

🤝

earnest phoenix
acoustic reef
pine nova
earnest phoenix
civic scroll
# earnest phoenix Bro that is just info i wanted

alright so

channelinfo -> Channel object (built-in API)
commandcount -> self
help -> self (all)
invitations -> Guild.fetch<Invites> (also built-in API)
level -> session database, key-value (small member count)
poll -> Interaction<(Button, Button)>, database <Message, Option[]> where Option is { text: string, count: num } and an action listener
roleinfo -> Guild/GuildMember (built-in API)
rolememberinfo -> EINVARG: what
severinfo -> Guild (built-in API)
uptime -> self
weather -> Fetch (runtime API) -> website 
whois -> User/GuildMember (built-in API)
pine nova
civic scroll
#

ah wait

#

he wouldn't understand

#

i forgor

earnest phoenix
#

Most of the ranked battles requires you to get 5000 battle points, not just the no damage bonus

pine nova
#

i am still not able to defeat armstrong on very hard (the fist fight)

#

man just explodes out of nowhere

civic scroll
#

this is fine right

earnest phoenix
pine nova
#

yea

#

mb

civic scroll
#

for objects where its values are non-consistent or nested objects

wheat mesa
#

Yes

civic scroll
#

wew

wheat mesa
#

Any recommendations on what I should learn before diving into LLVM?

#

The only language parsers I've ever made are in C# and Java, so C++ might be a bit of a jump

boreal iron
#

remember my offer

#

20$ - 80h

#

got a lot of stuff to do

#

can't finish my construction site outsite

wheat mesa
#

I don't know any PHP unfortunately

boreal iron
#

lol not php

#

REAL WORLD JOBS my friend

wheat mesa
#

Oh

#

lmfao

boreal iron
#

pants down and do what u have to to get my money

wheat mesa
#

So my intuition was right, it was a joke lol

boreal iron
#

:D

wheat mesa
#

🤨

boreal iron
#

I see that sounds weird in English

wheat mesa
#

Just slightly mmLol

boreal iron
#

yeah I noticed

#

got literally nothing to do for you then

#

can send u some cash just for fun like tim but that wont help you out, too

wheat mesa
#

I'm gonna set a goal of making my own language this summer, whether I achieve it or not will be up to me

#

That'll at least look good for potential tech internships and such

boreal iron
#

hmm collecting experience or not

wheat mesa
#

ok what the fuck llvm lmao

boreal iron
#

but do something you may can work with later on

#

following some long term goal

#

oh got what a syntax

wheat mesa
#

intensely casting

boreal iron
#

Ill stay with php my gosh

prisma locust
#

guys discord doesn't approve of music bots anymore?

winter pasture
#

Nah, not really

boreal iron
#

dont u even have 1 min of patience until somebody answers it in gernal

#

my gosh

winter pasture
boreal iron
#

true

#

never really got why music bots are a thing on a chat platform

prisma locust
#

🙂

boreal iron
#

regarding that bullshit quality on discord anyways

winter pasture
#

I like the idea for stage channels, like wait music

#

But other than that, nah

boreal iron
#

wait music lol

#

reminds me of an elevator

winter pasture
#

Ye, just something to fill the gaps xD

vivid fulcrum
#

it's the platforms that the bots stream from

#

tons of legal trouble

winter pasture
#

Copyright laws, YouTube/Spotify TOS etc

boreal iron
vivid fulcrum
boreal iron
#

lol

vivid fulcrum
#

youtube vanced wasn't a thing and spotify wasn't in my country yet

winter pasture
#

I could not live without YT premium. No ads + background play ❤️

boreal iron
#

i mean nowadays they're just pissed about loosing money

#

if people bypass ads

winter pasture
#

iOS so no YT vanced for me

boreal iron
#

that's all what matters anymore

#

cash, cash, cash

vivid fulcrum
#

you can bypass ads even on ios by using blokada iirc

#

blokada sets up a vpn middleware that blocks all traffic to ads

winter pasture
#

Ye not going to route my traffic via a sketchy third part kek

boreal iron
#

I mean my pihole and adlists block most of them, too

vivid fulcrum
#

it isn't third party

boreal iron
#

but so many new always

pine nova
vivid fulcrum
#

your traffic isn't going through another provider

pine nova
#

vanced also got poofed from pc

boreal iron
#

which need to be added to the lists

vivid fulcrum
#

it's a local vpn

pine nova
#

😔

winter pasture
#

Ah

boreal iron
#

Wasn't there a browser on iOS doing that in the past?

#

Like puffin on however it was called

vivid fulcrum
#

the only con is that since it's running locally, it drains battery a lot

#

i only use it when im reading articles on my phone

boreal iron
#

shouldn't be a big deal to host the vpn server on a system in your network

vivid fulcrum
#

thing is im almost always running on data on my phone

#

even at home lol

#

unlimited + 5g makes it more ideal than my actual home internet speed

winter pasture
#

I run a pi.hole for all my ad blocking, pretty slick to have a network wide adblocker

boreal iron
#

yeah

#

especially when it comes to ad and service blocking on 3rd party devices like IoT devices, smart TVs etc.

#

I'm paranoid I guess

winter pasture
boreal iron
#

but i'm literally blocking any communication I don't like

#

well I see, I'm a little bit more paranoid than u

winter pasture
#

I could probably get the block % up a bit further with more strict rules

boreal iron
#

i got around 20 million domains

#

xD

winter pasture
#

But I got a few non-techy people in the house hold

#

So cant block too much

boreal iron
#

sure you can

#

the less they see the less they know

winter pasture
#

They get annoyed I break their facebook ads sad

#

Got it enabled on my devices tho, but % is still low due to that

boreal iron
#

hmm I'm blocking that entire platform and each associated service

#

social media crap

winter pasture
#

Ye

#

What I like the most is seeing when people go to bed on the network graph xD

#

Guess when we went on holiday 😛

boreal iron
#

i see you're spying

#

does your query log contain the domain names the people are requesting?

#

lol now I realize 117 clients are connected to your pihole

#

wtf

#

and I thought I'm a crazy nerd with 17 devices in my house

winter pasture
#

I got a... well... a connected home

boreal iron
winter pasture
#

How can I live without my WiFi connected RGB lights cool_doge

boreal iron
winter pasture
#

Probably sending all my data to China

boreal iron
#

I know how u feel Sir

winter pasture
#

Need to call my ISP to upgrade my connection. Used to have 1gig up/down

boreal iron
#

ffs 1gig up and down

winter pasture
#

Upload is what pains me the most

boreal iron
#

I'm literally dreaming of 1gig upload Sir

winter pasture
#

I do a lot of large Git operations and Media uploads

#

So would be slick to have upload fast again

boreal iron
#

yeah got two servers running here and 50 mbit is not enough

winter pasture
#

Yeah, thats yeah, suffering

sharp geyser
#

So Express.Multer.File.size says it returns the size of the file in bytes

#

But it doesn't seem to convert well when trying to calculate how big it is in megabytes

wheat mesa
#

Bytes / 1024 / 1024 = megabytes

sharp geyser
#

That would be way too large

#

lmfao

#

What the hell does the OS do to make it round up to 4.17 when I am getting a fuck ton of numbers after 4.17

wheat mesa
#

It… rounds the fucking number you dingus

#

Idk what language you’re using

#

Ts?

#

<Number>.toFixed(2) for 2 decimal spots

split hazel
#

new speedb update: you can now include select columns to return instead of returning everything and wasting unused resources and performance reading and sending it

#

i love using my database in my projects

#

when i need a functionality i just implement it

sharp geyser
split hazel
#

its not even public yet 💀

#

unless im doing it for fomo

vivid zenith
split hazel
#

my db is shitting itself rn

sharp geyser
#

sucks

#

So I was just sitting here thinking about something, I was making a database table for images that is going to be saved to display later. But if I am saving the images to the disk and or a s3 bucket. What is the point of the table

#

🤔

solemn latch
#

Well, a table can hold important data.

#

It's hard to tell without context, but like ownership info, public/private settings, view counts, users who have permission to modify the image, titles, description, etc all can be in the database table.

#

All that can theoretically be stored as meta data. But a database table will be more stable and significantly faster.

sharp geyser
#

I see, I didn't think about it that way

#

Thanks

#

This will be helpful if I ever think of adding permissions for images

solemn latch
#

I really suggest planning your database now even if you're not going to implement it in code yet.

#

I've backed myself into a corner by not properly planning databases

split hazel
#

speedb update: fixed bug where fetching many records without specifying specific parameters would error the database causing timeouts and deadlocks for future queries

sharp geyser
wheat mesa
#

What?

sharp geyser
#

a post request probably mmLol

wheat mesa
#

I don’t think Instagram has a public API for that. Sounds against ToS

sharp geyser
#

It doesn't

lament rock
#

youd have to scrape

#

theres a project called bibliogram which you can look at

sharp geyser
#

You wouldn't be able to post messages tho would ya

#

you'd only be able to get them

lament rock
#

you can packet sniff to see what endpoint the client is requesting and what the body looks like

#

or just route traffic through a proxy you own and can log data through

#

that's the easiest way to reverse engineer a client

#

if it offers a web client, you can use the networking tab of dev tools

sharp geyser
#

I am getting this error when using minio to put an object to my bucket

BadRequestException: write EPROTO 305E0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:355:```
pine nova
#

nice error 🗿

mint pasture
#

i havw

#

not started the bot in a while

#

so might just do that

wheat mesa
#

I severely underestimated the size of llvm

#

holy shit lmfao

#

took me 2 hours to install

errant jasper
#

Can someone teach me some basic bot coding tools?

sharp geyser
#

ez

#

all you really need to start coding

errant jasper
#

Ek

#

I'm in mobile and has the urge to create a bot ty

sharp geyser
#

and ofc knowledge of the lang you are using but that is implied when you start coding a bot

#

I am going to tell you now don't

#

it is living hell

errant jasper
#

Nah

sharp geyser
#

I don't even know anything for mobile development

errant jasper
#

I have mimo app should be easy-

sharp geyser
#

Anything you'll use won't likely have intellisense so it will be like coding blind

errant jasper
#

Oh

#

Let's stick to webhook instead :)

dry imp
#

imagine using intellisense when coding

sharp geyser
dry imp
#

make me, mistyyboi

#

actually dont

wheat mesa
#

ok so LLVM is fucking amazing why have I not been using this sooner

sharp geyser
#

you watch xqc

pale vessel
#

xqc 👍

dry imp
#

qvc 👍

sharp geyser
#

xqc bad

#

can't change my mind

dry imp
#

true cocomelon good

acoustic reef
#

cocomeelon 💀💀

earnest phoenix
#

let values = collect.values[0]

#

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

#

is there a problem right here ?

sharp geyser
#

seems like there is nothing at 0

#

console log collect.values to make sure there is anything in the array

slender thistle
#

values or values()

pale vessel
#

__values__()

slender thistle
#

OwO

earnest phoenix
#

what should i do ?

#

in the days ?

trail gazelle
#

Meh

slender thistle
#

Just don't set the days key maybe

earnest phoenix
#

alright

earnest phoenix
wheat mesa
#

(I might be wrong though)

split hazel
#

set it to -1

#

it will instead send a days worth of messages instead of deleting them

quartz kindle
earnest phoenix
#

because of the number of lines it uses

quartz kindle
#

the number of lines doesnt really affect performance

earnest phoenix
#

i don't mean it in terms of performance

quartz kindle
#

but if you want to make it shorter you can put everything in a loop

earnest phoenix
#

i mean it in terms of the length of the inevitable file

quartz kindle
#

it would help if your keys are the same as the string youre sending to the translate funcion

#

then you can just do ```js
const items = ["abc", "xyz", ...]
const obj = {}
for(item of items) {
obj[item] = translate(lang, item)
}

#

but if you cant make them the same, then you need an object mapping them to each other

pine nova
#

🗿

ancient nova
#

how do I get the banner from a person?

pine nova
#

💀

earnest phoenix
#
const collector = interaction.channel.createMessageComponentCollector({type: "SELECT_MENU"})
      collector.on("collect", (collect) => {
        let values = collect.values[0]
        if(values === "4"){
             const embed1 = new MessageEmbed()
        .setColor("WHITE")
        .setTitle("**Memes Commands**")
        .setDescription(`
\`${prefix}am\` : **__Showing  Arabic Memes__** \n
\`${prefix}em\` : **__Showing  English Memes__** \n
`)
          collect.reply({embeds: [embed1], ephemeral: true})
        }
        if(values === "5"){
           const embed2 = new MessageEmbed()
        .setColor("WHITE")
        .setTitle("**Games and Fun Commands**")
        .setDescription(`
\`${prefix}youtube\` : **__Watch youtube videos in a voice channel \n
\`${prefix}tictactoe\` : **__Tic tac toc game__** \n
\`${prefix}choose\` : **__Would Your Rather Game__** \n
\`${prefix}encut\` : **__English Question__** \n
\`${prefix}cut\` : **__Arabic Question__** \n
`)
          collect.reply({embeds: [embed2], ephemeral: true})
        }
        if(values === "6"){
          const embed3 = new MessageEmbed()
        .setColor("WHITE")
        .setTitle("**Memes Commands**")
        .setTimestamp()
        .setDescription(`
\`${prefix}timeout\`: **timeout a member from the guild__** \n
\`${prefix}nuke\`: **__Nuke a Channel From The server__** \n
\`${prefix}ban\`: **__Ban a member from the  guild__** \n
\`${prefix}kick\`: **__Kick a member from the guild__** \n
\`${prefix}mute\`: **__Mute a member from the guild__** \n
\`${prefix}unmute\`: **__Unmute a member from the guild__** \n
The version in not completed in moderation
`)
          collect.reply({embeds: [embed3], ephemeral: true})
        }
      })```
#

error

#

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

#

how to fix it ?

wheat mesa
#

collect.values is undefined

sharp geyser
#

it has no values prop

earnest phoenix
sharp geyser
#

No idea it is your code

earnest phoenix
#

collect.values === "4"

sharp geyser
#

I have no idea what your intention here is

#

👀

wheat mesa
#

perhaps you should try reading the documentation

earnest phoenix
sharp geyser
#

I know this dude did not just try and use values after being told it does not exist

wheat mesa
#

also, I'm not sure why you're doing type: "SELECT_MENU"

#

I'm surprised that even works

#

it should be componentType: "SELECT_MENU"

earnest phoenix
#

bro

#

it working but sometimes give me the error

sharp geyser
#

I doubt this works

#

as again

#

values does not exist on interaction

earnest phoenix
#

alright

sharp geyser
#

the collect event on that collection returns an Interaction

#

this is what an interaction is

wheat mesa
#

Technically the type is SelectMenuInteraction

#

So it does have a values prop

#

When it's undefined, there is no value selected. You need to check if it exists first, then you can do let values = collect.values[0]

earnest phoenix
#

k

sharp geyser
wheat mesa
#

use ur brain misty

earnest phoenix
sharp geyser
#

I didn't think that'd work sense it wants componentType instead of type

#

😔

boreal iron
#

It's still called SELECT_MENU no matter the option name is correct or not

sharp geyser
#

ok fake

#

get outta here

earnest phoenix
#

i think this incorrect

#

const collector = interaction.channel.createMessageComponentCollector({componentType: "SELECT_MENU"})

wheat mesa
#

that's correct according to the docs

sharp geyser
#

not what the docs say

wheat mesa
#

unless you're using an outdated version of djs

earnest phoenix