#development

1 messages · Page 163 of 1

sonic lotus
#

wait

#

i think its for guild

lyric mountain
#

then this is the reason

earnest phoenix
#

how do you think

#

?

lyric mountain
#

it's loading the commands before the shard is loaded

earnest phoenix
#

u can register guild commands before starting your bot

#

why would that be the issue

lyric mountain
#

how would u register guild commands if no guild is available?

earnest phoenix
#

the guild don’t need to be a available ? you can register them via the guild id

neon leaf
earnest phoenix
#

i’ve done it before

lyric mountain
#

unless u have it stored somewhere else

earnest phoenix
#

why wouldn’t you store it elsewhere

earnest phoenix
#

are you saying he’s registering guild commands to every guild his bots in?

#

what’s the point of that

lyric mountain
#

^

earnest phoenix
#

what’s ^ suppose to mean

#

you keep saying it like i’m a genie

lyric mountain
#

"read above smartass"

earnest phoenix
#

i read

#

what more is there to read

lyric mountain
#

the context

earnest phoenix
#

what context

lyric mountain
#

sigh, forget about it

#

just get out unless u want to answer them

earnest phoenix
#

well i don’t think your answer is useful

lyric mountain
#

good thing I didn't ask

earnest phoenix
#

you can register guild commands without your bot being started

earnest phoenix
# sonic lotus howw

with the guild id? are you sure you're registering guild commands, cus you said "i think".

earnest phoenix
#

what is guildId

sonic lotus
earnest phoenix
#

none of those are defining guildId

sonic lotus
#

see this

#

tell me wht to do with this

balmy flax
#

Can someone explain why I might receive test votes succesfully but not the real votes?

balmy flax
wooden ember
#

how can a message be sent by nobody?

warm surge
wheat mesa
#

The member object only exists on guild messages

#

Not on DMs

sage bobcat
wooden ember
#

the bot wasnt dm'ed

sage bobcat
#

One message removed from a suspended account.

wooden ember
#

though I do need to do that that is a good shout

sage bobcat
#

One message removed from a suspended account.

wooden ember
#

all the context I have is that crash report and thats it

#

currently I put this in there that might fix the issue

#

hasnt crashed so far

earnest phoenix
#

w solution

wooden ember
#

ah cool I guess

quartz kindle
earnest phoenix
#

isn't that a privacy issue

quartz kindle
#

no idea, but thats what the docs say lol

#

maybe its ephemerals sent by the bot itself

earnest phoenix
#

hm

#

probably

#

but whats the pooint of that

#

lol

wooden ember
#

Hmmm how odd

#

The bot is in 8 ish servers and im not in all of them so I can't really track down what exactly caused it but it seems to be fixed for the time being.

#

All I need that bit of code for was just for a joke anyway. It was so when my mate said yes the bor would reply no and thats it really

earnest phoenix
#

as tim said it was either a webhook or ephemeral message your bot sent

quartz kindle
#

when it comes to the discord api, and especially discord.js, its always a good idea to check everything, just in case

spice onyx
#

What's up people

earnest phoenix
#

i doubt discord would send message create events for ephemeral messages not sent by the bot

#

sounds like a privacy issue

quartz kindle
#

also, when it comes to using code/libs made by other people, its always a good idea to check everything as well

#

you never know if and how much you can trust their typings/docs

earnest phoenix
#

tim wants you to read the entire libaries code so you understand it 😁

quartz kindle
#

nah

#

just add a bunch of ifs in your code

#

to make sure the thing thats supposed to exist actually exists

frosty gale
#

do you want me to fire up ghidra and start decompiling it

earnest phoenix
#

how would it work

quartz kindle
#

do runtime checks

quartz kindle
#

it also can in certain js environments

#

for example nwjs supports loading compiled bytecode

frosty gale
#

or dlls

#

yeah

wheat mesa
#

bro doesn’t know what a compiler is how you expect him to know that 😭

earnest phoenix
#

stop lying

wheat mesa
#

What does a compiler do

quartz kindle
#

it compiles :^)

earnest phoenix
# wheat mesa What does a compiler do

A compiler is a special program that translates a programming language's source code into machine code, bytecode or another programming language. The source code is typically written in a high-level, human-readable language such as Java or C++.

wheat mesa
#

Ok

#

Copy paste answer

#

Nice

earnest phoenix
#

no

#

ofc i know what a compiler is

#

i'm an amazing coder

quartz kindle
#

lmao

earnest phoenix
#

also guys

earnest phoenix
#

i need help

#

my computer screen keeps flashing black

#

for like a millisecond

#

every like

#

3 minutes

frosty gale
#

if youre an amazing coder you should be able to solve this

earnest phoenix
#

does anyone know how i can fix it

#

i need genuine help

pale vessel
#

check your graphics drivers and unplug/replug your display cable

#

maybe reseat your GPU too just in case

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

ok

#

girlboss are you also a computerboss?

#

help me with the above ^^^

#

imma try reseating my gpu tomorrow

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

like

#

my graphics card broken

#

?

wheat mesa
#

Pretty sure it’s a skill issue

earnest phoenix
#

bruh

#

pls be helpful

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

i update my drivers with gforce experience right?

wheat mesa
#

issue de skill

sage bobcat
#

One message removed from a suspended account.

frosty gale
#

this is battleless right

#

just checking

earnest phoenix
#

ok i have the latest drivers i think

wheat mesa
#

Yes

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
frosty gale
#

the attitude was familiar

earnest phoenix
#

(these guys are paranoid )

sage bobcat
earnest phoenix
#

yeah

#

where on my profile does it say battleless

#

?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

yeah my previous identity

#

i am not battleless anymore

#

he is not anymore

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

no

#

i am a new person

#

anywho

sage bobcat
#

One message removed from a suspended account.

frosty gale
#

do you have the same blood type

earnest phoenix
#

i have more concerning issues than all this speculation

#

i hope my graphics card ain't broken

#

i don't wanna buy a new one 🙁

sage bobcat
#

One message removed from a suspended account.

frosty gale
#

would be a real shame

sage bobcat
#

One message removed from a suspended account.

