#development

1 messages ยท Page 200 of 1

quartz kindle
#

maybe

radiant kraken
#

heaven for u

quartz kindle
#

too late now

#

i hate math tho

#

i was asked to produce some js exercices for students to solve

#

i made one where you have to decode a messagepack message in js

#

i wonder how many people managed to solve it :^)

#

its not hard, its just something very unusual for students, most of them are never taught how to work with binary in js

#

being a js student is like 99% express frameworks and web dev

tawny lava
#

illegal

radiant kraken
#

when they think of js they think more of web development

quartz kindle
#

it identifies as c++

#

its 2024

radiant kraken
#

wtf

#

nah js is pretty cool

sharp geyser
#

do not taint the name of c++

#

how dare you

radiant kraken
#

C++ is okay, JavaScript is pretty cool

quartz kindle
#

js is a monstruous clusterfuck that managed to captivate the entire community

#

everybody loves js, even though its ugly and weird

#

and everyone wants to include it and befriend it

#

js is the average teenage school student anime protagonist

surreal sage
surreal sage
#

ugly, weird and bad

#

maybe less ugly

quartz kindle
#

python is that one school bully that used to be the shit but became hated and forgotten

#

programming languages as anime character stereotypes

#

go

quartz kindle
tawny lava
#

where's rust

sharp geyser
#

its too new for that

#

js is good for what it does

surreal sage
#

go is kinda similar but doesn't feel the same at all

sharp geyser
#

make your own

surreal sage
#

make it in js?

sharp geyser
#

no make your own language

#

with similar syntax

surreal sage
#

yes, a lang similar to js made in js compiled by js

tawny lava
#

typescript?

surreal sage
#

compiled

tawny lava
#

yea

sharp geyser
#

I mean

#

technically ts isn't compiled

#

it's a form of compilation

#

but not true in of its word

tawny lava
#

I know it's technically "transpiled"

sharp geyser
#

TS transpiles down to JS

sharp geyser
#

transpiling is a form of compiling

#

its just a source to source compilation idk if I am wording this correctly

tawny lava
#

all I hear is nerd emoji whenever makes that distinction

sharp geyser
#

๐Ÿ˜ญ

#

this is why I can't talk about anything with you

#

uh

#

js was never the "single language for everything"

#

just nerds tried to make it adapt to that sterotype

#

and you saw how performant most of it was

#

๐Ÿ’€

#

tensorflow in js? pfft

tawny lava
#

like I know how stuff works I just don't care enough about lil things that don't matter

sharp geyser
#

it does matter lizard

tawny lava
#

I don't think it matters if I say compiled or transpiled

sharp geyser
#

you just dont respect me enough and are always a hater when I speak about something that interests me

tawny lava
#

gg

#

ur right actually everything I do is because I want u to be mad

sharp geyser
#

knew it

#

reported to T&S for hater behavior

surreal sage
#

assembly

frosty gale
#

it can do it but for meaningful performance you need the cpu/gpu bindings

#

the only thing the v8 engine actually cant optimise well enough

lyric mountain
#

like, if ur sending currency as cents, you really dont want decimals

sharp geyser
#

if I cast it to an int would that not remove the entire point of using floats?

#

Well

lyric mountain
#

because u dont have cent-cents

sharp geyser
#

hm

#

well the frontend sends it as a float

lyric mountain
sharp geyser
#

so on the frontend "$10,000.99" -> "10000.99"

lyric mountain
#

like, stripe is expecting the value in cents right? such that 10 would become 0.10

sharp geyser
#

yea

#

it expects all its values in cents

lyric mountain
#

so if you multiply by 100, you're converting from dollar to cents

sharp geyser
lyric mountain
#

so at this point the decimals (post conversion) make no sense at all

#

so just remove them

#

you cant have partial cents

sharp geyser
#

So what are you proposing the workflow be?

#

From frontend -> backend

lyric mountain
#

this would only be an issue if you allowed 3 decimals on the frontend

sharp geyser
#

As it stands right now, the price is sent as a string

lyric mountain
#

BUT precision issues happen, you really dont want to send stripe 1000.0000000000003

sharp geyser
#

then parsed into a float then back into a string to remove the . mmLol

#

I am doing a lot of needless steps, but at the same time, I want to save the price in its dollar form

#

not cents

lyric mountain
#

parse the string as double, multiply by 100 (dollar -> cent) then cast down to int

#

10.50 should end up as 1050

#

10.505 should also end up as 1050

sharp geyser
#

so basically

let price = price.parse::<f64>().unwrap() * 100 as i64
lyric mountain
#

yeah

sharp geyser
#

hm that could work

lyric mountain
#

but I really advise u to work with integers for anything related to currency

#

saves a lot of headache and eases up on calculations

sharp geyser
#

Should I save the price as its string rep then in the db?

lyric mountain
#

save as the integer rep

sharp geyser
#

cause rn its saved as a float

#

right

#

but thats going to be in cents

#

I mean I guess I can save it as cents

lyric mountain
#

if ur using postgres there's also CURRENCY datatype, which uses integer anyway but appears as float to you

