#development

1 messages · Page 274 of 1

sharp geyser
#

it'd take 2h

compact condor
proven lantern
#

does discord tell you if a command was inputted from the mobile version of the app vs desktop vs web?

sharp geyser
#

I dont think so?

#

maybe from user info

#

cause iirc you used to be able to get their platform via user info

proven lantern
#

they could change each message/command

sharp geyser
#

wym

proven lantern
#

like change their platform

#

one message from the desktop app, next from the mobile app

sharp geyser
#

Okay

#

Whats the issue

#

If you are able to still get their platform from userinfo, then thats likely how you can tell

#

otherwise I dont think they give that info

proven lantern
#

i want to know if they sent a message from the mobile app because discord blocks premium buttons on mobile

sharp geyser
#

try checking what I said

delicate zephyr
#

assuming thats using discord app store

#

or are they links

proven lantern
delicate zephyr
#

idk what you mean by premium buttons

proven lantern
delicate zephyr
#

ah yea those

#

idk if premium is even in mobile rn

#

iirc it's still just easier to direct people offsite

proven lantern
delicate zephyr
#

yea because the discord mobile clight doesnt have the experiment / feature iirc

sharp geyser
#

Doesnt look like you can get their platform

proven lantern
#

i want my code to check if it's mobile and if it is just give a link instead of the buttons

delicate zephyr
#

You cant

proven lantern
sharp geyser
#

I remember you used to be able to

#

but I think they removed it

delicate zephyr
#

bit like how you still cant provide premium through discord if you're in the EU either :^)

#

soooooooo

sharp geyser
#

W

sharp geyser
#

It's....literally right there

#

like what the fuck is it on about

prime cliff
#

Maybe you need to reverse the order with get being first and set second or some kind of self reference issue when initializing?

sharp geyser
#

in the docs its set and get

#

just realized

#

get wont be available at that stage

#

sooo

prime cliff
#

Yea..

sharp geyser
#

I am noticing a problem though

#

The state isn't updated except for in localStorage

#

localStorage it gets set to false correctly

#

but when grabbing it, its still the default value

prime cliff
#

In C# custom get/sets use an extra field for self reference private string _fieldName that way it can be accessed with initially

sharp geyser
#

Yea idk how zustand does it

#

but it is wonky

#

Make this make sense Waaaaaah

queen needle
sharp geyser
#

jesus

#

You got farther than I did

#

but you also have more knowledge than me

queen needle
#

i only ever mess with frontend and i still know so little lmao

#

but i like my key

#

that's about it

#

straight divs

#

and css

sharp geyser
#

css is the bane of my existence

prime cliff
#

The secret message has been revealed
GO TOUCH GRASS

pearl trail
hybrid atlas
#

need to know how to make commands vote only

sharp geyser
#

I also didn’t think I’d spark some kind of competition mmLol

#

Ur the second person to attempt my idea

pearl trail
#

yeah just trying to challenge myself

#

the code is actually quite simple

sharp geyser
#

Oh?

pearl trail
#

well it uses lib so

radiant kraken
#

this is fine

radiant kraken
sharp geyser
#

Thank you for showing me this

#

In the future I’ll spruce up my current implementation

radiant kraken
#

sheeesh never knew it was that easy

sharp geyser
#

I mean

#

To do it the way I really want, Sayuri is right

#

It would be a lot more complicated

sharp geyser
#

But baby steps yk

pearl trail
sharp geyser
#

What takiyo has showed me is a big step in the right direction

pearl trail
#

how's the progress

sharp geyser
#

90% of the way done with the website

radiant kraken
pearl trail
#

waoo

radiant kraken
#

you're goat with trig

sharp geyser
#

I’ll push my code to GitHub after her birthday

#

So everyone can see it’s horrible

radiant kraken
#

doubt

sharp geyser
#

No like

#

It’s bad

radiant kraken
#

lies

sharp geyser
#

💀

radiant kraken
#

she would see at the code and still consider you extremely smart

sharp geyser
#

I have grown to hate nextjs

#

In the future I will definitely never use it

pearl trail
#

lmfao

#

i mean nextjs is too overkill if you dont use ssr

sharp geyser
#

Much rather use react + react router

pearl trail
#

yeah

#

you use the api in next?

sharp geyser
#

Just rn it’s all client components

#

But sometimes they are rendered on the sever

radiant kraken
sharp geyser
#

So hydration issues occur

pearl trail
#

ah

sharp geyser
#

And solving those was a bitch

#

Cause nextjs errors suck

small epoch
sharp geyser
#

From s3

radiant kraken
#

i see i see

sharp geyser
#

In the future ima have a gallery that pulls images from cloudflare r2

pearl trail
#

oh, you keep it turned on even after her birthday?

sharp geyser
#

Im also going to implement next auth

radiant kraken
#

yeah i'm sure it's not just a one time thing

sharp geyser
#

It’s simply a gift that keeps on giving

radiant kraken
#

the website will be used throughout their relationship

pearl trail
#

whoaaa i seee, interesting idea

sharp geyser
#

Every year I’ll add more features

radiant kraken
sharp geyser
#

Next year ima make a game

radiant kraken
#

ooooo poggies

sharp geyser
#

Hopefully I see it

pearl trail
#

now i gotta find the girl

sharp geyser
#

🤞

#

She’s my little polish girlfriend

pearl trail
#

oh sorry 😭 i mean like... for me making ideas like you, the step 1 is find girl

sharp geyser
#

Lmao

sharp geyser
#

I came up with this idea so fucking late

#