pale vessel
#

someone pinged?

sage bobcat
#

One message removed from a suspended account.

pale vessel
#

oh I'm blind

earnest phoenix
#

power supply?

#

bruh

#

how expensive are they

#

my power supply is pretty good

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

does it look like i got an extra power supply laying around

pale vessel
#

it can't be your psu

frosty gale
#

when it flashes black does the monitor show up something like "display port" or "hdmi" popup like you would see if you just turned it on

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

Hey is there a way I can load test any discord bot?

#

Like to see if it can handle 100k users or something

#

performance testing

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

a very quick black blink

crystal wigeon
#

To simulate huge traffic basically

earnest phoenix
#

imma try reseating my graphics card tomorrow

#

getting off soon anyways

sage bobcat
earnest phoenix
#

wym by handle 100k users

#

in what way

#

🤨

crystal wigeon
#

Just to test performance of the bot

earnest phoenix
#

like 100k people spamming your bot?

crystal wigeon
#

Kinda yeah like concurrent users

#

To see how much scaling would be needed etc

#

Cause running shards on 1 machine is probably not ideal

earnest phoenix
#

🤷 maybe

crystal wigeon
#

how do these bots with millions of servers handle stuff

earnest phoenix
#

tim can probably answer this

crystal wigeon
#

Like mudae and karuta etc

#

mm

earnest phoenix
#

maybe he'll see

crystal wigeon
#

hope so

#

I think it’s too late for him atm tho

frosty gale
#

also fine tuning everything as you go for example if your database is slow maybe look at your models or use another database that can better handle load

#

smart caching probably as well

#

as you scale up you need to aim to get more out of what you already have with less

#

there is no set way it all depends on what your bot does and the kind of work youll be doing

#

a music bot will probably have a much more complicated stack and scaling procedure than a rpg bot or something

pale vessel
#

someone should make a library that emulates a specific amount of guild and shards for your bot and send fake events with the content being your bot commands (and other random messages) to test your bot

#

you could do it with existing libs in a janky way but it'd be cool to have a lib dedicated for it

craggy pine
#

To add one to what Chloe said, I do know some bots have instances of the bot. So for example shard 1 -> 10 will be an instance 11-20 ect ect.

sonic lotus
#

guyz my bot dosent show slash cmds in my server... what i have to chnage in this??

wheat mesa
#

I have a feeling it’s going to be difficult to find help with your question because you’re giving us code that you obviously did not write, and therefore we know in advance that it’s going to be difficult to help

radiant kraken
#

immediately denied once i saw the word blockchain

sonic lotus
#

i forgot to check the applications.commands box in dev portal

civic scroll
spark flint
#

All bots now automatically get “applications.commands” when you add

sonic lotus
#

and today i was thinking to add something to it

#

but thank you

radiant kraken
surreal sage
#

chatgpt wilding

#

wrong language lil g

eternal osprey
#
module Say where

say :: Integer -> String
getHead :: String -> Char
getTail :: String -> String
getPrefix :: Integer -> String
converter :: Char -> Integer
converterString :: String -> Integer
parseWay :: String -> String
integerCheck :: Integer
integerCheck = 0
converterString s = read s


converter n
    | n == '0' = 0
    | n == '1' = 1
    | n == '2' = 2
    | n == '3' = 3
    | n == '4' = 4
    | n == '5' = 5
    | n == '6' = 6
    | n == '7' = 7
    | n == '8' = 8
    | n == '9' = 9


getHead x = head  x
getTail x = tail  x
getPrefix n
    | n == 2 = "ty" 
    | n == 3 = " hundred"
    | n == 4 = " thousand"
    | n == 5 = " thousand"
    | n == 6 = " million"

parseWay n = if length n /= 5 then (say (converter (getHead n)) ++ getPrefix (fromIntegral (length  n)) ++ " " ++ say (converterString (getTail n))) else say (converterString ([(n !! 0)] ++ [(n !! 1)])) ++ getPrefix (fromIntegral (length n)) ++ " " ++ say (converterString (drop 2 n))
say 0 = "zero"
say  1 = "one"
say  2 = "two"
say  3 = "three"
say  4 = "four"
say  5 = "five"
say  6 = "six"
say  7 = "seven"
say  8 = "eight"
say  9 = "nine"
say 10 = "ten"
say 11 = "eleven"
say 12 = "twelve"
say 13 = "thirteen"
say 14 = "fourteen"
say 15 = "fifteen"
say 16 = "sixteen"
say 17 = "seventeen"
say 18 = "eighteen"
say 19 = "nineteen"
say 20 = "twenty"
say 50 = "fifty"

say n = if (all (== '0') (show n)) || converter (getHead (show n)) == integerCheck then say (converterString (getTail (show n))) else parseWay (show n)

i tried to create a natural language parser, but the case say 0 is always emitting a zero whenever the end is 0.

So:
say 200 -> two hundred zero
say 2000 -> two thousand zero.

frosty gale
#

bro has all the crypto stack up his sleeve

quartz kindle
#

@frosty gale

pale vessel
#

they probably lost the source after so long

#

can't blame them, people wanted the games back on steam

sonic lotus
#

how can i remove these suggestions?

frigid leaf
#

It's easier to debug

#

Show me your play command

sonic lotus
#

ok

#

there u go @frigid leaf

frigid leaf
#

Not sure from what I can see they're probably built in to your handler or something

sonic lotus
#

cuz uk

#

when i play from yt or ym i.e youtube or youtube music it actually dosent play anything

frigid leaf
#

do you use .env in the bot

#

make sure you've provided a youtube id

sonic lotus
#

yes

#

oh

frigid leaf
#

My bot works fine

#

What player do you use

sonic lotus
#

atleast for now

frigid leaf
#

nono in the code

sonic lotus
#

can u check this i think this have some problem

frigid leaf
#

lavalink

#

do you have a lavalink

sonic lotus
#

yeah

#

i have hosted one for me

frigid leaf
#

you're host is not lavalink

#

Where are you hosting it

sonic lotus
#

damn it is lavalink

frigid leaf
#

It is a laavalink

frosty gale
#