sharp geyser
#

Oh?

#

Thats neat

lyric mountain
#

but it's not worth the hassle, just save the cents and divide by 100 when u want to show as dollars

sharp geyser
#

right

#

im done with rust bro

lyric mountain
#

also i64 might be a bit too overkill unless ur handing billion dollars transactions

sharp geyser
#

๐Ÿ˜ญ

lyric mountain
#

actually, trillions

sharp geyser
#

๐Ÿ’€

lyric mountain
#

what was i64 limit again?

sharp geyser
#

will it cause any performant problems

#

?

lyric mountain
#

ah yes, 184,467,440,737,095,516.15 dollars

sharp geyser
#

I be handling those on a daily

#

#1 company haven't you heard?

lyric mountain
#

also occupy less space

#

as i32 uses 32 bits

#

i64 uses double that

sharp geyser
#

so woukd i32 suffice

#

or i16

lyric mountain
#

yeah pretty much

#

i32 is good up to slightly over 2b cents

sharp geyser
#

damnnnn

lyric mountain
#

double that if you use unsigned

sharp geyser
#

I hope to ever reach that much in sales let alone transactions on the platform

lyric mountain
#

a nice lookup table if u need

#

cant send as message cuz automod

#

oh, right, max value - 1 cuz 0 is a value too

sharp geyser
#

is the datatype currency or money in pg

lyric mountain
#

hm?

sharp geyser
#

there is no datatype currency

lyric mountain
sharp geyser
#

but there is money

#

but idk if thats what you meant

lyric mountain
#

yes money

sharp geyser
#

or if I was on an outdated version

#

weird

#

I tell it to use money, but it still says its data type is float8

#

๐Ÿค”

#

Is that on purpose?

#

oh wait there we go

#

Took a year to update

lyric mountain
#

I'd still recommend INT tho, no reason to use a much larger datatype

sharp geyser
#

hm?

#

you said to use money

sharp geyser
#

AH didn't see that

lyric mountain
#

just said that between floats and money it's better to use money for currency

sharp geyser
#

AH

#

why am I still in caps lock

rose warren
#

Has anyone used unleash for feature flags?

sharp geyser
#

huh

sharp geyser
sharp geyser
#

@lyric mountain ty so much, now I have a better idea on how to handle this and it works wonders!

eternal osprey
#
let userdatabase = JSON.parse(
        fs.readFileSync("./userdatabase.json", "utf8")
      );
      const currentMembers = interaction.guild.members.cache;

      // Convert the user database object into an array
      const userArray = Object.entries(userdatabase);

      // Filter the user array to keep only the users who are in the server
      const filteredUserArray = userArray.filter(([userId, userData]) =>
        currentMembers.has(userId)
      );

      );

If a member is in the server, but not cached i get a problem as it will not include the user. Any way to cache all users beforehand or maybe a different property to check if a user is in the server?

timber hatch
eternal osprey
#

idgaf if my data fucks up

eternal osprey
lament rock
#

You could also listen to the GUILD_MEMBERS_CHUNK event

eternal osprey
lament rock
#

As fetching triggers that event

#

the ws emits that event when you call fetch though I think djs already accumulates the results from that. If there is a return value of a Collection of GuildMembers then just use that

#

simplifies things

#

I'd put a timer on how often you can call that function though

#

It bypasses cache iirc

#

Alternatively, just call it once on startup for each guild if you have the GUILD_MEMBERS intent

eternal osprey
#

hmm i see!

#

i can try it out and see how it turns out

#

thank you!

#

would anyone like to see my tcp packet parser in python ๐Ÿ˜ญ

#

i got like pretty far but there are some details that are still unclear to me

#

especially the lossy layer

quartz kindle
#

for each user id, try to fetch the member with that id, if it fails, remove it from the list

#

if you absolutely need to fetch ALL members, then you need to have the relevant intents as well

lyric mountain
#

json is never an option

sharp geyser
#

what about using discord channels?

quartz kindle
#

i used it at 2k guilds

#

huehuehue

sharp geyser
#

yes well tim

#

we expect that of you

timber hatch
quartz kindle
#

lmao

sharp geyser
#

you like to take the most wild situations

#

and make em somehow work for you

#

though tim, make a relational database using only discord channels ;)

quartz kindle
#

my methods are usually abnormal indeed

sharp geyser
#

Shouldn't be too hard

quartz kindle
sharp geyser
#

who

#

no way they made it relational

#

like table relations

quartz kindle
#

idk search github, there are dozens of repos about storing data in discord channels

sharp geyser
#

and here I thought I had the next big thing

quartz kindle
#

they even made it a cloud storage that shows up in windows as a network drive

sharp geyser
#

I knew about the repos for using discord channels

#

but I didnt think they'd make it relational

quartz kindle
#

hook into the windows api idk

#

the same thing other cloud storage clients do

surreal sage
#

top five things i hate

#
  1. france
#
  1. belgium
#
  1. node_moduules
#
  1. python
#
  1. #1
eternal osprey
#

Bot

#

I donโ€™t care about things failing