I’m shocked I’ve gotten this far in 2 days

radiant kraken
#

good job

sharp geyser
#

Granted it’s not the hardest thing

#

But I hate web dev and have never had the motivation to work on something for hours at a time

sharp geyser
#

Not since I started programming at least

radiant kraken
#

but it's secret 🤫

sharp geyser
#

I wanted to incorporate stats for messages on discord

#

But that’s impossible without using self bot

hybrid atlas
#

need to know how to make commands vote only

radiant kraken
#

cuz u always steal my ideas

sharp geyser
#

Who

pearl trail
#

😭 😭

radiant kraken
#

takiyo

sharp geyser
#

I mean

#

Don’t share em if you don’t want them stolen

radiant kraken
sharp geyser
#

What’s the idea btw

pearl trail
#

lmao

radiant kraken
#

YOU ARE GONNA STEAL IT

sharp geyser
#

I want bother stealing it

#

Wont*

#

Null

#

My plate is full enough

#

😭

radiant kraken
#

u gonna leak it to takiyo

sharp geyser
#

I would never

#

My morale code is to keep secrets no matter what

radiant kraken
#

takiyo promise me u wont steal my ideas ever again

#

and i wont for yours

sharp geyser
#

What ideas has takiyo even stolen

#

Lmao

radiant kraken
#

i dont want for him to remember

sharp geyser
radiant kraken
#

😭

sharp geyser
#

But if they haven’t done anything with them

#

Then it’s not really stolen

radiant kraken
#

but takiyo is always like 🤫

#

😭

sharp geyser
#

lol

#

So what’s the idea

radiant kraken
#

dm

sharp geyser
#

Ok

radiant kraken
#

sobbing

small tangle
#

Macro code looks so cursed

radiant kraken
#

OH MY GOD FINALLY IT WORKS

civic scroll
#

i have the right to throw 503s when you ask me a computationally intensive task at 3am in the morning

compact condor
#

damn chad hashflushed

#

@radiant kraken I also updated the repo, permission based commands and autocompletion are now possible with rustcord :^)

compact condor
radiant kraken
#

i am currently still working on refactoring many things

#

i've created several helper macros to help get rid of repetitive code! like this:

compact condor
#

ic, gonna have to take a look on your fork 😅

radiant kraken
compact condor
#

do that 👍

radiant kraken
compact condor
radiant kraken
#

hahahahaha

compact condor
radiant kraken
#

maybe after my refactors

compact condor
#

Okay, huge thanks 🙏

radiant kraken
#

@compact condor i can make the pull request now if you want

#

so you can work on the optimization as soon as possible

compact condor
radiant kraken
#

oh alrighty

#

i've seen that your project still use setup.py, why not use pyproject.toml?

#

setup.py is no longer supported by Python 3.11

compact condor
compact condor
radiant kraken
compact condor
#

Huge, appreciate it 🙂‍↕️

#

I'll ping you when I have time to program again 🤝

radiant kraken
#

alright!

sharp geyser
civic scroll
sharp geyser
#

Are you a teapot

quartz kindle
#

yes

compact condor
#

@radiant kraken I would have some spare time now

radiant kraken
#

so far i think i'm done with my refactors

#

but i haven't tested it tho

compact condor
#

np, gonna do that then 🤝

#

just give me some minutes to clone your repo and trying to understand the changes you made 😅

radiant kraken
#

do u mind if i create the pull request now?

compact condor
#

go ahead prettythumbsup

sharp geyser
#

@pearl trail you awake kind sir

#

I have a question

pearl trail
#

ay ay captain

sharp geyser
#

You know how csgo case openings look right?

pearl trail
#

yeah

sharp geyser
#

I am trying to create a similar effect

#

Any idea on where to start?

#

The animation should be rather straightforward

#

I just am not sure how I would keep track of what it lands on, or how to tell its position or whatever

pearl trail
sharp geyser
#

YES

compact condor
#

@radiant kraken hmmm... wat