why remove the drm anyways

frigid leaf
#

but it needs to be lavalink.subdomain.tld or just domain.tld

frosty gale
#

did the servers shut down

sonic lotus
frigid leaf
#

oh

#

Lavalink on replit doesn't work anymore

#

you have to use a new host

sonic lotus
#

new?

#

how

frigid leaf
#

replit does not support lavalink anymore

#

it says lavalink-replit

#

replit doesn't support lavalink

sonic lotus
#

oh

frigid leaf
#

yeah

#

you have to use a new host

sonic lotus
#

so where should i have to host new one>

frigid leaf
#

you'd probably need to buy a server at a hosting

sonic lotus
#

damn

#

any free alt?

frigid leaf
#

i dont know anyone that host's lavalink or unless you want to use public lavalinks

#

but thats unsafe

sonic lotus
frigid leaf
#

yeah

sonic lotus
#

can i use from lavalink?

frigid leaf
#

use those

sonic lotus
#

ok wait

#

lemme check now

frosty gale
#

bruh public lavalink

sonic lotus
sonic lotus
#

free budget guzy uk lol

frigid leaf
#

hm

#

sssl issue

sonic lotus
#

[07-09-2023 11:48:24]: [ERROR] Node "ssl.horizxon.studio" encountered an error: write EPROTO C087AECC087F0000:error:0A000458:SSL routines:ssl3_read_bytes:tlsv1 unrecognized name:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1586:SSL alert number 112
.
[07-09-2023 11:48:24]: [WARN] Node "ssl.horizxon.studio" disconnect because [object Object].
[07-09-2023 11:48:54]: [LOG] Node "ssl.horizxon.studio" reconnected.
[07-09-2023 11:48:54]: [ERROR] Node "ssl.horizxon.studio" encountered an error: write EPROTO C087AECC087F0000:error:0A000458:SSL routines:ssl3_read_bytes:tlsv1 unrecognized name:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1586:SSL alert number 112
.
[07-09-2023 11:48:54]: [WARN] Node "ssl.horizxon.studio" disconnect because [object Object].

frigid leaf
#

use non ssl lavalinks

sonic lotus
earnest phoenix
#

Just buy a VPS from a VPS provider and host them yourself, there are pretty cheap options available

sonic lotus
# frigid leaf sssl issue

[07-09-2023 11:50:45]: [READY] Node "54.38.198.24" connected.
[07-09-2023 11:50:45]: [ERROR] Node "54.38.198.24" encountered an error: Unexpected op "ready" with data: [object Object].

frosty gale
#

what if bro has no money

deft wolf
#

Skill issue

sonic lotus
deft wolf
earnest phoenix
#

Get a job troll

frigid leaf
#

fr

sonic lotus
frosty gale
#

what if bro is not old enough for a job

sonic lotus
frosty gale
#

nvm

frigid leaf
#

i have a job man

#

and im only 16

frosty gale
#

skill issue then

earnest phoenix
frigid leaf
#

i work for a hosting company

sonic lotus
#

i think this aint a place to bully me -_-

frigid leaf
#

fr

sonic lotus
# frigid leaf fr

[07-09-2023 11:50:45]: [READY] Node "54.38.198.24" connected.
[07-09-2023 11:50:45]: [ERROR] Node "54.38.198.24" encountered an error: Unexpected op "ready" with data: [object Object].

frigid leaf
#

dunno tbh you'd have to move from replit

sonic lotus
#

i get this now

frosty gale
#

i just work retail once a week and thats enough to fund all my stuff

#

starting full time soon though

frigid leaf
#

do u have any vps'?

frosty gale
#

havent really needed one rn but i have a very cheap one that i forgot about but keep paying for lol

#

it only hosts 2 things i think

frigid leaf
#

i dont own

sonic lotus
#

lol

frigid leaf
#

mb

frosty gale
#

bro works for hosting company but has no vps

frigid leaf
#

i have a dedicated server

earnest phoenix
#

DigitalOcean, Google Cloud Platform, and Hetzner 🔛🔝

frigid leaf
#

hetzner asn's are abused

#

so i dont use them

frosty gale
#

and digital ocean just tries to get you to pay as much as they can get from you

#

we dont even talk about gcp because theyre designed for businesses

frigid leaf
#

aws is just overpriced and it's not even good

#

i have 1 dedicated server in the cloud and 3 in my home

frosty gale
#

if i had dedicated servers at home id be mining crypto by now

earnest phoenix
sonic lotus
#

can someone provide a refrence code for lyrics cmd for a lavalink music bot?

frigid leaf
#

so i left hetzner

#

i did mail to mail and it went to spam

frosty gale
#

did you check spam lists

frigid leaf
#

yes

#

it never went to spam

#

i checked spamassasain and it said asn abused

frosty gale
#

they usually say if your ip is blacklisted because of local or neighbour ips

frigid leaf
pale vessel
#

discord also used to block hetzner's IPs from their voice servers

#

they might still do, I dunno

frigid leaf
frosty gale
#

theres one ip blocklist that immediately marks your ip as spam if the company youre hosting on has at least one reported spam ip and tells you to pay like $100 a month or some large amount to remove you from the neighbour ban

earnest phoenix
frigid leaf
#

even contabo ip's didnt go to spam

frigid leaf
#

i run a cloudflare tunnel from my home to the public cus

#

i only have 1 static ip

frigid leaf
#

512 MB RAM FOR 4 DOLLAS

#

hell na

earnest phoenix
frosty gale
#

they do have the better user experience than other hosts though ill give them that

earnest phoenix
#

DigitalOcean has always provided the greatest experience compared to any others we've tried

frigid leaf
#

power of solar panels

#

uptime 4 months

#

why is blud using 14 mbps up and 13 down

quartz kindle
#

cant run without having the CD in the drive

#

they either couldnt be bothered to change that for the steam release, or they cant because they dont have the source code anymore

earnest phoenix
frosty gale
#

makes sense

earnest phoenix
#

hi

wooden ember
#

if its at max load all the time I mean

#

i think its actually cheaper now. I ree did the calculation since power droped 15p from 45p/KWh and its more like £2.24 a month for a pi4 running at max usage these days