surreal sage
#

stupid question

#

but can redis persist

sharp geyser
#

yes

#

It's not really meant for long term storage

surreal sage
#

on a scale from 1 to 10 where 1 is the hardest
how easy is it to set up a redis instance

sharp geyser
#

but it can be

#

its stupid simple

#

there is guides on how to do it all over the place

#

So long as you aren't doing it on some unheard of os

surreal sage
#

tbh starting to use debian instead of ubuntu

#

2gb idle on fresh install isnt rlly my thing

quartz kindle
frosty gale
#

im pretty sure you can completely disable that in settings though

quartz kindle
#

disable persistency or disable non-persistency?

#

lmao

frosty gale
#

so keys arent stored on disk so reloading redis will clear everything

#

turns it into memcached

quartz kindle
#

gotta love unreadable/unintuitive variable names

quartz kindle
surreal sage
#

ofc unreadable var names

quartz kindle
#

its meth

surreal sage
#

its math in programming

#

in general

frosty gale
#

or do a hack by making the redis data directory a symlink to /tmp

#

i do that with a lot of programs i dont want storing persistent data

surreal sage
#

๐ŸงŒ

quartz kindle
#

place the sqlite file in /tmp

#

blazing fast database

surreal sage
#

persistent

#

i mean

#

dementia

#

database

quartz kindle
#

xD

frosty gale
#

amnesic

quartz kindle
#

@frosty galeever heard of skytable?

silver jackal
#

finally

#

@sharp geyser

quartz kindle
#

apparently its a new nosql db written in rust that is 25x faster than redis

frosty gale
#

what is this sql rip off

#

sql wants its copyright back

#

doesnt look bad though

quartz kindle
#

lmao

#

never heard about BQL either

#

apparently its an SQL superset

#

idk

sharp geyser
#

wtf

#

space and models

#

๐Ÿ’€

frosty gale
#

i like the array lists though

#

wonder how theyre stored

sharp geyser
#

trying to become the next big thing eh

silver jackal
#

@sharp geyser

quartz kindle
sharp geyser
#

BRO STOP FUCKING PINGING ME

silver jackal
#

@sharp geyser where is my $200 credit?

sharp geyser
#

Ask digital ocean

frosty gale
#

i always find relational databases to be outdated with the times when it comes to storing lists and slightly dynamic columns

#

times are changing

sharp geyser
#

Its not like I can fucking help you

frosty gale
#

i dont want to make a whole ass table for a field

sharp geyser
#

I don't work for them

quartz kindle
#

im happy with my offline stack tho, no tcp bullshit

#

sqlite db + lmdb cache :^)

frosty gale
#

yeah thats one of the drawbacks with a lot of these server databases

#

its mandatory TCP

#

you get unnecessary overhead

#

its not much but its still there

quartz kindle
#

yeah they are all designed as servers

sharp geyser
frosty gale
#

yes thats why i dont like conventional relational databases all that much

sharp geyser
#

I mean, if you aren't making table relations its not relational at all

frosty gale
#

some data i feel is too insignificant to store in an entire table but not enough to store in a single static column

sharp geyser
#

Right

#

So thats when you would use array lists depending on how deep the data is

frosty gale
#

but it would complicate some things like multiple clients

sharp geyser
#

I myself still use array lists in my pg database most of the time

frosty gale
#

although on the database end it becomes annoying storing these dynamic arrays and data types

#

because its likely implemented as a linked list so to get all the entries in the array the database has to jump and follow these links to gather all entries

#

some databases let you fetch these separately as a result

surreal sage
#

ughhhhhh im migrating servers and I REALLY dont feel like setting up mongodb again

sharp geyser
#

simple

#

dont use mongodb :)

silver jackal
#

man you guys are suck

sharp geyser
#

๐Ÿค”

silver jackal
#

DigitalOcean is just trying to scam me

sharp geyser
#

Not true

silver jackal
#

i got 0 on free trial credit

#

Literally zero

#

explain this?

sharp geyser
#

Well for one, thats how much it costs you currently

#

Also two, have you ever used digital ocean before?

silver jackal
#

this is my first time

sharp geyser
#

Alright

silver jackal
#

@sharp geyser im buying droplet

warm surge
sharp geyser
#

that's how much it will cost you then?

#

0$?

silver jackal
#

SSH Key or Password

sharp geyser
#

Up to you

warm surge
#

password

sharp geyser
#

I would also recommend password until you learn what ssh keys are

#

cause by the sounds of it you dont

silver jackal
#

done @sharp geyser

#

created it

#

the one $96 ubuntu

warm surge
sharp geyser
#

Alright, well I hope you made sure you actually did have the credits

#

๐Ÿ’€

silver jackal
sharp geyser
#

Cause if not rip

silver jackal
sharp geyser
#

its crazy that costs 96$

silver jackal
#

Wait will it charge me even if i have zero money?

#

Because it doesn't say that im charged $96

sharp geyser
#

Not if you have the credits as a new customer assuming you signed up through that thing and claimed it

silver jackal
#

shit

#

it says $96 on billing ๐Ÿ’€