Traceback (most recent call last):
  File "/home/runner/workspace/examples/autocomplete_permissions_bot.py", line 9, in <module>
    from rustcord import Client, Intents
  File "/home/runner/workspace/rustcord/__init__.py", line 8, in <module>
    from .client import Client, Intents
  File "/home/runner/workspace/rustcord/client.py", line 17, in <module>
    from .models import (
  File "/home/runner/workspace/rustcord/models.py", line 123, in <module>
    class DiscordModel:
ValueError: '_rust_type' in __slots__ conflicts with class variable```
sharp geyser
pearl trail
compact condor
sharp geyser
#

I have an idea on how it'd work but it doesn't seem like im correct

pearl trail
sharp geyser
#

My idea is just an array of randomized elements, that you cycle through changing the first position to the last until x amount of time passes and you land on some random one

#

but that doesn't sound like it'd translate well visually

radiant kraken
pearl trail
sharp geyser
radiant kraken
#

yeah

#

it's very simple

#

just use css transitions

sharp geyser
#

but

radiant kraken
#

then let the animation flow

sharp geyser
#

how do you tell what you land on

#

or do you choose prior

#

and animate to it

#

I assume you already know what you land on, you just have to make it visually look like its choosing

compact condor
radiant kraken
#

just run git pull lol

pearl trail
radiant kraken
#

yeah that works too

pearl trail
pearl trail
sharp geyser
# pearl trail

See programatically I just can't imagine how this works

#

I see the margin changing

pearl trail
#

let me make you the example real quick, 10 mins

sharp geyser
#

but it does not really explain how it can grab what it lands on.

#

im so dumb I swear

radiant kraken
#

nuh uh!

sharp geyser
#

web dev is beyond me

#

and this is supposed to be easy

#

:c

compact condor
#
Traceback (most recent call last):
  File "/home/runner/workspace/examples/autocomplete_permissions_bot.py", line 55, in <module>
    @client.command(
     ^^^^^^^^^^^^^^^
  File "/home/runner/workspace/rustcord/client.py", line 487, in decorator
    self._autocomplete_handlers = {}
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Client' object has no attribute '_autocomplete_handlers'```
sharp geyser
#

looks like null didn't add a prop

radiant kraken
#

i just forgot to add _autocomplete_handlers to __slots__

sharp geyser
compact condor
radiant kraken
#

but in return, you save a lot of memory on your object

compact condor
#

Gonna keep this in mind thx Notizen

radiant kraken
compact condor
#

But it works seemlessly now tyvm, gonna start to optimise everything now, again huge thanks I hope I learn from your refactorisation bonk

radiant kraken
#

please read them, thank you!

pearl trail
sharp geyser
pearl trail
#

wait

compact condor
pearl trail
radiant kraken
#

feel free to ask questions if you have any!

pearl trail
compact condor
pearl trail
#

tho the cons with margin is, either you need static width, or do math to calculate the width when you want to fit to the screen on the parent

sharp geyser
#

Will take a look in a second

#

Looks simple

pearl trail
#

good luck 4437prayge

sharp geyser
#

Thank you

radiant kraken
#

just making sure

sharp geyser
#

Mainly the last part

#

I never seen array assignment like this

pearl trail
#

oh, that's just shuffling array i got from random stackoverflow kekw, you can use any method for shuffling

sharp geyser
#

Well yea I know

#

I was just wondering how it actually works 😭

#

I've never seen array assignment like that

#

didn't know you could do that

pearl trail
#

oh, it's just swapping

#

a, b = b, a in py iirc

sharp geyser
compact condor
radiant kraken
#

poggies! nice!!

compact condor
pearl trail
sharp geyser
#

I get that

#

but how is it mutating the array

#

it doesn't do any assignment to the array variable

#

or the array passed in I should say

pearl trail
#

immutable types such as int, str, tuple can't be changed using a function, because it copies the whole data to new memory.
mutable types like array, list etc can be changed within a function, because it passes a reference to the original object

#

they're called call by value (1st) and call by reference (2nd)

radiant kraken
#

int and strings can be mutable if you use let mmLolBounce

sharp geyser
#

Right but I mean

#

how is [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]]; assignment of the array passed in

radiant kraken
#

there's just no way for them to be a reference

#

which means that they can't be modified remotely

pearl trail
sharp geyser
pearl trail
#

sorry if i dont get your question or what

sharp geyser
#

What I mean is

#

how is that mutating the passed in array

#

normally you'd do something like array = newArray or array[index] = newValue

#

but I dont really see much of that here

#

though looking at it again

#

It makes sense

#

It's saying at this index and this index, change it to the value at this index and this index

pearl trail
#

yeah, thats just the shorthand of
temp = array[currentVal]
array[currentVal] = array[random]
array[random] = temp

sharp geyser
#

I guess it is just a way to do 2 operations in 1 go

pearl trail
#

right

sharp geyser
#

instead of