grim aspen
#

like the old versions of rollercoaster tycoon 3

frosty gale
frigid leaf
eternal osprey
#

for some reason i love the languages that lots of people tend to hate

#

haskell, assembly

#

i really love it

grim aspen
#

i'm trying to work with obscure languages

#

because of boredom

wooden ember
odd nexus
#

and do not intercat with other server

earnest phoenix
#

no one here is helping you break discord tos

#

but it’s basic coding

earnest phoenix
#

selfbots are against discord tod

#

tos

odd nexus
earnest phoenix
#

don’t mTter if your testing

#

bud admitted to breaking discord tos

#

that’s crazy

odd nexus
earnest phoenix
#

you literally did

#

lol

odd nexus
#

whats proof

earnest phoenix
#

bud thinks they don’t have logs here

odd nexus
#

ok lol

#

ok

quartz kindle
#

unless your server is not public

vivid fulcrum
#

the standard for that is wayyyyy lower for minecraft servers

#

from my experience a lot of vendors don't bother with that and just resell DO droplets, relying on their ddos protection

frosty gale
#

wait thats actually fucking smart

#

dropshipping galaxygate/contabo vps

#

thats my next business idea

grim aspen
frosty gale
#

all i see is a hater 🗣️ 🗣️ 🗣️ 🗣️

grim aspen
#

Like I mean that it could be a TOS issue, not that I’m entirely hating against the idea

frosty gale
#

dont know why not

#

theyre still getting paid

#

if anything youre helping them get customers

vivid fulcrum
#

there would probably be a legal stop at some point

#

you're also technically using their services so they can halt your entire business if they find you crossing a line ig

#

but reselling it fair game

surreal sage
#

snoozing 😭

#

how long does shii take 😭

surreal sage
#

been 20 min 💔

#

help

frosty gale
#

yeah i bet you love OSS discord considering youre using all of it for free 💀

surreal sage
#
Oss

Oss (Dutch: [ɔs] ) is a municipality and a city in the southern Netherlands, in the province of North Brabant, situated between Nijmegen and 's-Hertogenbosch.

frosty gale
#

dont get smart with me person emulating android on a pc and it booting slower than a device running on a power optimised over performance arm chip a fraction of the size of an x86 cpu

sharp geyser
#

bro what

frosty gale
#

quite proud of that roast

surreal sage
#

shit's still going

#

my ubuntu vm starts faster than that

sage bobcat
surreal sage
#

ur not wrong

#

it's just bliss os tbh

#

android 9 runs fine

sage bobcat
frosty gale
#

thanks faith 😭 😭

wheat mesa
#

If anyone has experience with Go, I'm stumped here. I have these structs, Chunk and ChunkType, and I'm trying to serialize a buffer into a Chunk struct. However, gob.Decode() keeps returning error: EOF, and I'm not quite sure why ```go
type Chunk struct {
Length uint32
Type ChunkType
Data []uint8
Crc uint32
}

type ChunkType struct {
Bytes []uint8
}

// Testing sample data
func TestingChunk() Chunk {
length := uint32(42)
chunk_ty := "RuSt"
message_bytes := "This is where your secret message will be!"
crc := uint32(2882656334)

chunk_buffer := bytes.NewBuffer(make([]uint8, 0, 4 + 4 + length + 4))

binary.Write(chunk_buffer, binary.BigEndian, length)
binary.Write(chunk_buffer, binary.BigEndian, []uint8(chunk_ty))
binary.Write(chunk_buffer, binary.BigEndian, []uint8(message_bytes))
binary.Write(chunk_buffer, binary.BigEndian, crc)

fmt.Println(chunk_buffer.Bytes())

chunk, err := ChunkFromBytes(chunk_buffer.Bytes())

if err != nil {
    panic(err)
}

return *chunk

}

// The problematic function
func ChunkFromBytes(data []uint8) (*Chunk, error) {
fmt.Println("Creating chunk from bytes", len(data))
buf := bytes.NewBuffer(data)

dec := gob.NewDecoder(buf)
var decodedChunk Chunk
    // Returning error: EOF no matter what
err := dec.Decode(&decodedChunk)

if err != nil {
    return nil, err
}

return &decodedChunk, nil

}

#

Nevermind, it's because Gob preserves type info in its encoding and is assuming to read that

frank pollen
#

Hello! Does anyone know the JavaScript library called Jimp?

#

I am creating an image with this code and I want to make the message inside it two lines, but it's not working. How can I do that?

        const messageText = (`${member.user.username} sunucudan ayrıldı!Sunucumuz ${member.guild.memberCount} kişi oldu. Hedefe ${kalanUyeSayisi} üye kaldı!`);

