#development

1 messages · Page 199 of 1

silver jackal
#

i bought galaxygate vps $3

#

and never got refund

quartz kindle
#

you bought and canceled?

silver jackal
#

yes and did refund

#

but never got money back

quartz kindle
#

well, they have a discord server

#

you can ask there

silver jackal
#

no

#

they scam

quartz kindle
#

well i had a vps with them for about 2 years, never had issues

#

but if you have a credit card, you can try the google's free one

silver jackal
#

google does discord bot hosting?

quartz kindle
#

they only charge for excess bandwidth, like if you spend more than 1gb of network data per month, they start charging per gb

#

but its very cheap

#

like a couple cents per gb

silver jackal
#

how do i host on that

quartz kindle
#

you can host anything on a vps

lament rock
#

Something doesnt need to be labeled as "Discord bot hosting" in order to work with Discord bots

silver jackal
lament rock
#

Most bots are just run off linux

quartz kindle
lament rock
#

What

frosty gale
#

ive had them for ages and they never scammed me lol

silver jackal
#

if you have something that is not vps

quartz kindle
#

theres no such thing as a coding language that doesnt support a vps

silver jackal
#

i dont know how vps work

#

i spend like 4 hours

quartz kindle
#

a vps is a computer

silver jackal
#

and didnt even got it running

quartz kindle
#

that you rent

#

you can run anything on it

silver jackal
quartz kindle
#

yes

lone plinth
lament rock
#

Familiarize yourself with the linux shell as you definitely dont want to install a GUI on a headless server

quartz kindle
silver jackal
lament rock
#

So, JavaScript

frosty gale
#

oh

quartz kindle
#

isnt that bdfd v2 lol

#

but yeah its just a node.js package

#

install nodejs, install aoijs e run index.js

lament rock
#

Unrelated but I hate bdfd and derivatives

silver jackal
#

i did all that

#

but i could not login to my vps account

quartz kindle
silver jackal
#

no

quartz kindle
#

its a good thing to learn

#

and its not hard

silver jackal
#

how can i learn when i was locked on my vps account 💀

#

bro said i can copy and paste password

quartz kindle
#

when you purchase a vps service, you have a choice on what OS to install, i recommend debian or ubuntu

silver jackal
#

but it didnt work

silver jackal
#

like a dashboard

quartz kindle
#

then most hosting providers have a control panel that lets you click a button to open an ssh session

silver jackal
#

is there something like a dashboard?

lone plinth
# silver jackal is it easy to manage?

Vps is sometimes costly, you can try Googleing discord bot hosts.
https://sparkedhost.com/
Or https://pebblehost.com/

lament rock
#

most providers have a dashboard xd

lone plinth
silver jackal
#

i used pebble for my minecraft server

quartz kindle
#

he wants something like those pterodactyl things

lone plinth
silver jackal
#

ok and on pebble?

#

do i need to install

#

npm i aoi.js

#

and node?

#

or them notes

lone plinth
silver jackal
#

ok

lone plinth
# silver jackal ok

I will suggest you to buy the 1gb one cause anything else will be a waste of money

frosty gale
silver jackal
#

uh i got support by ai

#

he told me i need only node.js and aoi.js

#

and thats it

frosty gale
silver jackal
#

Pebble ai

dusk hatch
#

honestly pebble aint that good

silver jackal
#

ok

lament rock
#

I can fit a lot into 1GB. My bot can easily fit into < 200MB and memory usage doesn't really get higher than that. Shit, I've fit a modded Minecraft server in a 2GB VPS and it was really playable

sharp geyser
lament rock
quartz kindle
#

minecraft is a game where modding actually makes it perform better

#

unlike skyrim

#

exdee

sharp geyser
#

oh god

#

skyrim

#

I miss that game

#

😭

lyric mountain
frosty gale
#

except they made it a seperate game for some reason

#

"bedrock edition"

#

and the pc interface for it looks like it was designed for mobile which it was initially

#

waste of effort in my opinion

quartz kindle
frosty gale
#

that was the biggest fumble ever but not many people are talking about it

#

it had great potential to turn the game from a resource heavy hog to a more or less optimised and light game

#

and maybe even somehow figure out a way to keep support for java mods/plugins

quartz kindle
#

or even worse, an automated port

frosty gale
lyric mountain
#

they dont need to replace java, they just need to sit and fix the numerous leaks and suboptimal logic

frosty gale
#

for memory management they definitely need to at least add some memory pool or something because the massive memory spikes and drops when GC kicks in probably doesnt help performance

lyric mountain
frosty gale
#

sure but you can still add integration and bindings im pretty sure which allows java apis to interact with the native ones and vice versa

#

kinda like node gyp but java if that makes sense

lyric mountain
#

I get you, what I mean is that java being java they get to see and touch every piece of minecraft

#

whereas with c++ it'd not be possible as you'd only see asm

quartz kindle
#

minecraft with lua modding

frosty gale
#

it is more work but its not impossible

#

but yeah for everything else youd need some kind of binding for it

lyric mountain
#

it is impossible sadly, unless they released the source code

frosty gale
#

because you cant interact from native to java directly of course

#

from quick thinking they could add some kind of DLL which allows access to internal minecraft apis and structures to an extent

quartz kindle
lyric mountain
#

meant for java x c++

quartz kindle
#

ah the bedrock source

lyric mountain
#

with c++ you get closed doors, modders only get what mojang gives them

quartz kindle
#

nobody cares about bedrock

#

huehuehue

frosty gale
#

if modders want more they need to reverse engineer the game and add manual bindings to it

#

kind of like gta 5 mods

#

scripthookv

#

its ridiculous

#

and of course tons of things break every update

lyric mountain
#

I mean, yeah, there ARE mods for bedrock, but they arent in the same level as, say, Create

#

well, tbf it's better to use a lower bar like Aether as an example