warm surge
silver jackal
#

i don't have $96

#

ok card

#

@warm surge why can't i remove a card

#

from digitalocean

#

Bro this is so sketchy

#

i will just stick to galaxygate

warm surge
warm surge
silver jackal
#

wtf

sharp geyser
#
  1. Go to the settings Page
  2. Click Billing
  3. There should be a thing that tells you how many credits you have
  4. If it says you have none, and you are indeed a first time customer of digital ocean then contact customer support.
silver jackal
#

this website trying to take my money

sharp geyser
#

Its a company ofc it wants your money, chances are you just are misreading the entire situation

silver jackal
#

it says the charge bill will appear tomorrow

sharp geyser
#

why dont you contact customer support if you feel like there is an issue

warm surge
#

96 in the trash

sharp geyser
#

quite frankly none of us here can help you through it

#

We only told you it was legit, and it is, i've used it myself in the past

silver jackal
#

bro i can't remove my card

#

I want to remove my card but its not letting me

sharp geyser
#

Right im done with this conversation if you are just ignoring everything I say

#

suffer alone

#

:)

silver jackal
#

i can't change primary

silver jackal
#

i don't have two of them

sharp geyser
#

tough luck

silver jackal
sharp geyser
#

No one is telling you to have two of them

warm surge
sharp geyser
#

I think you need to get a better translator

silver jackal
sharp geyser
#

Like I said, contact customer support if you feel there is an issue with the credits

#

WE are not digitalocean

#

so WE cannot help you

warm surge
sharp geyser
#

such a small community

#

is that official?

silver jackal
warm surge
silver jackal
#

not official

sharp geyser
#

shocking

silver jackal
#

not official

sharp geyser
#

Right Ark

silver jackal
#

i was just in there

sharp geyser
#

ima tell you this one more time

#

and only one

silver jackal
#

bruh

sharp geyser
#

CONTACT CUSTOMER SUPPORT

#

yknow this button at the very tipy top of the page

#

Click that

#

follow what it tells you

#

simple as that

warm surge
silver jackal
#

well i joined that server

warm surge
silver jackal
#

and asked a moderator

silver jackal
#

i just changed some numbers

sharp geyser
#

at this point just leave em be webster

#

they are hopeless

warm surge
sharp geyser
#

you can't save them all

warm surge
#

Eh

#

Im not like you, i can handle that kind of bs when i feel like it and i feel like it so eh

sharp geyser
#

right

warm surge
#

just got coffee so eh

sharp geyser
#

but its not about handling it or not

#

its the fact we are not digital ocean, so we cannot help him

warm surge
#

true

silver jackal
#

digital ocean support suck

sharp geyser
#

even attempting ot help him will mislead him

#

so best we can do is tell him to either contact customer support at digital ocean

#

or suffer silently

silver jackal
#

i did contact

#

i just got automated response

#

it didn't help me at all

#

0/10 customer service

sharp geyser
#

right, cause if its a live chat, you need to ask for an agent

#

if its through email, you need to wait

#

๐Ÿ˜ฒ

silver jackal
#

its through email

sharp geyser
#

Then wait for a response

silver jackal
#

I changed the payment method

#

changed the numbers

#

Lmao

sharp geyser
#

Ok

#

gl then

silver jackal
#

So weird website

#

like no interaction

sharp geyser
#

no you are just the weird one

lyric mountain
#

On windows, Unhandled exception on main thread: IntegerUnderflowException

quartz kindle
#

based

lyric mountain
#

One does not simply redis on windows

#

You literally have to compile the internet to make it work and it's still a 50/50

sharp geyser
#

I got it working fairly easily when I did it years ago

sharp geyser
#

Idk what this means

lyric mountain
#

Basically "the chosen one"

#

It's a meme from dune 2

#

Redis defeated our entire dev department where i work

#

Cuz it refused to run properly on windows

#

Or straight out didn't run

quartz kindle
#

lmao

sharp geyser
#

:)

radiant kraken
#

this is basically the entire movie

surreal sage
#

filezilla moment

frosty gale
#

filezilla's ui makes me want to quit everything computing

#

its so sad

surreal sage
#

winscp doesnt work for me

#

it just randomly decides to stop mid transfer

#

fz doesnt

rugged delta
#

Hewo - someoe, Im making a bot (yes, I actually did it) so - qq, HOW DO I MAKE A BOT TOKEN, AND ADD IT TO MY SERVER. also - its a private bot, restricted to only my server/ppl I allow...

bitter granite
#

You can get bot token from the discord developer site

rugged delta
#

Like, the code of it?

#

hello??

#

@sweet veldt pls??^^

sweet veldt
rugged delta
quartz kindle
#

you have to run the code yourself

#

either in your own computer or in some hosting service you pay for

#

you get the token from the discord developers page, add the token inside your code, then run your code

rugged delta
#

I didnt get a word - but k

quartz kindle
#

how did you make the bot?

rugged delta
quartz kindle
#

alright then

rose warren
#

Ah yes

surreal sage
#

rip offs

patent torrent
#