const correctedMessageText = replaceTurkishCharacters(messageText);

        const textX = 70;
        const textY = background.getHeight() - 50;
    
            background.print(yazitip, textX, textY, correctedMessageText);

        background.write(`Sayaç-Çıkış-${member.id}.png`, () => {
            Kanal.send({
                content: ` `,
                files: [{
                    attachment: `Sayaç-Çıkış-${member.id}.png`,
                    name: `Sayaç-Çıkış-${member.id}.png`
                }]
            }).then(() => {
                fs.unlink(`Sayaç-Çıkış-${member.id}.png`, (err) => {
                    if (err) {
                        console.error(`Dosya silinemedi: ${err}`);
                    }
                });
            });
        });
    });```
#

First Line: ${member.user.username} sunucudan ayrıldı!
Second Line: Sunucumuz ${member.guild.memberCount} kişi oldu. Hedefe ${kalanUyeSayisi} üye kaldı!

civic scroll
#
`${member.user.username} sunucudan ayrıldı!\nSunucumuz ${member.guild.memberCount} kişi oldu. Hedefe ${kalanUyeSayisi} üye kaldı!`
#

i put the \n after the first line

neon leaf
#

so I have a minigame that shows you code snippets and the faster you find the line number of where an error would occur you get money, im still on the generation part and it seems that the wrong line number is often early and therefore seemingly not random, is there any good way of making it seem more random?
https://fs.rjns.de/v/GUKpoRPXeAjDatVbFH

232.82 KB (image/png)

earnest phoenix
#

i’m confused

quartz kindle
#

:^)

neon leaf
#

nahh, I want some more complex errors too like wrong math equations

quartz kindle
#

ask AI to make a mistake on purpose

#

xD

neon leaf
#

currently I have this for defining

const list: Snippet[] = [
    {
        language: 'js',
        lines: [
            'function getRandom() {',
            [
                {
                    content: '  return Math.random()',
                    isError: false
                },
                {
                    content: '  return Math.random() * 100',
                    isError: false
                },
                {
                    content: '  return math.random()',
                    isError: true
                },
                {
                    content: '  return getRandom()',
                    isError: true
                }
            ],
            '}',
            '',
            [
                {
                    content: 'const confirm = prompt("do u really want to generate random number? (y/n)") === "y"',
                    isError: false
                },
                {
                    content: 'const confirm prompt("do u really want to generate random number? (y/n)") === "y"',
                    isError: true
                }
            ],
            '',
            'if (confirm) {',
            [
                {
                    content: '  alert(getRandom())',
                    isError: false
                },
                {
                    content: '  alert(getRandom( )',
                    isError: true
                }
            ],
            '} else {',
            [
                {
                    content: '  alert("ok")',
                    isError: false
                },
                {
                    content: '  alert("ok)',
                    isError: true
                }
            ],
            '}'
        ]
    }
]```
civic scroll
quartz kindle
#

you're defining everything manually? thats a lot of work

neon leaf
#

basically if the line is a string I just add it no care

civic scroll
#

you will need a fuzzer

#

and a javascript parser

#

you get your fuzzer to generate random code, and a parser to parse against it

neon leaf
earnest phoenix
#

couldn’t be me

neon leaf
#

I juast gotta proofread them

earnest phoenix
#

let me help

#

i’m smart

#

asf

civic scroll
#

you can try generate a valid abstract syntax tree from a set of valid statements

#

and then randomly screw something up

#

and then convert that into code

earnest phoenix
civic scroll
#

using human labour is not gonna cut it

marsh lark
#

you can always use ai, it wont be 100% right but it'll work

earnest phoenix
civic scroll
#

tbh

#

it's not gonna be reliable

civic scroll
earnest phoenix
#

i know

civic scroll
#

the goal is to dynamically generate a problem so that any problem is unique

neon leaf
#

I dont need that many snippets because lines of them are random

earnest phoenix
#

steal a 10000 line code from the internet

#

get 20 lines

#

break one of those lines

#

and boom

civic scroll
#

using finite set of hand-crafted problems is gonna run out soon

#

and don't forget about repetition - as well, same code, same steps

#

symbol names and values can be altered, but logical structure may stay the same - and that's where i'm looking at

earnest phoenix
#

well i think there’s thousands of possibilities with what i said

#

so i don’t think that’s an issue

neon leaf
#

well Ill worry about the minigame itself for now anyway

civic scroll
#

and another reason that i tell you to have a parser against it is to get where it's incorrect at

#

so you don't have to painstakingly store the result

#

(only applies to automatically-generated code)

earnest phoenix
#

what

wheat mesa
#

wdym what

earnest phoenix
neon leaf
#

I love it

tulip ledge
#

Cuz now i press button and it just goes next

#

With no feedback

#

Is bad Ux

neon leaf
#

you get to know in the end

tulip ledge
#

Still bad uw

#

Ux*

#

People don’t get feedback on their buttonpress

#

At least add a correct at the top

#

Like correct: 1/3 or something

#

That changes when pressing a button

lyric mountain
#

most ast generators have a way to reverse-generate a valid input

#

used to do that to test my BNF expressions

#

ofc that's still complicated for battle

earnest phoenix
#

it is the weekend

#

i will try java tomorrow and become the master 👿

lyric mountain
#

I give you 3

earnest phoenix
lyric mountain
#

days before you give up

wheat mesa
#

Hours*

lyric mountain
#

I mean, hours and days are interchangeable in this context KEKW

wheat mesa
#

True

#

“Wtf is an int?”

#

inb4 “types are stupid why would anyone want to use this”

earnest phoenix
#

😐

earnest phoenix
lyric mountain
#

lets see then

earnest phoenix
#

i’m kinda busy

#

but i will make time this weekend to code java

hidden gorge
wheat mesa
#

Because you have multiple shards

#

That callback is called upon the creation of each shard

#

Also you’re getting your user count before the shard is ready which means it will always be 0

hidden gorge
#

ok thx

#

but still dont get why its looping ive tried to fix it

wheat mesa
#

Because there are multiple shards

#

You have logs for each shard being created

#

Therefore each time one is created, you get a console log

#

You’re doing this entirely wrong btw

hidden gorge
#

i am?

wheat mesa
#

Yes

#

You can’t just throw a shardmanager into your existing code and have it work

#

This is technically an infinite recursion since your index.js contains the shard manager but the manager then runs another instance of the index.js file over and over and over

#

You should look at the docs more before doing this

earnest phoenix
hidden gorge
#

i got it kinda working now

earnest phoenix
#

shards are dumb ngl

#

don’t get why discord requires them

hidden gorge
#

yep it works

wheat mesa
#

Because one connection handling a lot of data is problematic

earnest phoenix
#

why?

wheat mesa
#

Only so much you can feasibly send via one gateway connection

earnest phoenix
#

how

#

why can’t it be optional?

wheat mesa
#

Not to mention multiple connections probably allows discord to multithread their servers a lot more

earnest phoenix
#

it’s my issue if i don’t wanna do it

#

sounds like you complicating bot development

wheat mesa
#

It’s a discord issue as well because then you’re bottlenecking their hardware

hidden gorge
#

fixed the looping

earnest phoenix
#

what’s the point of allat

earnest phoenix
# earnest phoenix why?

Everything has a limit at how much it can handle something before it breaks down and halts

Let's say I give you much more stuff than you can actually carry, it's going to slow you down unless you become stronger, and the more stuff I give you to carry, the slower you'll become

earnest phoenix
#

so it doesn’t overflow !