frosty gale
#

mooyang

#

whats the worst performance killer in the java version at the moment anyways

lyric mountain
#

iirc lightning

quartz kindle
#

did you see the nvidium mod?

#

rewrites the graphics engine to use nvidia shader cores or what not

#

fps goes from 90 to 700

lyric mountain
#

oh, neat, didnt know about it

frosty gale
quartz kindle
#

it only works on nvidia 1060+ afaik

frosty gale
#

and doesnt even get good fps

quartz kindle
frosty gale
#

poor amd users

lyric mountain
#

sodium alone gives a huge boost too

frosty gale
#

i'll give them both a try and see how it runs

lyric mountain
#

nono lul, you'll have to use both

#

nvidium is backed by sodium

frosty gale
#

yes both

#

is memory not a concern at all in minecraft though? last time i ran a minecraft server the memory usage chart is a rollercoaster

#

the gc constantly being invoked probably isnt a great thing for performance

lyric mountain
#

eh, depends, it does help if you use shenandoah GC

#

ZGC is also an option, but idk how it performs on games

quartz kindle
#

yeah ram is a huge concern due to how chunks work

lyric mountain
#

I also recommend lithium and phosphor

#

if phosphor is still being updated

#

funny how curseforge started as a minecraft mod listing site, and now it's dying due to corporate greed

frosty gale
#

whats wrong with curseforge

lyric mountain
#

well, it started when overwolf came

#

which as you might already know about as a horrible app & overlay platform since they put ads everywhere and sometimes even hinder performance

#

then the site progressively became worse from all the ad junk littered around and data collection

neon leaf
#

Most starlight and phosphor features are in vanilla now though

wheat mesa
#

ads everywhere, 20 pop ups, it feels like I'm on a website for cracked roms or some shit

frosty gale
#

i havent noticed since i always use adblockers

lyric mountain
#

name one thing overworlf touched that wasn't ruined

lyric mountain
#

ah yes, they enhanced zgc on java 21

#

I was already using zgc for most of my projects since they introduced it

#

yep, if there's one thing that java is unparalleled at is gc

#

funny that this used to be one of java's major drawbacks back then

frosty gale
#

i propose manual memory management for java

#

so i can use my beloved malloc and free

lyric mountain
#

you can somewhat mark something to be collected already, by nulling all references to it

frosty gale
#

whats this gc thing and why does it keep pausing my program

lyric mountain
#

I would like to know how to disable it for Java 1.4.2 and for Java 1.6.0 because we are currently testing both JVM to see which performs faster..
💀

frosty gale
#

i hope these people arent working on any production projects

#

clearly dont understand why the gc exists and when is it used

#

if they set high enough max memory the gc will never be called assuming their task is indeed short and doesnt allocate many objects

#

and even if it does get called at least your program/task still works and doesnt crash albeit a tiny performance penalty

lyric mountain
#

a common thing to do it performance is paramount, is to set minimum heap size to the same value as max

#

this way it never needs to increase, thus reducing time spent realocating

wheat mesa
#

Because they don’t just use ref counts, gc uses mark & sweep and ref counts

wheat mesa
#

Technically it’ll perform better until you run out of memory!

frosty gale
#

for some reason i wanna write a garbage collection mod for c++

#

no need to delete or free the gc will do that

#

just overload the new operator

#

actually that sounds more like a smart pointer if anything lmao

wheat mesa
#

That’s quite literally what Java was invented for lol

frosty gale
#

i thought it was made to be a simple and portable language

#

"write once run anywhere" after all

#

well simple is subjective but portable definitely

wheat mesa
#

Both

earnest phoenix
#

The discord.py have pre-made shard service or do i need to use other packages fpr it?

hidden gorge
frosty gale
#

i love android studio

#

really good IDE

#

basically codes for you

sharp geyser
#

What is android

neon leaf
#

what is love

quartz kindle
#

baby dont hurt me

wheat mesa
#

Just use Intellij

lyric mountain
#

yep, there's very little advantage to using android studio

hidden gorge
#

i fell and nearly got hit by a car

spark flint
#

can't develop you some crutches /j

warm surge
spark flint
#

ok thats insensitive

hidden gorge
#

WHOOPS

spark flint
#

i hope you are ok

hidden gorge
#

I THOUGHT THIS WAS GENERAL

warm surge
#

develop some skills

#

not skill issue

hidden gorge
#

i hit my head so im semi out of it

frosty gale
#

jk

#

but the dedication to still be in #development after an accident is admirable

frosty gale
#

thats something tim would do

deft wolf
spark flint
#

lol

tawdry plover
#

is bot page customization with css still possible?

deft wolf
#

Yep

sharp geyser
tawdry plover
deft wolf
#

It's just css, there are plenty of sources from which you can learn about it

lyric mountain
#

press F12, inspect element, edit css till u like it, copy css properties, paste on a <style> block

frosty gale
#

would you guys recommend traditional java or kotlin for someone that doesnt really do java for a project

lyric mountain
#

I prefer java

#

Kotlin feels too weird to use imo

#

Whatever you choose the performance will be practically the same as both compile down to the same bytecode

#

However I also vouch for groovy, it feels too good to use if you don't mind losing a little performance (which can be mitigated by using @CompileStatic)

#

Tf

#

Srry dan, it pinged u

sharp geyser
#

ghost ping

lyric mountain
#

They called for it

sharp geyser
#

lmao

sharp geyser
#

this guy has the habit of oversharing

hidden gorge
sharp geyser
#

It's the truth shruganimated

sage bobcat
#

One message removed from a suspended account.

muted pollen
#

Hey

#

What permissions can I give my bot to see all channels?

sharp geyser
#

You can't without giving it administrator

#

Even if you give it like the Manage Channel perms or what not, if someone overwrites that at category/channel level it won't matter

#