Hey, are there any experienced bot devs here that got their bots out to the public with success? I would like to learn from someone how to market a bot and get people to use it. I am already bidding on ads on top.gg but any other tips that someone is willing to share? Would really appreciate it

deft wolf
#

Depends on what you mean by "success"

#

For some it's hundreds of thousands of servers and for some it's just a few servers but devoted fans of your bot

silver jackal
#

i have question

#

i started making a bot and i hosted it on vps

#

right now its hosted on 1gb 20gb storage

#

How much do i need ram

patent torrent
silver jackal
deft wolf
harsh nova
#

^ having a truly unique bot is 90% of the work

#

Try as hard as you want but you're going to have massive trouble making a successful multi purpose bot due to market saturation

radiant kraken
#

but my multipurpose bot has 600 commands topggSob

silver jackal
patent torrent
silver jackal
#

yey 20 ping ms

radiant kraken
#

agreed

silver jackal
#

@patent torrent give id of your bot

radiant kraken
#

which is why it's so hard to come up with original project ideas

silver jackal
#

oh nvm

#

i have it

craggy pine
#

The feelsbadmoment our multipurpose bot has like 20k servers like 4 years ago and the main bot acc owner got yeeted through 2auth.

patent torrent
#

Yeah I guess I will just let it run and see how it goes. Was just wondering whether there is something I forgot

craggy pine
#

Was good times.

sharp geyser
#

ping is the most useless statistic to show on a discord bot ngl

deft wolf
#

More than the number of users?

radiant kraken
#

in fact it would be better as an owner-only command

sharp geyser
#

Really there is no statisitcs to show on your bot except for actual statisitcs that make sense

#

for example some mod bots might show "X users banned" or what not

#

it proves that the bot is used and does its job

#

the average discord user won't even know what 21ms ping means

lament rock
#

Meanwhile devs will meme that negative ping means they're coming from the future

radiant kraken
#

commands ran in the past 24 hours >>> server count/user count

sharp geyser
#

overall stats is better than how many users you serve

#

cause majority of those users potentially could come from 1 server

radiant kraken
#

frfr

sharp geyser
#

which while impressive you got your bot into such a large server it proves nothing in reality

radiant kraken
#

...and then you realize it's a bot farm

sharp geyser
#

then you get denied for inorganic growth when verifying

radiant kraken
#

i think that only applies to server count

#

which is primarily caused by Top.gg

sharp geyser
#

I mean

#

discord should really check to see if the servers your bot is in also consists of majority bots

#

๐Ÿ˜ญ

radiant kraken
#

frfr

#

ong

earnest phoenix
#

hello, my old account got deleted, but my old bot page (that is deleted too) is still on top.gg, what am I supposed to do so I can change the bot to the new one?

sharp geyser
#

oh look

#

talk about a mod problem and a mod shows up

#

dm fish ;)

harsh nova
radiant kraken
#

well yeah obviously because your bot only watches threads

earnest phoenix
radiant kraken
#

i think for your bot it's the amounts of threads watched

harsh nova
#

@earnest phoenix id recommend another mod blob_nod I'll be afk for like a week

sharp geyser
#

Oh damn

sharp geyser
#

that's my bad, fish is usally never afk

sharp geyser
#

Sorry Ender

harsh nova
sharp geyser
#

is it lizard?

harsh nova
earnest phoenix
radiant kraken
#

lizard is from the US

harsh nova
#

Yea

radiant kraken
sharp geyser
#

Yea

#

Dm another mod

#

The mods are the ones who can help you with your issue

radiant kraken
#

if it's from the Netherlands then it's probably Veld

sharp geyser
#

doubt

radiant kraken
#

he's the only Dutch person i know topggSob

sharp geyser
#

I doubt thats the only one he knows tho

radiant kraken
#

yeah

#

but it's possible

silver jackal
sharp geyser
#

Unless you are serving thousands of servers 2gb should be fine

#

ram wise at least

sharp geyser
#

yea, again depends on what you are doing as well

#

but typically its good for most cases

silver jackal
#

@sharp geyser i use a something that uses less ram and resources less than discord.js

sharp geyser
#

you only really need more resources once you start seeing a spike in shards

silver jackal
#

Oh yeah

#

Also i don't use discord.js @sharp geyser

#

i use something light

sharp geyser
#

Okay

silver jackal
#

thsts why my bot will not consume alot

#

which is good for me

silver jackal
silver jackal
#

The smaller size of commands in AOI.js compared to Discord.js likely translates to less memory usage and potentially faster execution times. This difference could result in more efficient resource utilization on your VPS. However, the exact amount of resources saved will depend on various factors such as the complexity of your commands, the frequency of interactions with Discord's API, and the overall architecture of your bot. Generally, you can expect AOI.js to use less RAM and CPU compared to Discord.js for equivalent functionality.

sharp geyser
#

๐Ÿ’€

#

it uses discord.js as a dep

#

yea bro

deft wolf
sharp geyser
#

its literally just a framework for discord.js

#

๐Ÿ’€

#

it's "BaseClient" extends discord.js client