lyric mountain
#

more like 2 semitrucks instead of 1 so your tires dont explode

earnest phoenix
#

makes sense i guess

wheat mesa
#

Lots of data through one connection isn’t ideal

earnest phoenix
#

when is discord going to add new features to the platform

#

kinda been boring recently

wheat mesa
#

And it allows discord to optimize backend stuff more heavily

lyric mountain
#

they added paid icon change to nitro recently

#

new features™️

earnest phoenix
#

i wanna use a new feature to make something innovative

earnest phoenix
lyric mountain
#

u dont need new features for that, innovation comes from implementation, not resources

earnest phoenix
#

you do

#

Almost every new feature Discord makes is Nitro-only, they aren't adding much to the API lately, for example, more component support in modals that they said they'll do in months but it still hasn't happened

#

for example before people used to make forms by just asking questions through messages and waiting for you to reply

#

and now there’s modals

#

so that’s basically useless

lyric mountain
#

still

#

I made a tcg and dont think discord will add a feature to make it obsolete too soon

lyric mountain
#

trading card game

#

akin to yugioh

sage bobcat
#

One message removed from a suspended account.

marsh lark
#

inb4 they paywall new bot api features

earnest phoenix
#

can i see a video

wheat mesa
#

Isn’t it open source on his GitHub

earnest phoenix
#

too much

#

i wanna see video

#

why does he make pull requests on his own repo

wheat mesa
#

That’s the proper way to do it technically

#

I need to get more proficient with git

earnest phoenix
civic scroll
earnest phoenix
civic scroll
#

eg. new features, breaking changes, etc.

lyric mountain
#

also sometimes I work on diff branches to keep the production unaffected till I finish

earnest phoenix
#

hm

#

ok

earnest phoenix
#

i have music bot in 83 server but discord dosnt accept my req for whitlist the bot ??

deft wolf
#

How can we help you with this?

earnest phoenix
#

#

or keep it running but you won't be able to pass 100 guilds

earnest phoenix
#

if discord denied it you cannot

deft wolf
#

Music bots rarely reach large server numbers anyway. They exist until YouTube pays attention to them masnakappa

earnest phoenix
#

well

#

thats why you cant verify it

#

lol

#

lol hh

quartz kindle
#

did discord deny your bot?

#

what did they say was the reason?

earnest phoenix
#

"but discord dosnt accept my req for whitlist the bot"

#

i assume that means they denied his verification request

#

some one have discord server

#

your stealing youtube's ad revenue

#

and they do not like that

#

so discord doesn't verify the bots

#

i want o talk to staff team or same ting

#

they won't verify the bot

earnest phoenix
#

there is no point in that

quartz kindle
#

what is the reason that discord gave you?

earnest phoenix
#

or change the bot to join to create bot ?

quartz kindle
#

why did they deny it?

earnest phoenix
#

but you may be able to 🤷 check if you can reapply for verification

#

but 83 server is hard

quartz kindle
#

if you dont say why it was denied, then we cant help

earnest phoenix
#

my 2 bot jus in 25 server

earnest phoenix
#

i steal need 50 server

#

but i assume that because you play the music through YouTube that's the reason

#

as they don't verify those bots

#

some her have discord server link

#

i need it

deft wolf
#

For what?

earnest phoenix
# deft wolf For what?

i want to asq if i change my bot from music to join to create bot if the gane i verifay my bot

#

ask support

#

link

quartz kindle
#

for some denials its possible, for others its not

#

if discord said something like "we will not be verifying this bot", then you cant, you have to create a new one

earnest phoenix
earnest phoenix
#

of the denial

lyric mountain
#

it's VERY hard to have a youtube music bot verified

#

because ur breaking their ToS, and discord doesn't want to get involved

#

you'll need to use another service that allows third-party music sharing

earnest phoenix
#

i wonder how they did it

craggy pine
#

Grandfather ruling. It was once allowed, and they may have been verified early on. But at any point youtube can issue a cease and desist on that bot like how Rythm and Groovy did

#

Well I wouldn’t say allowed but discord didn’t care as much as they do now

earnest phoenix
earnest phoenix
#

reverify*

#

gotta make a new application

craggy pine
#

Well making a new application with the idea of yt music will result in the same thing happening so 🤷‍♀️

earnest phoenix
#

nah

#

he wanted to make the bot something else

craggy pine
#

Ah gotcha

#

Thought that was ur ss

earnest phoenix
#

but wanted to keep this bot because his other one isn’t in 75 guilds to verify it

#

guys should i add a referral system to my economy bot

rustic nova
#

to be fair

#

the fact that the username the support agent is stating

#

and the username from the user here

earnest phoenix
#

what

marsh lark
#

I mean it's common to have your bot be on an alt

#

In case your main gets banned for whatever reason because discord

solemn latch
marsh lark
#

I'm pretty sure you can't transfer ownership if the owner is banned

#

But I guess you can still do some things being a team admin

#

But it's definitely better than nothing

tulip ledge
knotty quartz
#

Any good databases for JS V14?? I want to move away from the file

deft wolf
#

All of them are probably ok, it depends on what you know or what you can afford

#

If, for example, you worked on .json files as a database, mongodb will be the closest to it

slender wagon
#

has anyone here worked with aws?

sharp geyser
#

No guarantee I can fix your issue

slender wagon
#

Well not an issue exactly

#

I am moduling the current configuration of my teams terraform

#

vpc ec2 esc cloudwatch

#

And a bunch of stuff

digital swan
knotty quartz
#

The file based one

digital swan
#

Ohhh well if you wanna stay relational databases I believe the best choices are either MySQL or Postgres

surreal sage
#

Is it possible for me to replace import Nav from "../components/nav"; with import Nav from "@component/nav";?

#

got it