I'd also like to note that giving your bot administrator without needing it can impeed verification of said bot if you want to verify it

lyric mountain
#

ALSO it'll prevent discord verification

#

Because requiring to be able to see all channels is a breach of privacy

sharp geyser
#

😭

lyric mountain
#

I thought u meant topgg verification

sharp geyser
#

nah

sharp geyser
#

What does math look like at the binary level of 1s and 0s. For example I can do console.log(1+2) and get 3 but if I was using purely 1s and 0s how would this be done? As every programming language eventually becomes machine code (1s or 0s) from my understanding

radiant kraken
#

since every basic math operation has its own assembly instruction

sharp geyser
#

I know

#

I was just wondering what it looked like internally

#

:p

#

idk if anyone here would even know the answer to this question but thought i'd ask as its one of my late night thoughts

muted pollen
#

._. so just accept my bot

frosty gale
#

mwah*

#

5am rn i need to sleep

lament rock
# muted pollen ._. so just accept my bot

Your bot doesn't need administrator though. If someone chooses to give it to you, fine. You can prompt someone when they attempt to use a feature that requires all channels be shown to give your bot access to all channels manually or give administrator. If someone denies giving your bot administrator then that's their choice and your bot should just work regardless with what it's given

#

Dont request it in your invite url either

muted pollen
#

._. Dumb google translator

lament rock
#

Yes thats what I mean

timber hatch
#

Is anyone familiar with an appropriate way of debugging client side errors with minified webpack bundles? skully

A few of my users are receiving this error on my nextjs application. Only on 1 route, and seemingly only on older iphone models. But i'm not familiar with an appropriate way of debugging it. I would love to learn how though

lament rock
#

do you have any source maps

past field
#

how can i attach photos to an embed like this for a giveaway command?

quartz kindle
past field
spark flint
#

i added my additional IPs to my VPS, but I don't want them to resolve to the same thing as the main IP. how would I go about doing that?

network:
  version: 2
  ethernets:
    eth0:
      addresses:
      - 45.61.161.223/24
      - 45.61.161.167/24
      - 45.61.161.241/24
      - 45.61.161.243/24
      match:
        macaddress: hidden
      nameservers:
        addresses:
        - 1.1.1.1
        search:
        - s10658.advinservers.net
      routes:
        - to: default
          via: 45.61.161.1
      set-name: eth0

doing this makes *.167, *.241 and *.243 resolve to the same as *.223, which i do not want

real rose
quartz kindle
quartz kindle
spark flint
#

i'm creating VPS serveers on it

#

so resolve to the VM it is assigned to

quartz kindle
#

if your vm software supports direct access to your network stack, it should be able to get assigned its own ip independently

#

otherwise you'll need to redirect/forward them

spark flint
#

hm ok

#

creating a test vm now

#

created a VM and the IP is resolving to the main one so I cannot SSH in

exotic hull
#

@lyric mountainbro u here?

real rose
#

you'll need to setup a bridged network

spark flint
#

h

#

ah

real rose
#

as each vm network will need to connect to the main one

spark flint
#

removed from netplan and yeah not responding now

exotic hull
#

can anyone help?

real rose
spark flint
#

none of these will work for me KEKW

real rose
#

oh using vf?

spark flint
#

yeah

#

paid for a year license

real rose
#

go to the hypervisor

#

and scroll down

#

your "main vps" is the hypervisor and the vms inside it are considered vps

#

in this case

spark flint
#

ahh ok

real rose
#

you'll see Standard bridge networking

#

should have what you need

spark flint
#

i think i tried that but it fucked the vps's network

exotic hull
spark flint
#

had to manually retype the config in vnc lmfao

real rose
real rose
spark flint
#

i think?

#

idfk

#

hetzner gave a single command to add the IP KEKW

#

this isn't hetzner so its not as easy

real rose
#

oh wait is your vps hetz

spark flint
#

nah

real rose
#

then the network is different val_OMEGALUL

#

oh

#

kewl

spark flint
#

see what happens

real rose
spark flint
#

oh 👀

real rose
#

yea kek vf makes things p easy

spark flint
#

i have them added already

#

i deployed a vps and i can't connect to it or ping it

real rose
spark flint
#

i dont think so

real rose
#

create a unicast one here

#

add one to each ip

#

then delete the vps and redeploy it

spark flint
#

do i add to the block

#

oh nvm found it

#

its a tiny mac button

real rose
#

the tiny + MAC yea kek

exotic hull
#

got answer too but why is it showing error

spark flint
#

ok so like this

real rose
#

yuh

spark flint
#

eventually this command will work

#

smh userapps enabled when, we dont have perms

real rose
#

now depending who your primary provider is, depends if you need to assign those MACs onto the IP in the provider dashboard

#

we only have to do it with RS, the others work without

real rose
spark flint
#

test time

spark flint
#

then i moved from hetzner

real rose
#

o:

spark flint
#

not paying $35 a month

#

now i pay £13 a month for a vps with 4 ips

real rose
#

💀 sounds p good to me

spark flint
#

its time

real rose
spark flint
#

gonna have to contact my provider i think

real rose
#

yeah chance you might need to slot the mac into there too

#

im not certain what defines if you do or dont need to do it, whether it anycasting network or what

#

but its p annoying sometimes

surreal sage
#

How can I convert unicode like 😻 to the actual character

#

😻 represents "Smiling Cat With Heart-Eyes"

spark flint
#

yes

#

its great

lyric mountain
radiant kraken
#

^

#

it's prob encoded in ascii

surreal sage
#
Buffer.from("😻", "ascii").toString()
'�xܻ'```
lyric mountain
#

utf8

surreal sage
#

utf-8 returns itself

#
> Buffer.from("😻", "utf-8").toString()
'😻'```
lyric mountain
#

also that wont work probably, because you're giving the characters

#

you need to give the bytes

surreal sage
#