array[currentIndex] = array[randomIndex]
array[randomIndex] = array[currentIndex]
```?
#

That's neat though

#

I never seen that shorthand

pearl trail
#

eh, no that wont work

sharp geyser
#

Oh wait no

#

that would just swap them back

#

💀

pearl trail
#

sorry,

temp = array[currentIndex]
array[currentIndex] = array[randomIndex]
array[randomIndex] = temp
sharp geyser
#

Right

#

want to save the previous one's value

#

so it isn't just swapping it back

pearl trail
#

ye

sharp geyser
#

My fault

sharp geyser
#

I basically copied your code 1:1 with the exception of making it work for react by using useEffect

#

and the button translates with it

pearl trail
sharp geyser
#

Weird

#

I don't see why

pearl trail
#

how do you translate it to react? (share the elements only)

sharp geyser
#

I mean its basically what you have just in a useEffect hook

#
useEffect(() => {
        const scroller = document.getElementById("scroller")!;
        const roll = document.getElementById("roll")!;
        const info = document.getElementById("info")!;
        let items: Array<string> = [];
        const getItems = () => {
            items = [...randomWords];
            shuffle(items)
            setItems(items)
        }

        getItems();

        roll.onclick = () => {
            getItems();
            scroller.style.transition = "none";
            scroller.style.margin = '0px';
            setTimeout(() => {
                scroller.style.transition = '2s cubic-bezier(0,0.11,0.33,1)';
                scroller.style.marginLeft = '-7300px';
            }, 100);
            info.textContent = `You will land on ${items[items.length - 4]}`
        }

        function setItems(items: Array<string>) {
            scroller.innerHTML = "";

            for (const text of items) {
                const div = document.createElement("div");
                div.className = "item";
                div.style.width = "200px";
                div.style.height = "150px";
                div.style.flexShrink = "0";
                div.style.backgroundColor = "white";

                div.textContent = text;

                scroller.appendChild(div);
            }

            scroller.style.width = `${items.length * 200}px`;
        }

        function shuffle(array: Array<string>) {
            let currentIndex = array.length;
            while (currentIndex != 0) {
                let randomIndex = Math.floor(Math.random() * currentIndex);
                currentIndex--;

                [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
            }
        }

    }, []);
#
        <>
            <div className={'overflow-hidden flex flex-col items-center justify-center w-full h-full'}>
                <div className={'flex gap-2'} id="scroller"></div>
                <div className={'flex flex-row gap-2'}>
                    <Button id={"roll"}>Roll</Button>
                    <span id={'info'}></span>
                </div>
            </div>
        </>
#

And literally this is it

#

Button also shows so far away its off screen

#

So idk what I did wrong

pearl trail
#

interesting

prime cliff
#

Welcome to css nightmares 🙂 where flex boxes and wrapping don't make sense unless you use specific options 🙂

sharp geyser
#

I hate my life rn

#

and now I found another issue with my state

#

oh my god I fixed it

#

🙏

#

state issue I mean

#

still have not fixed that wonky ass css

#

I mean

#

I kind of kind it fixed

lament rock
#

Make your website in Unity2D and use the wasm it builds to run your website instead

sharp geyser
#

I have 2 days left

#

and this is the last thing ima do

#

No fucking thank you

#

💀

lament rock
#

I might actually make a full website in Unity3D

sharp geyser
#

🙏

#

due to your help, I am not one big step closer to what I want to do

lament rock
#

T pose spinning character behind some UI

sharp geyser
#

Thank you so much

pearl trail
sharp geyser
#

<3

sharp geyser
#

If the list of whats available to be selected is small then the effect in its current state doesn't work

#

do I modify the margin left?

#

I assume so because it decides how far the scrolling is

#

but then that begs the question, how far do I control it, and it also seems less like it's looping

pearl trail
# sharp geyser do I modify the margin left?

yep right. you can play with the value by keep modifying it until you find it’s enough. you can set the transition to like 1s for faster development, then increase it later when you’re done.

#

there must be a way to calculate it but meh i just play around with the value

#

can’t do anything much because im already in 🛌 kekw

sharp geyser
#

I wont lie

#

I got so frustrated

#

I fed it to chatgpt

#

works now

#

💀

neon leaf
sharp geyser
#

Code actually makes sense too

delicate zephyr
neon leaf
#

it has the same ratelimit as the normal api

#

since its obv not a real index

eternal osprey
#

hey guys i finally found an auto watcher, namely tsc --watcher lmao.

Though, i removed my outputDir tsconfig variable as i just want the compiled js files in the same directory as the ts files.

Though this gives big problems like:

Cannot write file '.../Handlers/chartHandler.js' because it would overwrite input file.

#

any way to get that fixed?

#

i just want the ts and js to be exactly in the same folder as they are compiled in.

frosty gale
#

how dare you not support cryptographically broken and insecure SSL connections

pearl trail
dire agate
pearl trail
#

oh wait sorry 😭

dire agate
pearl trail
#

noted™️

sharp geyser
#

Im the only Aaron allowed here

prime cliff
#

Will slim aaron pls stand up

sharp geyser
#

@pearl trail Strange situation

#

Everything below it conforms fine

#

but those 2 cards simply don't

pearl trail
#

the full width?

sharp geyser
#

I don't see anything different between the 2 and the others

sharp geyser
#

And all the divs below it have the same class properties on the parent's divs

#

as you can see

pearl trail
#

is the screen's width below md or above md? you got md:w-3/4 there

sharp geyser
#

but they function fine even when adjusting the screen's width

#

the screen is still below it at this point afaik

#

md >= 768px

pearl trail
#

if you want the width to be full when it's below md, and 3/4 above md, do w-full md:w-3/4

#

that should work

sharp geyser
#

Why did I think the default was to take full width

pearl trail
sharp geyser
#

God im stupid

pearl trail
#

nah, you're learning. everyone is stupid at the first time ^-^
-# hope this does not insult anyone

sharp geyser
prime cliff
#

Dumb dumb want gum gum

sharp geyser
#

Love that movie

sharp geyser
#

Im not quite sure I understand your problem

languid shale
#

yo how does one acquire the 'Bot Developer role'?

zinc fable
#

like this

#

(have an approved bot on-site)

languid shale
#

oh i already got the role mb tf

pearl trail
zinc fable
languid shale
#

oh alr ty 🙏

surreal sage
#

cant have shit in 25 💔

compact condor
#

I've finally optimized the code on rustcord, runs way smoother now :D

#

damnit

  File "/home/runner/workspace/main.py", line 1, in <module>
    from rustcord import Client, Intents
  File "/home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/rustcord/__init__.py", line 33, in <module>
    from .errors import DiscordError, GatewayError, HTTPError
  File "/home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/rustcord/errors.py", line 58
    )
    ^
SyntaxError: f-string expression part cannot include a backslash```
prime cliff
queen needle
#

Oh gee sounds like the opportunity of a lifetime!

#

@clear plinth I think I ping a mod

elfin helm
#

Do people still fall for this scam

#

I think u need to get a proper job

deft wolf
low marten
#

neat little dashboard i created for my bot:)

#

you guys think its missing anything or?

pearl trail
#

i thought it's topgg at first

deft wolf
#

Yea, same

low marten
#

it does appear we use a similar colour palette

pearl trail
#

imo, the ux for "save all changes" is kinda bad. it's far from content where user is clicking and seeing

#

-# im no experienced ux/ui designer, so that's just what i feel

compact condor
#

also having a dashboard button on the dashboard. doesn't seem right or at least make it the accent color

low marten
pearl trail
#

should i be worried for aria-label 🙁

solemn latch
#

making your site work with screen readers is important

pearl trail
#

😦 this is going to be tough. thank you for the information