#
{    "compilerOptions": {
        "baseUrl": "./",
        "paths": {
            "@components/*": ["src/components/*"]
        }
    }}```
wheat mesa
#

@lyric mountain you've done android mobile dev, right? If so, what framework/language/etc do you recommend using for it? Also, is it plausible to develop a mobile app of decent functionality in a few months for someone that has no experience with mobile dev?

lyric mountain
#

The framework I'm currently using is flutter

#

React native is an option too, but I think it's inferior to flutter, idk, feels out of place when the latter was basically born for it

#

Shouldn't be too hard to get the handle of it, it's a typed language so you'll get it easily

#

Also has native intellij support

wheat mesa
#

Is flutter it’s own language or is it incorporated in combination with something else?

lyric mountain
#

But like, not like js and react's case

#

The language exists almost exclusively for flutter

#

Hard to think about any other usecase for it

#

A thing I liked is that the language heavily frowns upon bad design

#

Somewhat remembers me of rust, it fights you so you don't write bad code

wheat mesa
#

I see

#

I'm thinking of developing a mobile app for my work

lyric mountain
#

I hate how ur forced to use comma everywhere tho

wheat mesa
#

This seems like a good choice because it supports ios AND android so I wouldn't have to write different implementations from scratch if it's decided to be a success and we need ios

lyric mountain
earnest phoenix
#

whats your app

#

can i download it

lyric mountain
wheat mesa
#

I work at a boba shop so it would basically just be like a mobile ordering platform, they have a website but it's not great UX-wise, and I want to improve on it while learning a new skill

earnest phoenix
#

oh wow

#

are they paying you to do that

wheat mesa
#

I haven't talked to them about it

earnest phoenix
#

oh

#

lol

wheat mesa
#

I would likely get a bonus after finishing it

earnest phoenix
#

are you planning on just presenting it to them once it's finished

#

add rewards like mcdonalds app

wheat mesa
#

Definitely not how much I would get paid if I did it as a freelance gig but I'm not in it for the pay

#

I want to make a practical app for resume experience

#

That would be big

lyric mountain
#

Frankly, even without a bonus it's already a good opportunity

wheat mesa
#

Plus I really like my bosses and our team is close to them, they treat us very well

lyric mountain
#

It's hard to practice design if u don't have something concrete to work on

wheat mesa
#

My gf's dad redesigned their menu for free, they gave him a few hundred bucks

lyric mountain
#

Now u have the perfect target for the project

wheat mesa
#

My gf designed ads for their store, she got a couple hundred bucks

earnest phoenix
#

how much will your bonus be

wheat mesa
#

I want to design an app

wheat mesa
#

even if it's nothing I don't care

earnest phoenix
wheat mesa
#

It's fantastic experience

#

Yeah

earnest phoenix
#

thats cool

wheat mesa
#

It'll be like the mcdonalds app or chick fila or any other standard ordering app

#

But usually small companies don't have the funds to pay for someone to design those things

#

So if I can do it for them for free then I would be very happy

#

They work super hard and pay us very well for what we do, I want to do something for them now c:

earnest phoenix
wheat mesa
#

lowkey was thinking about this but taking 10% of the tips that flow through the app

#

but then I remembered I'm not doing this for profit

#

I will take whatever they offer me to do it, or I will take nothing. Either way I'm happy

earnest phoenix
#

your doing something for them

#

working for minimum wage

wheat mesa
#

yes but I mean as a gift

#

I'm not working minimum wage

earnest phoenix
#

how much are you making

wheat mesa
#

I work for $12/hour + tips

earnest phoenix
#

12 sounds like minimum wage

#

ngl

wheat mesa
#

After taxes I'm making around $16/hour

#

Which for what I do is VERY good

lyric mountain
#

You can ask one thing that'd benefit u more than money

#

Keep the authorship of the app

earnest phoenix
wheat mesa
#

I make the app for them, but it's still my intellectual property

wheat mesa
#

that's what I meant

lyric mountain
#

Let them use it to the maximum, make it one of the best for what it does

#

And you'll get a strong portfolio piece

wheat mesa
#

Yeah

#

That's what I want to do

#

Plus I need a good frontend project to show off on my portfolio

#

Everything I've done so far has all been backend

#

Nothing to really show for what I've made

earnest phoenix
#

i just realized

wheat mesa
#

An app is the ultimate showcase of functionality AND design

lyric mountain
#

Yep

earnest phoenix
#

isn't this what ubereats and doordash is for

wheat mesa
#

My girlfriend is awesome at designing things, I can get her help for that end

wheat mesa
#

Having a native app for your restaurant is just better because it's more custom to you

earnest phoenix
lyric mountain
#

Btw waffle, a thing I suggest

#

You'll likely want to use colors directly, don't

lyric mountain
#

Use Theme instead to generate a cohesive pallete

wheat mesa
#

Yeah

#

Mantine taught me good on that one c:

lyric mountain
#

Lul

earnest phoenix
lyric mountain
#

Direct integration to database perhaps

wheat mesa
#

It will be centralized

earnest phoenix
#

like nfts?

wheat mesa
#

That's the opposite of blockchain

#

You're thinking of decentralized

#

Our restaurant alone has 4 different platforms that orders get sent through

#

Menufy, fantaun, uber eats, and grubhub

#

It gets difficult to change all of them all the time

earnest phoenix
#

so are you planning to abandon them all

wheat mesa
#

No

#

But the app will serve as a way to get up to date and accurate information on them

earnest phoenix
#

or use the app to change the menu in all of them using some sort of api

wheat mesa
#

People will still use the other services all the time I'm sure

#

But the app is just another option

earnest phoenix
#

hm

wheat mesa
#

The app will still send orders through Menufy so we don't have to deal with another service

lyric mountain
#

Those apps also have apis no?

earnest phoenix
#

sounds difficult good luck

wheat mesa
#

That way when an order goes through, the receipt gets printed at the front like the rest of the menufy orders

lyric mountain
#

You can integrate with them too

wheat mesa
#

I'm sure they do

#

But that's a little ambitious for now

#

I'll look into that once I actually get a go-ahead from my bosses

earnest phoenix
#

btw why don't you guys use doordash

wheat mesa
#

Idk, they just don't

#

They probably have their reasons

wheat mesa
#

LETS GOOO

#

got the go-ahead from my boss

lyric mountain
#

nice

earnest phoenix
wheat mesa
#

Which means now I’ve gotta figure out flutter 💀

earnest phoenix
#

did your boss say he's paying you

wheat mesa
#

No

#

They don’t have a budget for it

#

But it’s possible I might get something later

earnest phoenix
#

bud is doing free labor

wheat mesa
#

Or perhaps they’ll let me work on it at work so I get paid my usual wage to clock in and work on it

#

That’s the point yeah

#

“If this guy did all of this as volunteer work and did a good job, imagine how good he is when he gets paid!” - someone looking at the resume

#

Invaluable

#

I just hope my boss doesn’t have unreasonable expectations for the timeframe

#

It’s probably going to take a few months

#

@lyric mountain would you say that flutter is easy to develop with in a timely manner?

quartz kindle
wheat mesa
#

Yeah I know but the point still stands

lyric mountain
quartz kindle
#

in the real world, it will be "wow this guy did all of this without being paid, so maybe i can get him to do it for me as well either free or very cheap"

wheat mesa
#

I have 0 “professional” experience, this will get me some

wheat mesa
#

@lyric mountain u recommend intellij or vsc for this?

#

I'm gonna assume intellij is a developer's best friend for a mobile app

tulip ledge
wheat mesa
#

or well, android studio?

lyric mountain
#

definitelly no

wheat mesa
#

not android studio, really?

#

isn't it just intellij but meant for mobile?

lyric mountain
#

android studio is just a worse fork of intellij

#

intellij has all features studio has

wheat mesa
#

My god this is so annoying to do

#

Trying to get an emulator running rn

#

Have to go into my bios tho

lyric mountain
#

android emulator?

#

press shift twice and search "device"

wheat mesa
#

Yeah I did it’s just a problem with Intel haxm

#

Had to do like a billion things and 5 or 6 restarts

#

Furthermore windows decided to update in the middle of it so I had to wait longer

#

Probably doesn’t help that I got this laptop like 6 years ago so it’s a little old

#

So slow

#

Pressed the run button probably about 3 minutes ago and I’m waiting still

#

Now I got it to run, but I don’t see anything..?

#

Nvm got it

wheat mesa
#

Lowkey loving flutter so much rn

#

So easy

lyric mountain
#

yep

wheat mesa
#

No more new thank god

lyric mountain
#

my only issue with it is using column/row

wheat mesa
#

Material UI makes it feel like a google app but I’m sure you can customize widgets more

lyric mountain
#

cuz they go haywire if u dont put them into a sized container

earnest phoenix
#

can u make mobile apps with js

wheat mesa
#

Yeah

#

React native

#

It’s what discord is made with

earnest phoenix
marsh lark
#

no

earnest phoenix
marsh lark
#

React Native doesn't use HTML and CSS by default. Instead, React Native uses JavaScript to create user interface components. However, you can use third-party libraries to render HTML into native views. For example, you can use react-native-render-html or react-native-htmlview.
React Native uses Flexbox for layout. React Native's style properties, names, and values usually match CSS. However, React Native uses Flexbox exclusively, so there is no implementation of CSS Grid.
React Native uses JSX, which lets you write markup language inside code. JSX looks like HTML, but instead of web elements like <div> or <span>, you use React components. For example, <Text> is a Core Component that displays text.

earnest phoenix
#

w

#

i hate html and css

#

maybe i'll try making a mobile app

#

what should i make

lyric mountain
#

you'll still use html/css-like structures

#

but not exactly those

#

react-native/flutter are very html-like

#

and both also use css-like styles

earnest phoenix
#

so it's just html in javascript

#

bruh

#

l react native

wheat mesa
#

Also html/css is just good because it’s very structured

earnest phoenix
#

html is such a hard programming language

wheat mesa
#

Try using Java swing for designing something and you’ll instantly realize why html is the way it is

earnest phoenix
#

they should nerf it

wheat mesa
#

(It’s not a programming language)

lyric mountain
#

speaking of which, it's saturday already

#

2 days into weekend

#

did u progress in java at all?

wheat mesa
#

Lowkey I really like dart, this is quite nice

#

Hard to believe this is my 9th language lol

#

(Not proficient in any of them except Java though)

earnest phoenix
earnest phoenix
wheat mesa
#

It’s a markup language

#

“Hyper Text Markup Language”

earnest phoenix
#

is javascript or html harder

wheat mesa
#

Not comparable

earnest phoenix
#

yes

#

it is

wheat mesa
#

They have different functions fundamentally

#

HTML is meant to structure data, Javascript is a multi-paradigm programming language

earnest phoenix
knotty quartz
earnest phoenix
#

sounds fun

quartz kindle
#

learning html is almost like learning json lol, just has a bit more features

earnest phoenix
#

that is NOT ❌ true

#

how do you learn json

#

isn't it pretty self explanatory

quartz kindle
#

so is html lol

lyric mountain
#

literally

earnest phoenix
#

IT IS NOT ❌

#

why is it so hard to center something?

quartz kindle
#

centering is not html, its css

earnest phoenix
#

bruh same thing

quartz kindle
#

css is not html lol

earnest phoenix
#

they're basically the same 😐

#

they go hand in hand

surreal sage
#

Is it possible to run server side code once and include the result in a component with nextjs?

spark flint
#

getServerSideProps

quartz kindle
#

they work together but they are different things lol

spark flint
#

that only runs once per page load

earnest phoenix
#

bud

#

who reracted with

#

☝️

surreal sage
spark flint
#

i think so

surreal sage
#

being screamed at
(same if top level import)

spark flint
#

where are you deploying your code

#

or is this locally

surreal sage
#

locally, node

#

windows rn

spark flint
#

from google

#

it looks like any form of middleware that sets the edge runtime experiment will break it

#

since edge serverless deployments do not generally have a filesystem

surreal sage
#
export const config = {
  runtime: 'nodejs', // or "edge"
}
spark flint
#

try testing the same code but as an API endpoint

#

see if that works

#

this might hhelp

surreal sage
#

time to ctrl z

#

Is next.config.cjs an option?

#

@spark flint

spark flint
surreal sage
#

lets look in the source code!

#

no

#

mjs or js

#

how can I do that

#

convert it to mjs

spark flint
#

not sure