anddddd how do I do that

lyric mountain
#

basically once you get the corrupted chars, you're already doomed

surreal sage
lyric mountain
#

U+ is replaced by \u on most langs

#

the rest is just filling the blanks

#

copyright for example would be \u00A9

radiant kraken
lyric mountain
#

because the chars themselves are also valid utf8 characters

lyric mountain
#

as you can pass the bytes directly

#

instead of going string -> bytes

radiant kraken
#

the one astrid gave was corrupted yes

lyric mountain
#

as I said, the characters themselves are valid utf8 characters

#

so ur not getting the emoji, ur getting the literal characters

#

if u want the emoji u need to write in unicode notation

surreal sage
lyric mountain
#

Buffer.from("\uF09F\u90B1")

radiant kraken
lyric mountain
#

that's a surrogate pair btw

radiant kraken
lyric mountain
radiant kraken
#

try String.fromCodePoint(0x1F431)

lyric mountain
#

like, imagine you have a colorblind friend

radiant kraken
#

very useful

lyric mountain
#

you show them the green color, then you ask them to paint a green scenery

#

you'll get a grey scenery

lyric mountain
#

cut the middleman, if you just want the emoji, declare the buffer directly

surreal sage
radiant kraken
#

yup

surreal sage
#

interesting

lyric mountain
#

\uF09F is the codepoint for that weird mango O in ascii

#

when you try to read that char in utf8, however, the codepoint is \uF078

#

this is why it's irreversible if you try to re-encode a corrupted char

radiant kraken
surreal sage
radiant kraken
#

oh wait i think you meant utf8 bytes

lyric mountain
#

Yes

surreal sage
#

if there is no way to reverse it

#

then is there a way to actually convert it in a way

#

😁 to 😀

radiant kraken
#

why

surreal sage
#

hold on

sharp geyser
#

did someone ping me just to ping zobs to tell them to accept their bot

#

💀

deft wolf
#

Yes TROLL

sharp geyser
#

Well don't accept their bot zobs

#

:D

radiant kraken
#

interesting

#

@surreal sage maybe String.fromCodePoint(...Buffer.from('😁', 'utf8'))?

lyric mountain
#

Ascii really needs to be dropped nowadays

lyric mountain
#

Sure the dictionary is smaller, but do we really need to save a few bytes?

radiant kraken
surreal sage
radiant kraken
#

the only sane string encoding tbh

surreal sage
#

[ 240, 159, 152, 129 ]

#

159 is damn ř

radiant kraken
#

Buffer.from([ 240, 159, 152, 129 ]).toString() yields 😁

#

those 4 bytes are the UTF-8 equivalent of that emoji/codepoint

surreal sage
#

btw these characters are being given by a llama3 model (and im tryna fix that these characters arent emojis)

just politely asked it to convert the grinning face to such characters and got 😁

lyric mountain
#

You should never attempt converting one encoding to another

radiant kraken
#

or Java with its wacky UTF-8 encoding

lyric mountain
#

Yk, someone needs to slam the doors open, assert dominance and say "this will be the new standard"

#

Why do we need so many encodings

#

Windows uses like 9 or 10

surreal sage
#

that's my question

lyric mountain
#

They didn't, site encoding is likely messed up

surreal sage
#

yeah but it's accurate to what the llama3 model gives me

lyric mountain
#

See what's the encoding declared in <head> tag

#

Or perhaps, this is a restored post

surreal sage
#

charset="utf-8"

lyric mountain
#

If they didn't pay attention to what the original encoding was, a backup restore can mess it up

#

Happened a lot on devmedia

#

Such that older posts are nigh unreadable

#

For example, if your backup was utf8 but your new database is ascii

surreal sage
#

i give up 😭

lyric mountain
#

Or windows-1512, which is default in some dbs

sharp geyser
#

windows-1512?

#

wtf kind of encoding is that

lyric mountain
#

Idk the numbers

#

It's windows smth

sharp geyser
#

Oh I was going to say

surreal sage
#

there are a lot of them, i dont blame you

sharp geyser
surreal sage
lyric mountain
#

All we need is utf8

sharp geyser
#

all we need is no encoding

#

:)

surreal sage
sharp geyser
#

windows-1251, windows-1252

#

why

radiant kraken
#

the fact that only 95-98% of webpages use utf-8 is a sin

frosty gale
#

why is there so many fucking char formats

#

either ascii or unicode do we need anything else

lyric mountain
#

yes, we need utf8

eternal osprey
#

hey guys, i basically have a login page, that once logged in, redirects you to the user dashboard. How can i make sure that people just won't simply visit that dashbaord html page, but that they actually need to perform the login!

eternal osprey
#

i am planning to for the backend yeah

hidden gorge
#

I'll send the code for it in a minute.

lyric mountain
eternal osprey
#

huh but how would that work?

lyric mountain
#

if when they access it the token is expired or non-existant, simply redirect to login page

eternal osprey
#

hmmm i see!

#

omg wait that's actually genius

#

so i assume upon login i save a session key on the database

#

i save it in my cookies as well.

#

Each action will go with the session key authentication?

lyric mountain
#

yes

#

that's how most sites handle authentication tbh

#

if you peek at cookies there'll always be a session token somewhere

hidden gorge
# eternal osprey huh but how would that work?

This is how i do logins:

const express = require("express")
const app = express()
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const session = require('express-session');


app.use(session({
  secret: `Code_Here`,
  resave: false,
  saveUninitialized: true
}));

app.use(passport.initialize());
app.use(passport.session());

// ik its not the smartest
const users = [
  { id: 1, username: '', password: '' },
 
];


passport.use(new LocalStrategy(
  function (username, password, done) {
    const user = users.find(u => u.username === username && u.password === password);
    if (user) {
      return done(null, user);
    } else {
      return done(null, false, { message: 'Incorrect username or password.' });
    }
  }
));