sharp geyser
solemn latch
#

This is the type of stuff AI should be doing.

AI powered screen readers will be wild

sharp geyser
#

I think there is libraries that make achieving accessibility easier

solemn latch
#

Yeah, headless UI is a good one

#

Radix

sweet topaz
#

Why is top gg bot offline

hidden gorge
#

[2025-04-06T18:18:20.524Z] [INFO] Request to POST /v1 completed with status code 404 in 3ms

const express = require("express")
const router = express.Router()

router.post('/v1', upload.single("file"), async (req, res) => {
    if (!global.db) {
        return res.status(500).json({ error: "Database not initialized yet" });
    }

    if (!req.body.username || !req.file) {
        return res.status(400).json({ error: 'Username or file not provided' });
    }

    const headers = {
        authorization: req.headers["authorization"]
    };

    if (!headers.authorization) {
        return res.status(400).json({ error: "Missing authorization header" });
    }

    try {
        
    } catch (err) {
       
        });
    } finally {

    }
})

module.exports = router
app.use('/v1', routes.r2.uploadAvatar)

anyone know why router.post wouldn't work for this?

#

i removed like 90% of the code in the try catch area just so it wouldn't flood the chat

deft wolf
wheat mesa
hidden gorge
low marten
#

economy module logs picked up emad testing my bot haha

frosty gale
frosty gale
#

module.exports = router where is your router export used

pearl trail
#

remove either one of them

hidden gorge
#

ooh

frosty gale
#

oh right im blind 2x

prime cliff
#

yayy Yay fully working (except for the weird times)

ivory hawk
queen needle
#

hows your lock thing going?

sharp geyser
#

Uhm

#

I gave up

queen needle
#

valid

sharp geyser
#

Did not have time

#

So I just did a drag and drop

queen needle
#

what are you working on

sharp geyser
#

Drag key onto lock and poof redirect

queen needle
#

valid

sharp geyser
#

Right now im trying to get my portfolio done

#

I honeslty am not in a good mood 😭

queen needle
#

aw im sorry :(

sharp geyser
#

It's all good

#

not your fault!

wheat mesa
#

I think I'm starting to not hate python

#

ML is cool

sharp geyser
#

lmao

#

I can't wrap my head around ML

queen needle
#

Me neither

wheat mesa
#

I'm using it for the first time to predict 5 day rolling volatility for stocks

#

This is insanely good of a prediction

#

For reference, it trained on days 0-400, then 400-500 is a complete prediction

queen needle
#

oh wow

#

i don't understand how you even make it to predict stuff like that

wheat mesa
#

It's surprisingly easy

#

It's more about understanding which model is best applied in which circumstances

prime cliff
ivory hawk
prime cliff
#

Alternative to Portainer

ivory hawk
prime cliff
#

Got most of the docker features working and planning to add a bunch more developer related features vibecat

ivory hawk
prime cliff
#

Discord login atm but i plan to add Discord notifications, status messages and other related things.

#

Things like vps server status and game server status and docker container status

wheat mesa
#

don’t forget us when you’ve turned this project into a multimillion dollar business that gets bought out by amazon

prime cliff
#

You can technically add Discord notifications and status messages yourself using the API though too

wary carbon
#

Hi everyone! 👋 I’d love to connect with other developers whose bots use welcome messages to drive engagement. We’ve relied on welcome DMs for a while, but lately we’ve seen declining conversion—even as outreach volume goes up.

Curious if anyone else has noticed this trend or found ways to keep welcome messages effective at scale. Happy to swap notes!

lyric mountain
#

DM welcomes are the worst way to greet people unless you want to be blocked by more than half of them

wary carbon
lyric mountain
#

well, either send the messages in a specific channel or dont send at all

#

imagine if every server you joined a bot sent u a message in DMs, sometimes 2 or more bots

#

this is why I blocked dyno

rugged dawn
#

if you are, then i was about to look what that bot was at first but the constant dms annoyed me

#

unsolicited dms are the worst way you can drive engagement

pearl trail
hidden gorge
rugged dawn
# rugged dawn are you by any chance referring to this bot?

not only the dms but dm'ing things like this, there are people like me who are not in a bad position to seek help kekw especially from a discord bot (im being brutally honest here so you can see how users think this as, don't mind) so you might want to loosen that up a little bit and just give a brief intro of what your bot is capable of, it is a good initiative but as i said, things like this would just piss off audience like me @wary carbon

#

and sending out dms more than once if you did not recieve a response from the first one, might want to see how you want to handle that too

pearl trail
sharp geyser
#

I am noticing SSR with normal react + react router looks complex as fuck

#

and very hard to follow

#

💀

#

I wonder why people still seemingly opt to use react and react router over nextjs

wheat mesa
#

SSR is kind of a pain in the ass to begin with anyways

sharp geyser
#

I mean true

#

I kind of want to not use nextjs though

#

I still want the SSR capabilities

#

but nextjs just seems to be more trouble than its worth

#

I've ran into a few libs that I want to use that don't work for whatever reason, because of how nextjs is

#

but they work fine with just plain old react and react router

#
  • vite ofc
#

since vite makes everything easier

#

Anyone know what SWC is? Is it some other kind of bundler

#

oh

#

I guess its some kind of compiler

pearl trail
#

vite looks easy for ssr

#

tho you need to proxy it to your main server if you’re using another backend server

amber rose
#

did you work with it before?

sharp geyser
#

I've worked with it before

#

but i've always had bad experiences

#

dk if its a me issue

#

but I run into a lot of issues

amber rose
#