frosty gale
#

you ruined it

#

i was gonna say

sharp geyser
frosty gale
#

"i really hate to tell you this but"

sharp geyser
#

Sorry chloe

#

All it does is overwrite discord.js cache with their own values you can set yourself

sharp geyser
#

or use their default ones

frosty gale
#

its not designed to be factual anyways

sharp geyser
#

not 3.5 anyway

#

GPT 4 is slightly better since it uses actual up to date information

#

but its also 20$ a month so KEKW

#

not buying into that shit

frosty gale
#

but to their credit (aoi.js)

#

they do seem to use quite a bit of custom stuff

#

not just directly wrapping around discord.js

#

but for the resource usage aspect of it its probably going to be similar to just using discord.js

sharp geyser
#

yes because it literally using djs as the client

#

the client itself is where majority of the resource usage comes from

frosty gale
#

nevermind it literally is just a wrapper around discord.js

sharp geyser
#

it makes it "slightly" better by overwriting the default cache values disabling some of the uneeded ones for most bots

frosty gale
#

they just made it more complicated than it has to be so i didnt realise at first

sharp geyser
#

literally Akario

silver jackal
#

its better

sharp geyser
#

๐Ÿ’€

frosty gale
#

i said at first "oh wait thats custom"

silver jackal
#

fast to run a comman

frosty gale
sharp geyser
#

yea

#

its literally just getting it through discordjs

#

its just another discord.js wrapper like how sapphirejs is

#

or old akario

silver jackal
#

bro im new to code

#

i just learned today vps host

sharp geyser
#

All good man, no one is clowning you

#

We just want to let you know that it is indeed discord.js

silver jackal
#

i know

#

it says on docs

sharp geyser
#

not to nitpick but Eyes

silver jackal
frosty gale
#

jquery rolling in its grave

rugged delta
#

HEWO

#

I NEED HELP PLS

silver jackal
sharp geyser
rugged delta
#

Hewo - help pls.....

craggy pine
#

Don't just say "I need help" ask your question

rugged delta
#

So - in an ez way - how do you make a bot token, and how do you add a bot in the bot token

#

and my bot is private...

frosty gale
#

are you asking how you can get your bots token?

rugged delta
#

I made one on the dc developers one

deft wolf
sharp geyser
#

situations like this is when I think having a bot with a tag system would be helpful

rugged delta
#

but idk if its correct

frosty gale
rugged delta
#

@frosty gale Ill do it on DMs

frosty gale
#

you need to be able to click on bot and then reset token

#

no pls

sharp geyser
#

people always want to dm you

frosty gale
#

2nd person today in fact

sharp geyser
rugged delta
#

so yh

#

oke??

sharp geyser
#

Ima dm you chloe

#

gotta ask for advice on this code I ripped from github

deft wolf
sharp geyser
#

Sounds like that one from steam

deft wolf
#

You mean DIscord Bot Maker right?

sharp geyser
#

I think so

rugged delta
#

@frosty gale wabt these ^^???

frosty gale
#

dont worry about these right now

rugged delta
frosty gale
#

you probably dont want interactions over HTTP

rugged delta
#

then how do I add my bot into these tokens

deft wolf
rugged delta
frosty gale
rugged delta
#

Lol

rugged delta
#

runs*

frosty gale
#

where did you get the code

#

did you make it yourself or took it from someone

rugged delta
sharp geyser
rugged delta
#

and did major revamps on it...

#

so ig...

#

yes

frosty gale
frosty gale
#

i dont know how your code looks like but you likely need to put the token in a "token:" field or something like client.login("token")

rugged delta
#

like i can send you the code, then you can give me a full instruction...

#

yh - so DO i reset it??

#

apologise cas

#

caps

frosty gale
#

then you can copy your token

sharp geyser
#

you have to reset it to get the token

frosty gale
#

but dont show the token please its supposed to be only secret to you

rugged delta
#

ok

#

its like 30 letters?

#

oke

#

got it - then I add it to the bot?

frosty gale
#

more like 72 letters

rugged delta
frosty gale
#

its supposed to be a long text of random stuff

frosty gale
#

should anyways

rugged delta
#

this is the very start of my code

#

idc if anyone sees tbh

frosty gale
#

can i ask where you took the initial code from

#

there might be an easier way to put the token in

rugged delta
#

tarunbeast

#

I added it to the starting line

frosty gale
#