passport.serializeUser(function (user, done) {
  done(null, user.id);
});

passport.deserializeUser(function (id, done) {
  const user = users.find(u => u.id === id);
  done(null, user);
});


function isAuthenticated(req, res, next) {
  if (req.isAuthenticated()) {
    return next();
  }
  res.redirect('/api_home');
}

app.post('/login', limiter, (req, res, next) => {
  passport.authenticate('local', (err, user, info) => {
    if (err) {
      return next(err);
    }
    if (!user) {
      console.log(info.message); // Log authentication failure message
      return res.redirect('/api_home'); // Redirect to the home page or wherever you want
    }
    req.logIn(user, (err) => {
      if (err) {
        return next(err);
      }
      return res.redirect('/api/backend/login/re'); // Redirect to the success page
    });
  })(req, res, next);
});

app.get('/Header', isAuthenticated, limiter, (req, res) => {
  res.render('pages/Header', { Config: config })
})
eternal osprey
#

I see, instead of using something like a cron job, can i rather just generate an expiration timestamp beforehand and check that each time to see whether the expuratuon has been hit?

lyric mountain
#

usual session length is 7 days or so

eternal osprey
#

nah i will make it daily probably.

#

Just thinking are there any security issues

#

Like i am likely going to be using mysql

lyric mountain
#

expiration will be creation + length

#

so if u want 1 day, creation + 24h

#

refresh it every time the token is used

eternal osprey
#

I'll probably have to make sure that only db request coming from the site domain are allowed, but even then... can't a hacker do mac spoofing

lyric mountain
#

so the user doesn't get logged out suddenly

eternal osprey
lyric mountain
#

or at least mariadb

eternal osprey
#

i've never used them

lyric mountain
#

maria is literally mysql but working

sharp geyser
#

One thing to note there is 2 types of sessions, stateless and server-side.

Stateless you can use something like jwt tokens to sign your user's requests. Server-side saves a session token to the db and the client, the client would send that token over the request and be compared against the database.

If you are using express, you can use express-session, which has several store modules to fit whatever database you are using, and even store it in memory if you really want to. I personally recommend this approach over stateless as it has many cons to it.

Cons for stateless sessions? It is harder to invalidate them and quite frankly jwt is not meant for anything long lasting.
Pros? It expires on its own, and its harder to fake them as if you use a secret when signing them unless they have that secret they can't get much out of it.

lyric mountain
#

postgres is a bit different, but not too hard to learn

#

they all follow sql standards, so queries will be similar

#

postgres just scales better and has better fine-tuning

lyric mountain
sharp geyser
#

Pros for server-side is you can invalidate/revoke sessions easier since they get removed from the database and are "expired" immediately. Also allows for easier checks and you can use any storage mode you want with em.

lyric mountain
#

but that's an issue in every site

hidden gorge
#

Quick Feedback should I keep the Text All white or make it responive to the Overall System status?

lyric mountain
#

which is why discord spams your console with warnings

sharp geyser
#

That's a skill issue if you get your token hijaked

lyric mountain
#

idk ur palette

#

but maybe orange or smth

eternal osprey
lyric mountain
hidden gorge
lyric mountain
#

if someone abuses your api (like botting), you can identify it by how many times the token was used

#

cross-comparing with the timeframe

lyric mountain
#

for Ro

eternal osprey
#

Yeah that’s true! I might do that

lyric mountain
#

tbh do store token creation date

sharp geyser
lyric mountain
#

so you have a start-end period

eternal osprey
lyric mountain
sharp geyser
#

Ah

#

yea

#

My bad

hidden gorge
sharp geyser
#

keep tokens, internally, revoke them though by changing a status column

#

good idea

lyric mountain
#

tokens are your only proof if you need to ban someone for botting

sharp geyser
#

yup!

#

I wrote all that off memory tbh

#

:p

eternal osprey
#

And in the site, any keys etc will be shown in the website source code right, if I use env they won’t?

#

Sorry for the mad questions here but I am new to creating secure sites lmao

sharp geyser
#

You never store it in source

lyric mountain
#

there's no env on client side

sharp geyser
#

there's only local storage

#

that's where you store it

#

in a cookie

lyric mountain
#

the user token should be stored either on local storage or cookie, up to you

#

there's also session storage, but this one is annoying

#

it gets cleaned up upon closing browser

sharp geyser
#

Basic session workflow is

  1. User logs in
  2. Sever creates a session token and saves any needed data to the session table
  3. User revisits site, that session token is sent and they stay logged in
  4. Session expired or they logged out or its been revoked? They see whatever page people see when they aren't logged in
lyric mountain
#

this is my token structure for example

eternal osprey
#

I know, I rather meant suppose that I want to connect to my api, I will most likely use private keys for that. So my front end shall connect to my back end, but how do I conceal the key so it’s not visible

sharp geyser
#

btw, the session token is saved as a cookie in the browser

lyric mountain
#

I dont use time-based tokens tho

#

if I did I just had to add 2 columns there

eternal osprey
#

If users look at the website code

lyric mountain
#

creation and expiration

sharp geyser
#

Unless you put it in the code on the client side

#

then no

#

Session management should ALWAYS be done on the server

#

Even if you are using stateless

eternal osprey
#

But how can I ever authenticate from where my api was accessed? Any hacker can spoof their ip to act like the site..

lyric mountain
#

well, you cant

sharp geyser
#

Good luck with that.

lyric mountain
#

you can, however, get ip location, even if spoofed

sharp geyser
#

That's out of my jurisdiction

eternal osprey
#

Moreover, how can I then use my private keys to conceal and hash passwords etc sent to the server?

lyric mountain
#

if the ip is too far away from the last used ip (or commonly used ips), you can do something

#

or if the ip doesn't resolve to a valid provider

eternal osprey
#

I see, hmmm