It's a front-end framework that runs on top of React right?

pearl trail
#

a server too

#

you can build whole app with it

amber rose
pearl trail
#

routing yes, database ofc no

amber rose
pearl trail
#

yeah(?) its like express and react combined. you still need to build that kind of thing by yourself

#

tho i havent really used the server, just need it for ssr

amber rose
#

Well there are frameworks like Laravel that lets you choose your database solution, like SQLite and PostgreSQL
And it can also work with React

#

Though since Next.js is a bit more minimal I guess it makes sense

pearl trail
#

i usually see people use prisma with it

#

but it varies

sharp geyser
#

Laravel is what i'd consider a full stack framework

#

It lets you easily integrate frontend and backend rather well

#

nextjs is frontend first

prime cliff
sharp geyser
#

I remember when I was younger I wanted to make one

#

then realized it was pointless cause i aint no therapist

#

It's one thing if its from a licensed therapist

pearl trail
#

lmao my lecturer cooked me because of me suggesting that idea for a competition

sharp geyser
#

lmao

pearl trail
#

and my friend who used to design an app with “using ai for mental health tracking blsbla” actually interviewed a real therapist, and 💀 they got cooked too. the therapist said ai can’t replace this job (yet)

#

so yeah

#

there are a lot of factors

sharp geyser
#

Of course not

#

its not advanced yet to understand emotions

#

so how can it tell you how you feel or should feel

pearl trail
#

yeah

eternal osprey
#

me n my friend used a bot

#

that makes use of modals

#

i can see it, he can't

#

has he somehow disabled modals?

#

instead of showing the modal it shows this greyed out response

compact condor
#

@shell tundra advertisement

crude vale
#

@solemn latch

ivory hawk
#

or you run a command and it shows the modal?

eternal osprey
#

apparently, obs picks modals up as a streamable using this ui

#

making the modals appear on obs view but not on discord itself

amber rose
sharp geyser
#

😭

#

I dont understand how the actual SSR part functions

wheat mesa
#

Or is that the part you’re confused on

prime cliff
sharp geyser
#

its supposed to improve load times for clients and improve SEO

wheat mesa
#

Yeah, it’s turning the templating language into actual HTML using the data it requires, then sending it to the client for the client to render it

sharp geyser
#

I just don't understand how what I just wrote

#

is SSR

#

💀

#

Also I am seemingly losing the benefits of vite

solemn latch
#

I'm thinking of learning something other than nextjs

#

I don't know how the other stuff works

sharp geyser
#

I followed the examples

#

and I don't get it

surreal sage
#

I want to create a monorepo with Prisma
One app would be a Discord bot, the other a Next.js site
I, for the love of god, cannot figure out how to set the monorepo up qua Prisma and generating it

#

For context, I have Dockerfiles for every app, and am planning to deploy this monorepo as a compose file

#

I could either do the funny and copy the prisma folder and sync it in both
Or I could go the complicated route and have it in the monorepo root

delicate zephyr
#

using Git submodules

surreal sage
#

Wouldn't that be syncing but more complicated

sharp geyser
#

gl on figuring it out

#

\

solemn latch
#

I plan on angular for some reason

sharp geyser
#

oh really?

real rose
sharp geyser
#

@real rose

real rose
#

@sharp geyser

queen karma
#

why u 2 ping each others?

lyric mountain
#

They suffer from a severe case of circular dependency

mint dove
#

The app icon isn't populating for my bot on the website. any suggestions?

surreal sage
solemn latch
#

👀 I am back, asking about postgres stuff again.

What do you all use for database migrations?

wheat mesa
solemn latch
#

yeah ORM

wheat mesa
#

Personally I love EF Core for ORMs

#

Super easy to use, concrete and consistent typing, straightforward API to use with LINQ

#

C# only though afaik

neon leaf
sharp geyser
#

shaved off a whole 7s

#

big gains 💪

wheat mesa
#

0.5s

neon leaf
#

(90% of the improvement was from increasing max pool connections)

#

5 -> 25

delicate zephyr
#

GORM for go

neon leaf
#

sqlx for rust 🔥🔥

#

🚀

solemn latch
#

Prisma scares me.

I'll look at drizzle

delicate zephyr
solemn latch
#

Got stuck with something in Prisma for awhile. Turns out it was a bug in Prisma.

#

This was years ago so I'm sure it's fixed now, but I moved away from it pretty quickly.

delicate zephyr
#

we use it in topstats

#

havent had any issues yet

neon leaf
#

well its pretty slow

#

all joins are done by prisma, not in sql

dark oriole
#

Hello guyz plz help me

delicate zephyr
#

so

neon leaf
#

fair

delicate zephyr
#

and tbf

#

postgres is fast enough even with prismas joins

neon leaf
#

not when you try to use where clauses with joins

#

it can be single digit ms slower even with a local db

dark oriole
#

Heloo

delicate zephyr
#

at that point just use raw queries

neon leaf
#

yea

delicate zephyr
#

we have to use raw queries with timescale anyway

#

1.2 billion rows makes prisma literally cry

neon leaf
#

lol

sharp geyser
#

not just prisma

delicate zephyr
#

fair

#

it's only 112GB tho!!!

sharp geyser
#

💀

delicate zephyr
#

@solemn latch ^^^

solemn latch
#

@silver skiff no ads please

silver skiff
frosty gale
#

prisma is just sequelize no?

neon leaf
#

no

humble gyro
wheat mesa
#

Goated framework

#

I hate implicit entity tracking though

#