at the bottom of the code can you find something called client.run(

#

thats where you put the token

frosty gale
#

in this case its called client.run

rugged delta
#

Kk

#

YESS - I PASTED IT

#

So - should it automatically show in the token??#

frosty gale
#

what do you mean

rugged delta
rugged delta
#

what is that exactly..??

frosty gale
#

the function (client.run) is where you give your token to log into the bot

#

actually try run the script first without the token

frosty gale
#

see what happens

rugged delta
#

Ut isnt doing anyything...

frosty gale
#

how are you trying to run it

rugged delta
#

^^^

rugged delta
# rugged delta

Like this - cos it aint aded to dc yet - so I have no clue

#

heopless - shouldda paid attention in computing ig

frosty gale
#

honestly with your thing i would recommend you learn some code and how to make a basic bot from scratch

frosty gale
#

it shouldnt take long and youll actually know whats going on

rugged delta
#

But like - ig I wont quit now Ive come so far

frosty gale
#

have a go at making your own bot

#

if you dont want to code you can always use services that let you make a bot without code but thats not really recommended

#

and they usually suck

#

but its tricky getting existing code like that running without you knowing whats actually going on

rugged delta
#

okey

#

@frosty gale I did all the steps

#

BUT I CAN'T FIND THE ADD-BOT BUTTON IN OAUTH2 OR BOT

solemn latch
#

I always just make my own link

frosty gale
#

you dont need to create a bot anymore its created by default

rugged delta
frosty gale
#

so just go to the bot page

rugged delta
#

I even addaed the token

#

and ran it

#

smoothly run

solemn latch
#

๐Ÿ‘€

#

Unless you're asking about inviting the bot

rugged delta
rugged delta
#

Not in the server

solemn latch
#

On what site?

rugged delta
#

in the token...

rugged delta
#

in the token...

solemn latch
#

I don't know what that means ๐Ÿ‘€

rugged delta
solemn latch
#

A token is just a string of characters

#

How would a bot be in a string?

rugged delta
solemn latch
#

You can't find the token you mean?

sharp geyser
#

yikes nala.pics borked

rugged delta
solemn latch
#

Awh

rugged delta
#

This is what it shows

#

even after I did all the process.

solemn latch
#

What's the url you used to get to that?

rugged delta
#

after selecting 'bot' in the grid

#

and selecting admin.. - this is what comes after I click the link to attach it to my server...

solemn latch
#

I think the "bot" page is deprecated no? That's an old page.

rugged delta
#

TF?!?!

#

Ive been tinkerin around with that thing - and Im still clueless, I watched like 50 videios - skill issue to me ig...

frosty gale
#

whats the issue now

rugged delta
#

I checked the article you snt, and a few more

#

None of them EXACTLY say how to

#

My bot just isnt attaching to the developer site

#

and my brain has left the chat

#

cries

frosty gale
rugged delta
#

Its because - i dont know what;s goin on

sage bobcat
#

One message removed from a suspended account.

eternal osprey
#

Each time an image changes it goes full image screen

sharp geyser
#

it's boot strap

#

But it could be what you are cycling through is different in size to what you are setting the parameters of the carousel to

#

Image Size > Carousel Size

eternal osprey
#

is there really no way to fix this

#

it's fucking my webpage

solemn latch
#

I don't know how bootstrap does it. But surely you can put your images in a container and set the size of those to all be the same, and just make the images fit.

#

It might look a little funky without adjusting the images themselves to be the same size though

sharp geyser
silver jackal
#

@sharp geyser i need help

sharp geyser
#

Okay

silver jackal
#

why is there two of them?

#

how do i remove index

sharp geyser
#

Google tells you to pm2 delete index

lament rock
#

Why does this show on your status lmao

sharp geyser
#

Huh

#

you're doing what to a hog

lament rock
#

dw about it!

#

Interesting. Discord is starting to serialize a clan property on users

user: {
      id: '320067006521147393',
      username: 'papiophidian',
      avatar: '3d0f5437e4825be02828633641bf5434',
      discriminator: '0',
      public_flags: 4194880,
      flags: 4194880,
      banner: null,
      accent_color: null,
      global_name: 'PapiOphidian',
      avatar_decoration_data: null,
      banner_color: null,
      clan: null
}
sharp geyser
quartz kindle
lament rock
radiant kraken
#

everyone is a part of my clan now

quartz kindle
#

:^)

sharp geyser
shut tide
lament rock
proven lantern
#

is there a reason that some of the guilds my bot is in have an icon in their guild object, but why i try to look at it on discord's cdn it doesn't show up?
<img alt="icon" src="{URLS.cdn}icons/{guild_id}/{icon}.png"/>
https://discord.com/developers/docs/resources/guild

frosty gale
#

does it load when you try to load it by just going in the browser?

spark flint
#

Also remove .png, it will auto default to the uploaded file type

neon leaf
#

whats the difference between displayAvatarURL and avatarURL?

frosty gale
frosty gale
#

so if they dont have one it wont return anything

frosty gale
#

but displayAvatarURL returns a default avatar if the user doesnt have a custom one

neon leaf
#

ooohhhh

#

makes sense

#

thanks

frosty gale
proven lantern
proven lantern
frosty gale
#

i assume you construct the url by doing something like this?

proven lantern
#

here's a different one

frosty gale
#

so yeah it must be because its deleted

#

how old is the data youre working on

#

is it just recently fetched or

#

discord deletes old icons or images that were deleted and not in use anymore from its cdn

proven lantern
frosty gale
#

yeah things like this you cant rely on discord for because they can delete the icon at any time

#

if you really want the icons you should download them when you first see them so you can display them on your local cdn

#

or always fetch the most recent guild object so you can get the recent icon but thats a lot of api requests probably

spark flint
#