lyric mountain
#

however, if ur going to collect and store ip you need to disclose that

#

with the "we collect data" banner

eternal osprey
#

Idk it seems sketchy to me suppose I want to hash or encrypt passwords and emails sent to my backend, I need public keys setup on server side which can 100% be seen by ppl. Hence how can I hide those keys? I read some articles about using env

lyric mountain
eternal osprey
#

That it hides the data

eternal osprey
lyric mountain
#

read the name again

#

public keys

#

usually for keys you have a pair

#

the private key is only on the server

#

and the public key is available to anyone anytime

#

whenever a request is sent, the private key is used to validate the public key returned

#

but this is done server-side

#

env doesn't exist on client-side, this is specifically exclusive to server-side

#

since you cant see environment vars from a browser, and even if you could it'd still not be hidden to the user

#

at the end of the day, just try to keep client-side tokens to a minimum, a single session token is enough

#

anything else you do on your server, as there you can do your secret shenanigans and nobody will be able to see it

eternal osprey
#

i see

#

thank you so much for all the info

lyric mountain
#

also, I recommend using some formula or reversable structure for your tokens, so you can validate them

#

in my case I use something similar to what discord uses

#

unless someone gets the salt (or key) used to generate it, they cant spoof a token

eternal osprey
#

ahhhh i see

#

arigatoooo

#

Damn lets cook!!

frosty gale
#

or even use a signature honestly

#

then you know for sure you made a key

#

bit unnecessary but its a cool way of doing it

eternal osprey
#

I will just try. @lyric mountain could you test my prototype once it’s done?

#

I can pay you if you want

#

Just want to make sure my site won’t be fucked once it’s launched lmao

lyric mountain
#

dont need to be paid, but I'll have to pass, I'm not good enough at QA and been busy with some stuff lately

#

see if tim or waffle can do it

sterile lantern
#

for slash command options, what is the character limit on the choices provided?

lament rock
#

You mean a string option with choices? Names or values?

sterile lantern
#

names

#

and yeah

#

well in this case its auto complete

#

returning choices

sterile lantern
#

for some reason a 70 character string is erroring

#

i figured it was 100 as well, but this one specific name just errors for no reason

#

as in it doesnt load the options

#

no actual errors

#

but when i shorten that specific name, it works

lyric mountain
sterile lantern
#

no

lyric mountain
#

fancy letters?

#

or rather, what is the name?

sterile lantern
#

83 characters

#

when i remove the GracefulPeaceOfGrass it works

#

or shorten it to Graceful

lyric mountain
#

try GracefulPeaceOfGr for a quick test

sterile lantern
lyric mountain
#

hm, I was considering the issue was ass

sterile lantern
#

GracefulPeac works

lyric mountain
#

well, who knows then

#

maybe they count total command length

sterile lantern
#

thats 75

lyric mountain
#

not only argument length

sterile lantern
#

i think the limit is 75

#

for some reason

lyric mountain
#

what is the full command?

sterile lantern
#

/training update <list> <card>

#

list is just like Thursday | April 24

#

yeah it seems like its 75 for some reason

lyric mountain
#

pretty near

#

IF they count total command length

sterile lantern
#

well this is misleading then

lyric mountain
#

oh wait, name is supposed to be the name of the param

#

not the value

sterile lantern
#

wdym

#

this is the name

lyric mountain
#

/training update <list> <card> those are names

#

training, update, list, card

sterile lantern
#

so what about the kv pairs

#

name+value

#

for options

lyric mountain
#

name is the name of the arg

#

value is the value

sterile lantern
#

is the limit for those 75 or something

#

i might just do the first 72 characters and append "..."

lyric mountain
#

name is supposed to be short no?

sterile lantern
#

well true

lyric mountain
#

but well, yeah ... is an easy fix

sterile lantern
#

ill just do ... because idk how long the name is

#

it usually is below 75 but it just depends on the username

#

thanks!

surreal sage
#

gotta love migrating vps and having to tarball a 50gb folder full of media uploads

#

lovely

lyric mountain
#

why dont you just stream it over ftp?

surreal sage
#

remote server only has a 20 mb/s connection

lyric mountain
#

ah

surreal sage
#

and new server gigabit 🫠

surreal sage
hidden gorge
eternal osprey
#

this shit's actually making me crazy

#

how tf can i make that secure shit align with the above part

sharp geyser
#

That black text is not good

#

Barely readable

eternal osprey
#

yeah i was thinking to change it, but not sure what color though

#

white seems too much

sharp geyser
#

Also, it might be a padding issue so make sure you have no padding interupting

sharp geyser
#

Something not quite white, but not fully bright like white

eternal osprey
#

i think it;s more because that reliable part is just too big

sharp geyser
#

It looks roughly the same in text

#

The grid cells might just be too large width wise

#

or whatever you use

eternal osprey
#

i just used d-flex

#
<div class = "pt-5 mt-5 container-fluid d-flex flex-row align-item-center justify-content-center">

<div class="d-flex flex-column justify-content-center align-items-center">
    <i style="color:red" class="fs-1 bi bi-shield-lock-fill"></i>
    <p class="fs-4 fw-bolder">Secure</p>
    <p class="text-center w-75 fs-6">
        Guardian Bot boasts a plethora of logging and moderation commands, empowering Discord server owners with comprehensive
        control and oversight. From detailed activity logs to versatile moderation tools. All to boost more server security.</p>
</div>
<div class="d-flex flex-column justify-content-center align-items-center">
    <i style="color:red" class="fs-1 bi bi-star-fill"></i>
    <p class="fs-4 fw-bolder">Reliable</p>
    <p class="text-center w-75 fs-6">
        Guardian Bot is widely recognized for its unwavering reliability in maintaining secure and well-managed Discord
        communities. Its consistent performance ensures effective moderation, providing users with confidence and trust
        in their server's safety and stability.</p>