People at my work never add AsNoTracking to their queries and it always creates the most difficult to track bugs

prime cliff
#

I've literally never used ef core at all kek

wheat mesa
#

Raw SQL or a different framework?

prime cliff
#

Yea just different libs i might try out postgresql though

frosty gale
lyric mountain
#

everyone eventually ends up in postgres

#

it's the crab of databases

pine willow
#

W Python code

lyric mountain
#

pft, rookies, they should learn from the albanian virus

hidden gorge
#

Hey guys what would the proper HTTP code be for missing data in the body?

sharp geyser
#

I had to do what it said

wheat mesa
#

I’d probably just go with a 400 Bad Request

hidden gorge
hidden gorge
hidden gorge
#

does this look like a good login page?

wheat mesa
#

Is it a template or custom?

hidden gorge
ivory hawk
#

Looks nice

wheat mesa
#

Looks pretty good, just felt like I’ve seen it somewhere

sharp geyser
#

probably every modern website

#

Typical blured background div

#

Its not uncommon of a style

hidden gorge
#

it follows core concepts of the site e.g the navbar was inspired by linear

queen needle
hidden gorge
queen needle
#

also any specific reason for no placeholders for the inputs?

hidden gorge
queen needle
#

Yes I like that a lot

#

Personally

hidden gorge
#

i gotta change the blue text

#

there we go

sharp geyser
#

Make it orange like the button

#

Or red whatever that is

#

Oh wait that’s confirmation nvm

#

No one cares about that

hidden gorge
sharp geyser
#

Indeed

hidden gorge
#

bc that style looks so outta place

sharp geyser
#

Make it text box

#

Don’t make it required

#

Use a form library

hidden gorge
#

no i mean like the Message

sharp geyser
#

You can iirc

#

But it’s wonky

#

Even form libraries just use their own html and css

#

And places it on top of the element iirc

hidden gorge
#

hmm ima try something

sharp geyser
#

Or they give the error message back to you so you can use it how ever you want

hidden gorge
#

i'm also gonna add a strong password system

sharp geyser
#

Wym by strong

hidden gorge
hidden gorge
pearl trail
#

user when they get an invalid email error and just typed their email’s first character:

pearl trail
#

ik how to do that

#

its just give em time to type their email instead of giving error too early

#

well its not that really important but..

#

¯_(ツ)_/¯

#

just a meme i found on internet

hidden gorge
#

wanna see something insane?

pearl trail
#

no ive seen something more

hidden gorge
#

the login EJS file is 1,100 lines purely bc of CSS

#

i never moved the CSS to its own file

#

idfk why

lament rock
#

You should

hidden gorge
#

plus i could prob move all the JS too

#

NOT THE ERROR AGAIN

#

i hate this

#

express has it on static:

app.use(express.static(path.join(__dirname, "private")))
    <link href="/private/css/login.css" type="text/css" rel="stylesheet">
#

fixed :}

dreamy saffron
#

Hiii

pearl trail
wheat mesa
# hidden gorge

Keep in mind that all of your validation on your frontend is not to be trusted. Validation should happen on the backend as well

hidden gorge
surreal sage
#

How can I use sharp to stretch an image into 1024x1024

#

I've tried .resize(1024, 1024) and .resize(1024, 1024, { fit: "fill" })

#

Both just crop

#

wait im schizo

#

ignroe

solemn latch
#

okay 😦

#

wrong fit type? ^-^

neon leaf
#

fill is right

surreal sage
#

no I was looking at the wrong code...

#

🫢

solemn latch
#

ah

#

I love making that mistake

surreal sage
#

monorepo struggles

neon leaf
#

I have multiple projects with the same name in the same workspace

#

truly never goes wrong

neon leaf
#

growing 🔥

ivory hawk
neon leaf
#

any http request to https://mcjars.app/api

ivory hawk
wheat mesa
neon leaf
wheat mesa
#

traffic about to jump 3m req/min

pearl trail
neon leaf
#

I mean

#

thankfully cf caches a ton

#

(10TB cached last 30 days)

#

(my us load balancers only have 1TB devious)

pearl trail
#

that'll be 15TB once waffle help you

neon leaf
sharp geyser
#

Waffle is no slacker

neon leaf
sharp geyser
#

Higher

#

Waffle will send enough traffic that Google will be scared

neon leaf
#

😱

prime cliff
#

AI training data stonks

compact condor
compact condor
vale fractal
#

we cant add more than 100 slash cmds then what to do ?

deft wolf
#

Maybe use subcommands and subcommand groups

vale fractal
#
Apr 10 10:09:12 VPRO python[59248]: Failed to load extension moderation.py: Extension 'cogs.moderation' raised an error: CommandLimitReached: maximum number of slash commands exceeded 100 globally
vale fractal
vale fractal
#

thnx mate

ivory hawk
vale fractal
ivory hawk
hard wraith
#

Anyone here know if discord monetization allows you to have a user and server subscription entitlement? Or is it one or the other?

#

I know it used to be one period… did that change?

charred nest
#

one or the other afaik

#

not sure if they changed that

hard wraith
#

Yeah that’s what I thought but the announcement for it on their website says you can offer both user and server subscriptions. And doesn’t say one subscription per app anymore.

#

Wait discord developers posted about it.

charred nest
#

its still same type

hard wraith
#

Ye but multiple now.

charred nest
#

so either multiple user or multiple server, not both

#

sorgy i had a stroke trying to phrase that LOL

hard wraith
#

That’s scuffed

#

What if I need separate options? My users can have £5 for access to user based ai commands. And servers pay for advanced server analytics and ai use on moderation etc.