Old icon gets deleted and a new hash replaces it

frosty gale
#

trying to stringify something that cannot be stringified is a rookie mistake

spark flint
#

lul

eternal osprey
#

hey guys i have a mental breakdown about the security of my site

#

upon registering, i want to send the email and password to the backend, my api. How can i securely do so?

#

omg nvm i am so smart

#

nvm

glass acorn
#

so rich

#

Made this bot in like 1h

#

Has a full shop system and sales

eternal osprey
#

work on the design cuz rn it looks like shit

glass acorn
#

Yeah I was planning on making embeds for it

#

I'm using python as well, and the interactions library

#

So I'm kinda limited

eternal osprey
#

how can i hash my data client side?

#

Like, i see lots of shit about the crypto package, but i can't really use that on the web as it's for nodejs only

#

or should i only do that server side, assuming that i am sending plain data using SSL enabled?

wispy frigate
#

sending it from client side to server with https, then hashing it with the server before being stored is pretty standard practice i believe

frosty gale
#

but depending on what you want to hash youd probably do that on the server anyways

#

window.crypto.subtle to be specific

#

not sure why its prefixed with subtle

glass acorn
#

honest opinion, slash commands or ! commands?

quartz kindle
#

once you get to 100+ servers and get verified, discord only allows you to listen to text messages for very niche use cases

#

so the majority of bots dont have a choice but to move to slash commands

#

otherwise slash commands have a lot more features but are less reliable and often buggy

glass acorn
sharp geyser
#

It isnโ€™t really about how easy it is or not

#

If you donโ€™t have a reason thatโ€™s valid in discords eyes your bot wonโ€™t get approved if it uses message commands.

quartz kindle
#

python coders finding out that js these days is faster than python

#

:^)

glass acorn
#

my VSCode hates me so much

quartz kindle
#

wdym wont let you run it lol

sharp geyser
wheat mesa
#

Python has been slow as shit since itโ€™s been released

#

Purely a stack based VM instead of doing JIT or register based like every other modern VM

quartz kindle
#

but like og interpreted js good luck exdee

sharp geyser
#

Were you around for that

quartz kindle
#

not coding, but alive yeah lol

sharp geyser
#

Right so we know he was at least alive in 1995

#

Old man

quartz kindle
#

indeed

sharp geyser
#

Youโ€™re like in your late 20s tho right?

wheat mesa
#

Oh damn I thought python was a much more modern language

#

Apparently existed before js

#

Interesting

sharp geyser
#

How long have you been programming?

quartz kindle
#

not too long tbh

sharp geyser
#

icic

quartz kindle
#

only started getting into it in my late 20s

sharp geyser
#

dang

quartz kindle
#

thanks to discord bots mostly

sharp geyser
#

I didnโ€™t start until I was 12

sharp geyser
#

Bane of my existence ngl

quartz kindle
#

dicksword bots

sharp geyser
#

Stuck to bots too much that I didnโ€™t practice much

wheat mesa
#

๐Ÿ˜ญ

#

Technically I started js when I was 9 at a summer camp but I donโ€™t count that because it was for a week and I understood pretty much nothing

#

I really started when I was 15

quartz kindle
#

at 15 i was playing online games 16 hours a day

wheat mesa
#

Same but it was covid so I had the other 8 to spare

quartz kindle
#

i keep forgetting that when people say "when i was 15" they mean like 2020

#

lmao

sharp geyser
wheat mesa
#

That's not late for a lot of people

#

Very few people started that young

sharp geyser
#

Look where I am now

#

Still barely know a thing

wheat mesa
#

I only know one dude irl that started really young and he was like 7 or 8 at the time, started with mc mods

sharp geyser
#

๐Ÿ˜ญ

wheat mesa
#

Well if you compare your knowledge to when you were 12 I guarantee you that 12yo you would be very impressed

sharp geyser
#

Maybe

wheat mesa
#

Something I need to start doing is specializing

sharp geyser
#

My perception is screwed tbh

wheat mesa
#

I'm getting to that point in my programming journey that I need to pick something and focus heavily on it

sharp geyser
#

Thatโ€™s what Iโ€™m doing

wheat mesa
#

But at the same time there's so much I want to learn that I can't do it all

#

Plus I'm not entirely sure what I want to specialize in

#

Ideally it would be working on some sort of proprietary game engine or maybe even something like unreal or unity, but that's going to take a while to get into

#

Not really interested in game dev unless the conditions are good which is very rare to find in that world

#

But super interested in game engine dev

quartz kindle
#

html+css game engine

wheat mesa
#

lmao

sharp geyser
#

Built entirely on js

wheat mesa
#

Ouch

#

Painfully slow

sharp geyser
#

Or if you run it on a windows 95 computer blazingly fast

#

๐Ÿ˜

wheat mesa
#

I like low level backend stuff, I just don't know much about the availability of jobs for that sort of thing so I try to keep my knowledge broad

sharp geyser
#

Run windows 95 with a 4090

#

Play doom at 4m fps

glass acorn
#

Richest CASSIE player

#

Gambling is so good (in-game)