</div>
<div class="d-flex flex-column justify-content-center align-items-center">
    <i style="color:red" class="fs-1 bi bi-shield-lock-fill"></i>
    <p class="fs-4 fw-bolder">Versatile</p>
    <p class="text-center w-75 fs-6">
        Guardian Bot's versatility shines through with its arsenal of over 50 commands. From auto-mod tools to logging and
        leveling features, it offers a wide range of functionalities to suit any Discord community's needs.</p>
</div>
</div>```
real rose
sharp geyser
#

you are using flexbox

eternal osprey
sharp geyser
#

Well the only thing I can think of is either A. padding issue or B. size issue

surreal sage
#

aaa im stuck on cat5e cables and i actually have to wait 5 minutes for a 45gb file to transfer to a computer 1 meter away

eternal osprey
#

i forgot to add container to it

#

afterwards it works lul

#

is it still off center...

#

nahhh good enough ig

sharp geyser
#

Its barely noticiable now

#

They'd have to nitpick

eternal osprey
#

mannnn fuck them nitpickers!!

sharp geyser
#

Also

#

Definitely use an offwhite color for the text

#

Don't leave it black

#

Talking about the one in the image

eternal osprey
sharp geyser
#

That looks better

eternal osprey
#

thanks for all the help! I really really appreciate it!!!!

#

Front end is fun but idk i am not creative enough nor have the experience for it to fully come up with it myself

#

backend is where my heart really lies..

sharp geyser
#

I suck at frontend as well

eternal osprey
hidden gorge
#

Quick question how does the updated page look?

sharp geyser
#

ima be real those logos add nothing to it

hidden gorge
#

i have been told they look good so they are staying.

eternal osprey
#

hahahah no jk

sharp geyser
#

Who told you this

#

Cause to me it looks like it will cut through the text

eternal osprey
sharp geyser
#

Which is a no go

hidden gorge
quartz kindle
sharp geyser
#

didnt think of that

hidden gorge
#

No

sharp geyser
#

Don't ask for feed back bozo if you can't take it

#

You asked how it looked, I told you my opinion

#

Go back to stalking another tiktoker

quartz kindle
#

that might be the reason why they are not centered, even if they have the same settings

hidden gorge
sharp geyser
#

They are trying to line it up with the image above from what I assume

#

Centering it exactly where Secure lines up with that small Image ontop of the bg image

sharp geyser
#

if thats not stalking idk what is

hidden gorge
sharp geyser
#

So, stalking?

hidden gorge
#

fuck off

sharp geyser
#

Just saying, dont get so triggered when you asked for feed back

real rose
#

☝️

sharp geyser
#

or it will make people dislike you more

hidden gorge
sharp geyser
real rose
#

Howdy howdy

sharp geyser
#

You run a business right dylan

#

or help

real rose
#

smth like that\

sharp geyser
#

Eyes mind if we converse in dms about such topic?

real rose
#

go for it

hidden gorge
sharp geyser
#

Right, but even so. It adds nothing to the site, it's just another thing to look at to be distracted by the content of the site. It'd be different if it was aesthetically pleasing to the eye and builds onto the design. Though what you have is just free floating logos. Some company sites make boxes that have floating objects around it with text or what not to give it a sort of ambiance to it and lead you to look at it and read the content (or however you describe it)

frosty gale
sharp geyser
#

hello chloe

surreal sage
#

am i cooked for googling this

real rose
#

tar -cf

surreal sage
#

tar -xf

#

c = create
x = extract

#

🔥

surreal sage
#

oh tar name

#

right

real rose
#

filename

#

yea

surreal sage
#

why on the extract cmd

#

kinda weird

#

❤️

dense berry
#

anyone know a good Discord Bot hoster that offers support for custom builds? I'm using pnpm/node to run the bot

lyric mountain
#

Any vps provider

#

Don't use bot-specific hosts

sharp geyser
#

cheap

#

:)

#

if all you want is a bot host

#

though if you want to host other things than just a bot, then get a real vps from like contabo

dense berry
#

holy shit novonode is actually so good... how is it so cheap?

sharp geyser
#

Cause its amazing for bot hosting and web hosting and game servers

#

their vps's are quite pricey but that is because they are quality

#

If you want more info on it ask @real rose

#

he's the big dawg

radiant kraken
#

i've heard lots of devs recommend it as it's very reliable

deft wolf
#

I will have to move to another server because it turned out that 1TB of bandwith is not enough for my bot masnakappa

#

Unfortunately, it is more profitable to take a server with a larger amount of bandwith by default on Datalix than to buy another terabyte of bandwith

sharp geyser
#

depending on what you are doing

#

ig the latency doesn't matter

#

also novonode isn't strictly a bot host, it offers other services. Which is why its able to make its bot host plans so cheap I think. They can offer the resources at those prices, because its so cheap for them to do so that other aspects of the service probably makes more money. Though dylan himself will have to comment on this as I am just speculating

surreal sage
#

AAAAAAAAAAAAAAAA

#

how do i not make this happen.

#

istg.

#

idk what the fuck im doing wrong

#

i commit

#

i pr to get commit onto release branch

#

i rebase

surreal sage
eternal osprey
#

1tb bandwidth is not enough for your bot?

#

Is your bot serving nasa’s supercomputers or sum?

#

Like how can your bot possibly be capped out at sending 1tb of data at a single moment

surreal sage
#

if your bandwidth is 1tb, you send a 10gb file, you have 1tb - 10gb bandwidth remaining

deft wolf
#

Exactly, my bot supports over 4,500 active subreddits, which translates into several hundred thousand posts per month

#

Even if it is a few kilobytes, this amounts to quite a lot of data per month

#

I also thought that 1TB would be enough, but I will switch to a server that offers 15TB/month and I won't have to worry about it

eternal osprey
#

Still it sounds like a lot for a regular discord bot, but yeah if it’s handling large files I do understand

frosty gale
#

hence band width

#

not sure what youd call the max you can send over some time though

#

metered limits?

#

but its not like people wouldnt understand you anyways

deft wolf
#

Sometimes hosting providers say "unlimited bandwidth"

#

These nomenclatures are strange sometimes

real rose
#

Or that there's a soft limit of like 25tb for example

#

then you need to provide cause for anything more

deft wolf
#

I know, I know, but on the other hand, such hostings have very poor specifications, I prefer the limited 1TB to "unlimited" traffic and 2GB of RAM for the same price masnakappa

#

I used one like this before and paid a lot more for less ram and cores than I do now

real rose
quartz kindle
#

yeah the correct word should be "traffic"

deft wolf
lyric mountain
surreal sage
#

i pushed a single commit

#

i created a pr to get that commit onto another branch

#

(both branches were synced before the initial commit)

#

and wazah

lyric mountain
#

what editor do you use?

surreal sage
#

vsc (cmd though) for push
gh site for pr

lyric mountain
#

jetbrains ides have a tree view for commits, was going to tell u to check there

#

but idk if vsc has it

surreal sage
#

downloading graph extension

lyric mountain
#

anyway, you either pushed with a reverted commit OR you updated the original branch sometime after pushing the pr

surreal sage
#

no

#

nuhuh

#

i didnt

#

it was a fresh change

#

i pushed

#

i pr'd

#

merged

#

that's the entire timeline

#

no other commits

lyric mountain
#

just saying the possibilities

#

it HAS to be one of the two

surreal sage
#

BUT IT ISNT

lyric mountain
#

git says otherwise

surreal sage
#

BEHIND BUT EQUAL

#

both branches are 1:1 qua code

#

i can barely understand this but here are some ss'

lyric mountain
#

see, there's a commit on original branch after the fork was made

surreal sage
#

that was a pr

#

there were 2 pr's

lyric mountain
surreal sage
#

i see it

#

no wait ignore the top part

#

i pushed that one forcefully

#

cough

#

let me just fire up a test repo

lyric mountain
#

3 > 2, thus why original is 1 ahead of pr

#

but why does this even matter btw

surreal sage
#

cuz this

lyric mountain
#

ok but why do you bother with the diff status?

surreal sage
#

my autism

lyric mountain
#

once merged it wont exist anymore

#

if it really bothers you then nuke dev branch and create it again

surreal sage
#

im not delusional

#

the tism is tism'ing

lyric mountain
#

release

#

main

#

notice that both commit hashes are different

surreal sage
#

my eyes are witnessing that the hashes are different

#

(i rebased)

lyric mountain
#

which means those are 2 different commits

#

thus 1 behind, 1 ahead

lyric mountain
#

it's not 2 commits, it's the same commit

#

github diff checker works with operation amount

#

how many operations would you need to make branch A reach branch B

#

delete commit (1 behind) -> push commit (1 ahead)

neon leaf
#

I am going insane

#

mfw new YieldedResponse() instanceof YieldedResponse is false

lyric mountain
#

it shouldnt even let you do this

wheat mesa
#

yeah that doesn’t make sense

sage bobcat
#

One message removed from a suspended account.

radiant kraken
#

@lyric mountain @wheat mesa @sage bobcat

lyric mountain
#

Your js privileges have been revoked, I demand a js jail role

radiant kraken
real rose
sharp geyser
#

hello Roosa

real rose
#

greetings

sharp geyser
#

oops

#

this is development

#

💀

real rose
#

hello development

sharp geyser
#

hello developers

radiant kraken
harsh nova
#

hello humans(?)

radiant kraken
#

i'm not a human

#

how dare you

real rose
#

rust developer != human

radiant kraken
#

frfr

sharp geyser
#

oh fuck

#

what are we

radiant kraken
#

we are

#

superhumans

sharp geyser
#

fair enough

sage bobcat
radiant kraken
neon leaf
#

basically I had a mergeclasses function

#

which takes in original + extra to merge with

#

and the merged ones would override methods of the original

#

and one of the original methods returned an instance of a class

#

which obviously got replaced by another class, same code however defined in another place

#

so yes

lyric mountain
#

tl;dr: you made banana not be a banana

sharp geyser
#

cmo banana

real rose
quartz kindle
radiant kraken
#

frfr

#

honestly Symbols are extremely underrated

#

the fact that 95% of nodejs developers gloss over them is sad

harsh nova
#

I'm one of those nodejs devs who gloss over them

quartz kindle
#

well, except for all the secret hidden methods, the other purposes they serve are pretty uncommon

radiant kraken
quartz kindle
#

i dont usually use symbols either

#

node uses them everyone in their source

#

mostly to emulate private class members

harsh nova
#

The day JavaScript actually adds typings I'm going to be so happy

radiant kraken
#

like this is actually pretty useful

harsh nova
#

Mmmm typescript without the transpilation step

quartz kindle
harsh nova
#

I think so but getting stuff actually implemented is not the fastest

quartz kindle
#

never seen that before

#

hacking into the implicit inspector that runs in the repl

radiant kraken
#

bam you get Python's __repr__ or Rust's Display functionality in Node.js

harsh nova
#

That is pretty nice indeed

quartz kindle
harsh nova
#

Yeah for sure

radiant kraken
#

there's a proposal for it, can't wait for it to get implemented

quartz kindle
#

i dont like decorators

radiant kraken
#

frameworks would like to disagree

harsh nova
#

I'd love if native js type hinting supported old ts code so you'd not have to rewrite anything

quartz kindle
#

i dont like frameworks

#

:^)

radiant kraken
#

yeah you only like tiny things tim

quartz kindle
#

i like buffers and bitfields

radiant kraken
#

same

#

but if you like those you should've been coding in C instead

#

everything is a number