charred nest
#

honestly after they forced devs to use it i lowkey got so annoyed i stopped keeping up to date LMAO

#

i think you can choose which one to offer on platform and then the other can be off platform without violating tos

hard wraith
charred nest
#

i honestly haven't seen a bot get taken down for it yet ngl

hard wraith
#

So half my commands only like 5 people can use because nobody can pay for premium anymore.

charred nest
#

especially because its not universally offered

hard wraith
#

I saw the email and just deleted the stripe product and disabled the purchase command 😂

charred nest
#

i don't recommend poking the bear but . . probably. if they emailed you specifically then they noticed but if it was the general email about it changing then TT_shrug

charred nest
hard wraith
#

Idk lmao I saw an email and didn’t want to risk my standing on discord trust and safety.

#

But it’s forcing me to make my dashboard better and more functional so ye… I think it’s a good thing.

#

Cus incentivising.

charred nest
#

fair enough. i dont feel its good for my users bc id have to raise the price on them to compensate for the fees discord takes

hard wraith
#

Pft I only need to cover their ai use cost

#

The discord payment will cover that and some.

#

A user paying £4.99 a month will only ever use £3 of ai

#

If that.

#

And if they try to go over that. The app just blocks it.

#

Especially when it’s like £0.05 per million tokens.

#

The rest of the cost gets spent on new toys for people to play with on the bot. Like I’m trying to work with the lyrics provider for Spotify so you can get the lyrics to the song you’re listening to.

#

@charred nest You were wrong

wheat mesa
charred nest
wheat mesa
#

I’d imagine people could be pretty pissed if they found out that they didn’t have unlimited access when they thought they did

hard wraith
wheat mesa
#

Nice

hard wraith
#

Thats why I sell a top up.

charred nest
#

@hard wraith

hard wraith
#

"youve used up your massive limit? ok heres more for you."

charred nest
#

youc ant have both

hard wraith
#

Then how tf can I support server subscriptions if I cannot add them to discord?

#

Unless i increase user subscription to include a premium guild counter... like tier 2 user has 1 guild... tier 3 has 5 etc...

charred nest
hard wraith
#

I wouldnt risk it...

#

I offer my prices in gbp as well... which is annoying as discord only supports usd

#

like my price is £5 (£4.99) but discord forces me to select $4.99, do i get flagged for the base price being in gbp on the website?

ivory hawk
#

Wait so if you want to have subscriptions on your site you have to match them on discord?

hard wraith
#

yes

#

thats what the email said

ivory hawk
#

That's stupid

hard wraith
#

so i have to somehow take my UK stripe account, make it ALWAYS equal the $4.99 price on a gbp product...

#

and people wonder why i turned off premium purchase a couple months ago.

charred nest
#

offer the same, priced the same, etc

ivory hawk
#

That's a greedy thing

charred nest
#

it pissed everyone off and continues to

#

me included

hard wraith
#

i have some discord exclusive purchases I dont want to offer on my website

ivory hawk
#

I can see why. Nobody uses discord subs

hard wraith
#

like your top up is in app, not on website.

hard wraith
#

Oh its absolutely fine because discord get their cut lmao

charred nest
#

its only IF you offer that same product on a third party site

hard wraith
#

you cant have things exclusive to your payment platform, only exclusive on discord.

#

otherwise discord has to have the same products your bot platform has.

charred nest
#

i barely make enough from my bot as it is and then paypal eats the fees also as it is

#

i dont want another hand in the pot tyvm

hard wraith
#

use stripe

ivory hawk
#

Student stripe

#

Love it

hard wraith
#

paypal fees went up, stripe fees are still the same

#

but you can support paypal if you want

charred nest
#

ill have to look and set one up, thank u guys

ivory hawk
#

If ur a college student, stripe waives like the first 1k in fees

charred nest
#

i can support both using kofi

hard wraith
#

paypal is way harder to work with than stripe

charred nest
#

i just havent had the motivation to sign up ngl

hard wraith
#

its like super simple, its like the industry standard to use stripe on web apps now.

charred nest
#

tbh i dont even think i need to dev anything for it

#

kofi handles it all for me

hard wraith
#

Still not the best dev experience, but its better than paypal.

charred nest
#

and they still get their invoice with the code on it

#

which is all they need

hard wraith
charred nest
#

theres a subscription service

#

and they have an api

hard wraith
#

Whats their % cut?

charred nest
#

0

#

only payment processor fees

#

so paypal or stripe

#

i grab the kofi transaction id, automatically email them with it and update my db with it as a valid code until its used

hard wraith
#

so the 20p + 5% of stripe then

#

Kofi must be a stripe platform... so thats actually going to be inflated a little so kofi get a cut... and then use their cut to pay the stripe fees...

#

Kofi is still taking a cut.

charred nest
#

ouh shit actually it looks like they updated their policy

#

5%

#

but if you have a membership w them its 0%

hard wraith
#

Ye that’s the minimum for a stripe platform which kofi is.

charred nest
#

only on memberships and not donations

hard wraith
#

Which is in line with what stripe charges

#

Basically they are using stripe connect, the make your own platform tool, and those fees are just what stripe makes them charge.

ivory hawk
#

Dang

hard wraith
#

Ok so is that 6% taken off then 15% of whats left? or is it 21% of the total cost taken first?

#

why couldnt they just give the total % fee and be transparent in line with the laws in the EU...

#

this is not compliant with payment fee transparency as its not clear the total deductions made.

ivory hawk
#

No idea lol