#development

1 messages · Page 265 of 1

hidden gorge
#

ah i tried using certbot once... im not lying when i say this it broke my damn NGINX setup

#

ended up rebuilding the VPS

quartz kindle
#

acme.sh is better than certbot in my experience

delicate wigeon
#

It wasnt too hard to setup imo, but I am also a more "self-hosted" type of person then anything, if I need it, and there are means to host it I try to do so

solemn latch
#

tim doing development therapy

quartz kindle
hidden gorge
delicate wigeon
delicate wigeon
solemn latch
delicate wigeon
#

I want to turn my 2nd pc into a homeserver eventually, I think it could be cool, and if my wifi ever goes down it can be a home media lab too

hidden gorge
#

used mongodb and Cloudinary to make my own kinda CDN but it was buggy

delicate wigeon
#

Tbh Ive never gotten what a cdn is, is it just to serve media?

solemn latch
#

It spreads content globally for you.

hidden gorge
#

basically yes

solemn latch
#

So, your server could be in centeral US and someone in germany would get it faster than reaching your actual server.

hidden gorge
#

i gotta use a CDN bc i have to be able to access everything on the server from my car so i can upload videos from on scene

solemn latch
#

Really important for websites, will help you show up on google with a higher ranking.

delicate wigeon
#

Hmmm, Ill need to look into it fr, does it require multiple servers or just a certain setup of tools?

solemn latch
#

If you use a company they do it for you.

#

Much much cheaper that way 😄

#

But you can for sure use multiple distinct server.

hidden gorge
#

in reality my CDN will only be accessed by a server in my car and the website

delicate wigeon
#

I use a bot to upload my images to my site which is built and served in node

solemn latch
#

👀 like a discord bot?

hidden gorge
#

(reason i say On scene is bc im a Emergency Services and Incident Photographer + Videographer)

delicate wigeon
#

Yeah

#

Its a skin system for my pokemon game

solemn latch
#

Wont that degrade your quality a ton?

#

discords compression is awful

delicate wigeon
#

Nah, we use links to download from the direct link, but the concept is all the same. They can upload the video to say discord, and use discord cdn to download the video

hidden gorge
#

yk whats gonna be hell setting up wifi in my car

solemn latch
#

Your alternator will hate you for it 😄

hidden gorge
#

i gotta install Emergency Lighting in it

#

so flashing lights

hidden gorge
delicate wigeon
#

Could you technically just use a portable hotspot from a cell provider?

#

Probably less work/hassle in the end

#

Only thing you would need to keep in the car is the charger, and then at that point you can take that wifi anywhere

small tangle
#

I just use their css utility classes if thats what youre asking

delicate wigeon
#

Bridge a raspberry pi to it to ssh tunnel and bam, private site access

hidden gorge
#

-# Lighting costs $9,000 - $10,000 💀

delicate wigeon
#

Expensive for me, Im 23 w/o my license

hidden gorge
#

im 16 💀

delicate wigeon
#

But once my next bot project (currently working on, in alpha) takes off I plan to get it done. I used to live in a state without mandatory classes bc you did them in HighSchool, but now where I live it costs extra just to take classes

solemn latch
#

👀 does that not violate your local laws?

hidden gorge
solemn latch
#

My state they would get so pissed if you had red/blue lights. Impersonation laws notlikenoot

delicate wigeon
#

As long as its distinguishable enough from an emergency vehicle should be fine

hidden gorge
delicate wigeon
#

They said white/amber

solemn latch
#

ah, probably okay.

hidden gorge
#

i only need it bc i need to be seen by traffic

solemn latch
#

Work truck?

hidden gorge
hidden gorge
#

Emergency Services Photographer and Incident Photographer + Videographer

#

aka News Company

wheat mesa
hidden gorge
wheat mesa
#

unless it's like work truck-looking

#

but afaik even attempting to look like a police car is a crime

hidden gorge
#

you can buy retired FPIUs and do whatever u want with them

wheat mesa
#

like, with lighting

delicate wigeon
#

Raspberry pi setup can still be a killer idea fr
Use a touch screen display for it to go with the pi, bind ssh tunnel to start, and connect to the hotspot, and then you can use electron to make a dedicated site gui for the pi,
Kinda a cool circle of items

hidden gorge
#

its Amber and White

#

the car will be incapable of red and blue

wheat mesa
#

that doesn't necessarily make it legal

#

different color lights != not a traffic hazard

hidden gorge
#

you can have Amber and White lights here but not on while your vehicle is moving

pearl trail
#

at what age are you legally allowed to drive there?

wheat mesa
#

special treatment moment

wheat mesa
#

def not legal but w/e

pearl trail
#

damn

wheat mesa
#

emergency-looking lights is definitely illegal. If they are just static LEDs that do not flash or change color, then I could see the argument fo rit not being illegal

hidden gorge
# pearl trail damn

16 you need to drive with something with a Full G class License and 4 Years of Driving History and you cannot drive between 12 AM - 5 AM and a 0.00 BAC

pearl trail
hidden gorge
#

also do remember im canadian

wheat mesa
#

doesn't make it legal!

#

Yes I do remember

solemn latch
wheat mesa
#

I believe work trucks need a special tag/permit for that

hidden gorge
#

nope

hidden gorge
# wheat mesa I believe work trucks need a special tag/permit for that

Lights are prohibited or restricted based on their combination and/or the direction they are visible from. Flashing red lights, visible from any direction on a vehicle, are restricted to law enforcement vehicles only. This restriction does not include four way flashers or tapping the brake pedal to produce an on and off effect with the brake lights. In addition to this, red lights and red and blue combinations of lights to the front are also restricted to law enforcement vehicles. Flashing blue lights are restricted to police vehicles and snow removal vehicles, but only while they are actually engaged in the removal of snow (or de-icing, etc.). Flashing green lights are restricted to volunteer firefighters.

solemn latch
#

I know in my area tow trucks can have sirens even. But that does require a permit and you must be given permission on each use.

#

Used during critical crashes, such as a major highway being completely blocked.

hidden gorge
#

soooo

#

HTA Applies to all roads not just Highways

frosty gale
#

what do you mean (2 days late)

deft wolf
#

It's probably about your avatar

#

Or rather the lack of it

frosty gale
#

is removing your avatar supposed to be a silent cry for help now

#

i was getting bored of the old one so i was looking through my download folder but couldn't find anything suitable 😦

deft wolf
#

Pain

frosty gale
#

i welcome suggestions as always

real rose
wheat mesa
#

Anyone know why my port forwarding for port 51820 wouldn't be working? I don't think it's my router, bc I forwarded on port 22 for SSH and it worked just fine. I am trying to set up Wireguard on my rpi, and for some reason it's not going through. Here's what my ufw status looks like:

To                         Action      From
--                         ------      ----
51820/udp                  ALLOW       Anywhere
22                         ALLOW       10.0.0.0/24
22/tcp                     ALLOW       Anywhere
51820/udp (v6)             ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
``` and here is my wireguard setup
Server: ```
[Interface]
Address = 10.0.0.1/24
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o wlan0 -j MASQUERADE
ListenPort = 51820
PrivateKey = <Server PrivKey>

[Peer]
PublicKey = <Client Pubkey>
AllowedIPs = 10.0.0.2/24
``` Client: ```
[Interface]
Address = 10.0.0.2/24
PrivateKey = <Client PrivKey>
DNS = 1.1.1.1

[Peer]
PublicKey = <Server PubKey>
Endpoint = <My Public IP>:51820
AllowedIPs = 10.0.0.0/24, 0.0.0.0/0
PersistentKeepalive = 25
prime cliff
#

@wheat mesa you only whitelisted the udp protocol whatever you're doing might be using tcp or a different one

wheat mesa
#

wireguard only needs UDP

prime cliff
#

You could also check the firewall log

wheat mesa
#

What's the command for that

prime cliff
#

It's a file somewhere in /var google it i guess

wheat mesa
#

I also tried looking at the TCP packet dump and there was nothing, but I'm assuming nothing would come through if the firewall blocks it

wheat mesa
#

got it working. my stupid router doesn't support NAT loopback so it was trying to connect through my public IP instead of my local since I was on the same network

prime cliff
#

Lol

#

For internal stuff anyway like db access you can use an ssh tunnel to proxy pc localhost <-> vps localhost by port

hidden gorge
#

need some opnions rq do i make the boxes above the members transparent or no?

prime cliff
#

Looks pretty good although the card titles could be a little smaller compared to main title

hidden gorge
prime cliff
#

The avatar images seem a bit too big

hidden gorge
#

That pic is zoomed out too so

#

It auto scaled

prime cliff
#

Ah ok

scenic kelp
#

do you have a max width for your content

#

i'd say it's generally a good idea to have a max width of around ~1400px so it looks good on ultrawide screens as well

crystal wigeon
#

has anyone worked with payment integrations like paypal? flork_think I wanted to know how i can send customers receipts and like a bill after completing the payment? like as proof. so people dont go to paypal and back charge after purchasing the item

pearl trail
#

there's an endpoint for receipt i believe

delicate wigeon
#

Weeeeeee

#

Well thats silly

#

@bitter granite hy, dont mean to ping, and not here to bug u, but ty.
You may have accidentally deleted all my already created cards data, but you helped me identify a single capitlilzation error in my startup flow axewcry

bitter granite
#

Wdm?

delicate wigeon
# bitter granite Wdm?

Well, I created a custom loop to make my bot leabe servers I dont want it in. And somehow during that process, it managed to delete and crash my users card json, which is a really massive bug that I need to fix, so ty for finding it!

bitter granite
delicate wigeon
sharp geyser
#

Anyone here use Amazon SES?

I am looking at it and it seems to just use already existing emails, and if thats the case why not just use office 365 smtp instead of aws ses. I dont really actually see how you can send 250,000 emails potentially through SES if you will end up hitting limits from the email provider.

neon leaf
#

am I tripping

#

ye I am, the second arg that map provides is index which provides a radix to parseInt

quartz kindle
#

get trolled

spark flint
#

SES is

#

theres loads of providers that are just repackaged SES

frosty gale
#

i wish all marketing and newsletter email providers just go bankrupt or something

#

i cant remember a time where i have actually enjoyed receiving a marketing or newsletter email that i havent explicitly agreed to

swift barn
sharp geyser
spark flint
#

wdym existing emails

sharp geyser
#

Well it had me create an identity to send emails through and that identity is an already existing email provided by protonmail

sharp geyser
pearl trail
#

whoa i just realized this is a thing

covert gale
#

yeah, rust also has that and it's really nice and helpful

wheat mesa
#

Tuples

pearl trail
earnest phoenix
#

lots of languages have that lmao

frosty gale
#

javascript even sort of

frigid locust
#

hii!

frosty gale
#

arrays can act like tuples

#

but imagine the disgusting overhead of constructing a new array on the heap every single time you want to make a tuple @quartz kindle

#

horrible

#

a dynamically sized array*

pearl trail
#

ok so uh i got a question, why does this status == "enabled" goes into my int typed parameter function? the console returns True, and i have "3 functions"

public async Task SetEffectSet(string effectName, string level) {}
public async Task SetEffectSet(string effectName, bool enabled) {}
public async Task SetEffectSet(string effectName, int value) {}
#

ok now i use this (...., enabled: result), thx

#

wth it's still not working found the issue

quartz kindle
#

if you know the final size of the array behorehand

#

:^)

scenic kelp
scenic kelp
frosty gale
quartz kindle
#

there is a small cost every time an array's size has to be increased

#

when you push to it, or add stuff to its indexes

#

but if you initialize an array using Array(n), all accesses inside that n will not have the cost of having to expand the array on the first access

frosty gale
#

are arrays in js an actual contiguous block of memory holding references to objects or does it do anything special such as becoming a partial linked list

#

but then index access would be very slow if it involved linked lists in any way

quartz kindle
#

i believe when an array is declared either with Array(n) or with [a,b,c,d], it should be a contigious block

#

then if an item is pushed, the array is transformed into something else

#

i dont know the exact details but i imagine it can be several memory blocks linked like a linked list

frosty gale
#

yeah thats what i was thinking might be a possibility

#

if you make it a linked list of chunks of smaller contiguous arrays you can sort of get a balance between benefits of a linked list and benefits of a regular array

quartz kindle
#

ye

frosty gale
#

chunk size would be very annoying to figure out though, it would totally depend on the number of elements

hidden gorge
#

Passport issue:

Error: Failed to serialize user into session
    at pass (/root/emgkwc-website/node_modules/passport/lib/authenticator.js:296:19)
    at serialized (/root/emgkwc-website/node_modules/passport/lib/authenticator.js:301:7)
    at /root/emgkwc-website/src/server.js:70:5
    at pass (/root/emgkwc-website/node_modules/passport/lib/authenticator.js:309:9)
    at Authenticator.serializeUser (/root/emgkwc-website/node_modules/passport/lib/authenticator.js:314:5)
    at /root/emgkwc-website/node_modules/passport/lib/sessionmanager.js:33:10
    at Immediate._onImmediate (/root/emgkwc-website/node_modules/express-session/session/store.js:54:5)
    at process.processImmediate (node:internal/timers:476:21)

my code:


passport.serializeUser((user, done) => {
    console.log('User in serializeUser:', user);
    done(null, user._id);
});

passport.deserializeUser(async (id, done) => {
    try {
        const user = await userModel.findById(id);
        done(null, user);
    } catch (err) {
        done(err);
    }
});

DB Structure:

_id
Username
Password
__v                              
#

Fixed the issue.

wheat mesa
hidden gorge
#

i salt and hash it

long marsh
#

I'm building a "clan" system in my discord bot. The trouble I'm having is that discord username's change. If I'm persisting their name, how would I update it upon a name change? One option is to change it the next time the game is used by them?

vocal knot
pearl trail
# scenic kelp what was it?

there's actually no issue with it. basically on each SetEffectSet, i execute another 3 SetEffectSet to disable other effects inside try catch like this (the function actually supposed to throw error in this function thus i catch it with try catch)

    private void _resetEffect(string effectName)
    {
        try
        {
            SetEffectSetInt(effectName, 0);
        }
        catch
        {
            try
            {
                SetEffectSetBool(effectName, false);
            }
            catch
            {
                try
                {
                    SetEffectSetStr(effectName, "off");
                }
                catch {}
            }
        }
    }

i just forgot that rider still suspends the program when there's exception even if it's catched well

#

sorry for the confusion

pearl trail
frosty gale
pearl trail
frosty gale
#

this is the stupidest twitter take ive seen

deft wolf
#

If I want to be a dentist, do I also have to know the entire human anatomy?

frosty gale
#

i want to see him design a cpu from scratch and if he cant do that, i guess he's not a real programmer 😕

vocal knot
#

everyone knows to be a real programmer you need the programmer socks

pearl trail
#

bruh, is there any problem with my .Count code??? im frustrated with this debugging mode 😭

#

i hate every i test the command, i need to manually resume the program

#

oke idk restarting the program works, but that's still weird

long marsh
vocal knot
#

what language is it?

long marsh
vocal knot
#

i never hit the rate limit

long marsh
vocal knot
#

my bot is in 662 servers as of now

deft wolf
vocal knot
#

@long marsh what language and what package do you use

long marsh
#

I'm coming at this from nearly a pure serverless environment where I don't store any cache except for player data. My application is write-heavy.

Here's my thinking:

  • User initiates command to do main game action
  • If the username is different than what is stored at the database level, update it
    • If the user is in a clan, redundantly store their name there as well
#

So that whenever a clan is fetched, it has all the member's and their rankings available.

solemn latch
long marsh
#

I'd have to hand-roll any caching mechanisms is what I'm saying.

vocal knot
#

what you can do then store user id and name that way just update it needs to and have your own cache

#

it's not more work than just keeping username

#

and add a queue system if you're so scared of ratelimit

long marsh
# vocal knot it's not more work than just keeping username

If a player load's a clan and their members, I would prefer not to hit cache 15 times for all 15 players. Rather, I can store their names and ids redundantly on the clan record.

The downside is that I must keep the two spots of data synced. Fortunately, this isn't too bad since I can check to see if their user name in the database matches their current. If so, don't do anything. If not, update the data in two separate places and clear their cache record.

I also only store cached data for up to 5 minutes after update. So if a player continues playing, their 5 min TTL will keep increasing.

lyric mountain
#

simply because you cant hold context for long

#

using the database to retrieve context is a way, but it'll be N queries every time you need to restore context

long marsh
frosty gale
#

only bad part about it is you need to be careful not to have multiple cached contexts of the same thing floating around

earnest phoenix
#

So I'm having an issue which was my fault i forgot to apply for intents, i cant use my commands, discord wont verify my intents, i would update it but i cant, because my commands dont work. any help with this?

lyric mountain
#

if you cant get the intents then discord doesn't deem them necessary for ur case

#

what intent are u trying to get? message?

earnest phoenix
#

nvm its fixed but the issue was there was an glitch when i turned one off it turned them all off and since it was already at 100 servers it wouldnt allow me to enable them

real rose
errant rune
#

How do I add a hexadecimal color background to the bot's long description?

deft wolf
#

I don't think it's possible

errant rune
#

Nekotina even has their website in the long description, I would like to know how they do that too

deft wolf
#

You can use html tags + css

errant rune
#

Could you give me an example? I tried to do it but it didn't work

errant rune
#

I did it like this and it didn't work

vital mirage
#

Something about this system just makes me cream lowk

#

ignore election

wheat mesa
#

Also is this audit logging but with a single object..? Sounds scary

#

All fun and games until you have to fetch a resource that gets updated a ton, then finding out you have to pull 5mb of data for one object

long marsh
# wheat mesa nosql databases make me want to cry

While postgres / traditional SQL databases are perfectly acceptable, I don't mind the challenge of a NoSQL database. I try to use DynamoDB in most of my use-cases. Which is even harsher than stuff like MongoDB

#

Most of the time, I find myself trusting the application logic > the database. Meaning, I'll do all the validation upfront / merging of data within my application. Database access is typically super dumb. 1-1 for typical CRUD actions.

wheat mesa
#

I still really dislike it. It’s open to too much interpretation on what data is stored where. No rules leads to more bad practices (unintentionally)

vital mirage
proven lantern
#

DynamoDB is great. so much cheaper than anything else

long marsh
#

I suspect I won't pay a dime until I'm hitting hundreds of active users every hour. Which, with my current scale / rollout, won't be for at least another year or two.

proven lantern
#

look how much they give for the free tier

long marsh
long marsh
#

I also use it professionally at my company ... and it currently serves thousands of requests per minute without any hiccup. Postgres could do that too, but at a burden of paying higher monthly costs / maintaining it.

proven lantern
#

same with lambda

long marsh
# proven lantern same with lambda

Yep, we're purely serverless. AWS CDK + Lambda + DynamoDB. We do have some queuing for rate limit stuff, but other than it's that simple. The application has made my company $3 million so far ... with initial costs (dev work / sales / etc.) being below $250k in less than a year.

#

Ofc people costs were the highest portion of that. Actual infra maintenance ... legit tens of dollars per month.

proven lantern
long marsh
#

Last I used SAM, it had a ton of abstraction / opinionated flows for certain things. AWS CDK can be as low-level to CloudFormation as you want. To give you a clearer answer though, our organization has built L3 constructs with business-level opinions in them that all departmental teams consume.

So, the business forces our hand with AWS CDK. It's a delight over terraform though (if you're strictly AWS)

#

For example, when we spin up an API Gateway, it's automatically deployed with a lambda authorizer that hooks into our organization's authentication / authorization application. Or when an S3 bucket is deployed, it has restrictions imposed at the resource policy level that our org mandates.

proven lantern
#

that makes sense. using a programming language to create the resources instead of configs probably lets you do a lot more custom stuff

long marsh
tacit estuary
#

Is there really no way to get input through both text input or reaction/emoji input from the user? Cause I am thinking about it and they both require a separate def check thing and the one missing an input will get stuck at the other. I swear python is unnecessarily annoying.

#

You can not even use if/else statement because apparently try/except need to immediatelly follow a def function.

long marsh
#

Does the discord username stay the same? Or can nitro folks change it?

#

For example, my username is thomas.gt.

vocal knot
#

everyone can change username

#

the user id tho never changes

#

saving stuff under username would be really unsecure

long marsh
#

Is it to prevent people from getting rogue friend requests and stuff?

pearl trail
#

it can be changed

#

id cant

vocal knot
long marsh
# pearl trail it can be changed

Yeah I store everything via the discord id, but need to showcase a "name" for users in clans. I don't want to have to fetch up to 10+ users each time a clan page is loaded, so I'm redundantly storing the usernames; however, I then need to keep it up-to-date after the fact.

vocal knot
#

even if your app doesn't save sensitive info using username to save stuff under is always bad

vocal knot
long marsh
vocal knot
#

just have it check from time to time

pearl trail
#

that’s fine, maybe like put expiry

vocal knot
#

this

#

like have an expiry of like 2 days or idk or when the user runs a command you can check at the same time

long marsh
#

Hmm... maybe. Put like a "expiresAt" time for some distant future such as 2 days?

#

Or, I can additionally do some extra work to "queue up" name changes. Ie. every time a user clicks a command, queue up a name change if it's not the same one kinda thing

vocal knot
#

yeah

#

or use both as redundancy

long marsh
#

Yeah. Store the username on the player record, then just check each time if the name is changed. Update the name.

Then, at the caching layer, if it detects that I'm changing the name "queue" up a TTL that one of my workers will scan after the fact.

#

Side note: would it be better to use the discord username or global_name?

pearl trail
#

imo, global name, because what people see is the global name, not username. also lets take me as example, takiyo is already taken, so i put dot in front of it .takiyo . thats my opinion

proven lantern
#

also make sure to save the user/member data that is resolved in slash commands

#

might save some api calls

long marsh
errant rune
#

How do I add a website to the bot's long description on Topgg?

#

and how do I change the background too?

sullen crater
#

why would discord limit polls to two weeks 🤨 i cant think of a technical limitation

real rose
#

same as timeouts for 1 week

#

i wanna timeout for 1 month

pearl trail
sullen crater
#

i was thinking of like permanent demographics poll in a locked channel, so anyone who joins later while the server exists can respond to it without a new poll created

#

embed+reactions w/ a bot works for doing something like that, but thats where i was thinking like. why 2 weeks?

long marsh
covert gale
#

it's really weird that the UI doesn't support it though

spark flint
#

its 28d max

covert gale
#

waaaaaaa i was close

#

haven't worked with the api in a ages now

real rose
earnest phoenix
#

average discord moment

deft wolf
#

I'm just waiting for the server level to have an impact on things like the length of timeouts

opaque acorn
#

How easy is it to migrate to discord.js 14?

earnest phoenix
errant rune
#

To change the background, do I have to inspect and see what the name of the class where the long description is located is?

earnest phoenix
cursive hare
#

How we get bot developer

deft wolf
#

You mean Bot Developer role?

cursive hare
#

Yes

#

Can you tell

deft wolf
#

You must have an approved bot on top.gg

cursive hare
#

Ok

bitter granite
#

const { SlashCommandBuilder } = require('@discordjs/builders');

const embed = {
    color: 0x0099ff,
    title: 'Lock Decline Reason',
    author: {
        name: 'Welper',
        icon_url: 'linkholder',
        url: 'https://top.gg/user/277771625074991104',
    },
    fields: [
        {
            name: '',
            value: 'text',
        },
        {
            name: '',
            value: 'text',
            inline: true,
        },
    ],
    image: {
        url: 'https://bit.ly/lockcmd',
    },
    timestamp: new Date().toISOString(),
    footer: {
        text: 'Top.gg Bot Reviewer',
        icon_url: 'kink',
    }
};

const embed2 = {
    color: 0x0099ff,
    author: {
        name: 'Welper',
        icon_url: 'link',
        url: 'link',
    },
    fields: [
        {
            name: 'text',
            value: 'limk',
        }
    ],
    timestamp: new Date().toISOString(),
    footer: {
        text: 'Top.gg Bot Reviewer',
        icon_url: 'link',
    }
};

const embed3 = (command) => ({
    color: 0x0099ff,
    title: 'Lock Decline Reason',
    author: {
        name: 'Welper',
        icon_url: 'link',
        url: 'https://top.gg/user/277771625074991104',
    },
    fields: [
        {
            name: '',
            value: `text ${command} text`,
        },
        {
            name: '',
            value: 'text',
            inline: true,
        },
    ],
    image: {
        url: 'https://bit.ly/lockcmd',
    },
    timestamp: new Date().toISOString(),
    footer: {
        text: 'Top.gg Bot Reviewer',
        icon_url: 'link',
    }
});

module.exports = {
    data: new SlashCommandBuilder()
        .setName('lock')
        .setDescription('text')
        .addStringOption(option =>
            option.setName('commands')
                .setDescription('text')
                .setRequired(false)
        ),
    async execute(interaction) {
        const command = interaction.options.getString('commands');
        
        if (command) {
            await interaction.reply({ embeds: [embed3(command), embed] });
        } else {
            await interaction.reply({ embeds: [embed, embed2] });
        }
    }
};
#

here is the code that i broke @radiant kraken

#

wait i think i might know what to fix, brb

radiant kraken
#

i haven't touched discord.js in like 5 years

bitter granite
#

found*

#

i am so dumb

pearl trail
#

quick question, can you put buttons and interact with it in ephemeral?

sweet sorrel
#

jap

bitter granite
#

i prettysure yes

pearl trail
#

oke thanks

tacit estuary
#

I am not even working on buttons today and they are still terrorizing me. They have messed up my visual studio code with yellow lines under most of the imports.

#
import discord <-
import aiohttp <-
from discord.ui <- import Button, View
from discord.ext <- import commands
from discord <- import app_commands
solemn latch
#

👀 what does it say when you hover over the yellow lines? couldnt import?

lyric mountain
tacit estuary
#

I added arrows to show the problem, but used picture instead.

lyric mountain
#

ah

frosty gale
#

god i hate pylance

tacit estuary
#

I hate buttons. They are the reason why those yellow lines came up.

tawdry panther
#

pip install aiohttp

#

else

#

pip show discord

#

and same w aiohttp

tacit estuary
#

It mysteriously fixed itself!

tacit estuary
tawdry panther
#

also have that sometimes

tacit estuary
#

I ran it and all the yellow lines disappeared.

#

Makes no sense at all.

tawdry panther
#

for some odd reason my giveaways wont end 😂

tawdry panther
tacit estuary
#

I closed out the vscode and reopened it and they were still there. But I am glad it all working again.

tawdry panther
#

yess nice

tacit estuary
#

Now I can finally add anti cheat thing to one of the games I have since I don't want people cheating.

tawdry panther
#

W

#

i forgot to add a simple thing so people could do /slots -1B and itll guve them 5b😂😂

amber rose
#

🥶

tawdry panther
amber rose
#

:/

tawdry panther
#

do you think a crypto system would be cool?

amber rose
frosty gale
#

please no more crypto

tawdry panther
#

LOL

real rose
#

i respect the honesty

scenic kelp
#

really niche thing but has anyone here ever written a terminal emulator?

#

i'm writing a crappy terminal emulator thing in typescript and svelte and i'm wondering how soft-wrapping works with ansi cursor manipulation commands

#

and yes i could write a program to test it myself but that's too simple

scenic kelp
#

in general

#

the behaviour should be pretty much identical cause most terminal emulators emulate the VT100

long marsh
scenic kelp
#

pretty much

tacit estuary
#

Anybody know how to add a timeout type thing to buttons so that once certain time say 20 seconds goes by, the buttons can be removed? And without using anything related to class.

proven lantern
#

i found a quest. so are these only for video games? not for bots?

pearl trail
#

mmmmmm mmLul

bitter granite
solemn latch
tacit estuary
# solemn latch Why the limit on classes? The library you use is likely entirely classes.

It is way too advanced for me and I am certain nobody can explain it in simple basic English to me. This was the example code that helped me to finally make working buttons for my weather bot. If that can be translated into class, then I can probably figure it out.

@client.command()
async def hello(ctx):
    button1 = Button(label="Click me!", style=discord.ButtonStyle.green)
    #button2 = Button(label="Click me2!", style=discord.ButtonStyle.danger)
    #button3 = Button(label="Click me3!", style=discord.ButtonStyle.blurple)
    
    view = View()
    view.add_item(button1)
    #view.add_item(button2)
    #view.add_item(button3)
    await ctx.send("Hi!", view=view)

    async def button1_callback(interaction):
        await interaction.response.send_message("Hi!")
    button1.callback = button1_callback
#

I am still in shock that the buttons worked after 2 or 3 years of attempts and it feels crazy.

solemn latch
#

Classes are no more complex or confusing than lists and dicts.
An afternoon to understand them at most.

small tangle
tacit estuary
#

I am done with all that stuff tonight.

tacit estuary
#

I got the buttons to disappear after timeout.

radiant kraken
#

@pearl trail is this too hacky

#

i'm thinking of making form on top of #inverse

#

but z-index isn't working

#

😭

#

fyi ```css
nav #search form {
z-index: 2;
}

nav #search #inverse {
position: absolute;
top: 0;
z-index: 1;
}

nav #search #inverse * {
pointer-events: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}

#

i can't select nav #search form #box

#

cc @civic scroll too

#

wait nevermind solved it by making nav #search #inverse pointer-events: none; 😭

#

i'm so stupid

pearl trail
radiant kraken
#

I GOT IT WORKING

#

WOOOOOOOO

radiant kraken
#

as it focuses it should have an animation that goes from the state above to below like this

#

idk the idea just popped up in my head

#

maybe using two elements and two clip-paths is too hacky though

#

need to know sayuri's thoughts on this

#

what do you think?

pearl trail
#

smth like this?

pearl trail
pearl trail
prime cliff
#

vibecat Got all of my account, profile and team stuff done just need to work on fancy server features now

radiant kraken
#

how did u do that

#

i want that

#

oh my god i suck at css so much plump_pain

prime cliff
#

It's just a css animation for the input background when you hover or focus it Smart

radiant kraken
#

it's not that simple builderb

prime cliff
#

It is mmLol

radiant kraken
#

what about the input text

#

and search icon

prime cliff
#

Same thing hover/focus change text/icon color

#

It's basically like when you hover over a button and it changes the design

radiant kraken
prime cliff
#

In cats case though it has an animation delay before it changes color so it dosen't look like it instantly changes and syncs with the background animation

radiant kraken
#

nah it seems that it's all just mix-blend-mode

radiant kraken
#

@pearl trail i got it working without the cyan!!!

#

trying to find a way for the other way around tho

pearl trail
#

congrats 🎉

radiant kraken
radiant kraken
pearl trail
#

🇮🇩 🇮🇩 🇮🇩 🇮🇩 mentioned

radiant kraken
#

i literally scoured around the internet for hours until i realized all i needed to do was filter: invert(1);

wheat mesa
#

css is pain

#

good thing I don't deal with css

#

(crying rn dealing with css at work)

radiant kraken
#

css is very ez

#

definitely

wheat mesa
#

I am dealing with css combined with searching for DOM elements with jquery

#

and our html structure is so inconsistent

pearl trail
#

ah nvm it's just their promotion to buy their AI Assistant

solemn latch
deft wolf
#

L AD

solemn latch
pearl trail
# solemn latch What is it?

it's something like copilot, but from jetbrains. they got local AI completion that runs on your device (it's free) and that AI Cloud, which is just like copilot with few more features (paid, 7 days free trial)

#

it randomly appeared when i'm opening my ide lmao, even tho i already used it

#

i thought it's now free since there's no "Paid" in that window KEK

radiant kraken
solemn latch
#

I still like using AI for some really basic stuff, bouncing ideas off it to find a better solution to a problem.
Or fixing type errors that I'm too lazy to think through.

Autocomplete is stinky though, and just using the code it outputs. yikes.

I'm still paying for github copilot 👀

wheat mesa
#

I'm fine with using AI as long as I understand what it's generating

#

It's not amazing, but it def helps me out with frontend stuff since I'm not super well versed in standard practices for that

#

I usually use it to bounce ideas off of it as well

solemn latch
#

I think my big issue with AI is just newer developers using it.

wheat mesa
#

It's like a more advanced rubber duck

#

Yeah

#

I'm still pretty new since I'm an intern, but damn some of my classmates cannot do ANYTHING without it

#

Also note to self: do not write your own keyboard navigation system for a jquery app

#

I thought it was gonna be a little 15-20h adventure and I wouldn't have to touch it again

#

Probably like 50-60h in on updating it to handle more and more things 😭

solemn latch
#

not in jquery, but I didnt like handling in site autocomplete. Not fun

wheat mesa
#

The code I originally wrote for this system was actually pretty clean

#

Now it's just urban sprawl

wheat mesa
solemn latch
#

Its satisfying when it finally works, other than that no thanks not again.

#

Its not even compatible with screen readers, which makes it worse. I'll work on that eventually.

#

I added all the keyboard inputs just to help screenreaders too 👀 but never took the time to properly get a screenreader to work properly.

radiant kraken
#

i've still never touched ai plump_pain

#

i always resort to classic googling

vocal knot
scenic kelp
#

basically soft wrapping just moves the cursor, period. there's no additional visual buffer required like i thought there'd be

#

control characters are also simple to implement that way

pearl trail
#

that reminds me of minecraft

surreal sage
#

nvm node 21 moment

merry crescent
#

first discord bot completed! ahhhhhhh

tacit estuary
long marsh
merry crescent
azure trench
#

How good do bots havr to be to be tested

#

Is 25 unique commands and fetures enough for first attempt

#

If majority wofk

#

Work

#

Or is 100% operational preffered

#

I have a multi functional game bot

harsh nova
azure trench
#

Wow ok

harsh nova
azure trench
#

Thanks plety

#

i think im going to wait till its done tho

#

im too embarassed

#

i diddnt even really code it

#

chatgpt did

#

im just the ideasman

#

its like 20k lines of code now tho

#

my brain has broken learning this much

#

sneak peek

#

one of the cards it makes

harsh nova
#

looks good! :D

azure trench
#

ty ❤️

#

its so hard

#

ive never coded before

#

its taken weeks of hourless sleep

#

ontop of work

harsh nova
#

yeah it's quite a journey to learn lol but it's fun!

azure trench
#

learnt SQL etc

#

cant believe how far ive come

harsh nova
#

insanely useful

azure trench
#

i turned a laptop i owned

#

into a server

#

to host this

harsh nova
#

nice!

azure trench
#

ive literally done A-Z

#

cant wait to finish

#

im surprised it doesnt have to be complete to be trialed here

#

ill make it way less buggy tho

#

coz im sure complete products are always preffered :3

harsh nova
#

well it's hard to say a bot is ever completed blob_nod You can always expand your bot with more commands and such. All that is important is that it follows our guidelines

#

a good rule of thumb is quality over quantity tho. A bot with 5 really well made commands might do better than a bot with a lot of just decent commands

azure trench
#

yeah

#

im going to convert this bot when im done

#

to a playstation bot

#

that accepts gpt created game files

#

and provides instructions on how to create them

#

then reads and generates games

#

will be my next project

#

just gotta get this bot reading this game properly haha

sharp geyser
#

I thought this was a outline, but when I set it to none it still appears

pearl trail
#

border?

solemn latch
#

Why does it look like browser highlighting to me

sharp geyser
#

Ive disabled just about everything i can think of

#

And no dice

#

I think it might be browser related

queen needle
#

could be autocomplete highlight or a focus

harsh nova
#

This screams of some obscure -moz css rule

#

I wish there was some way to indicate that you want to disable default css for elements

azure trench
#

omg i reset my database on my bot today

#

and just did a flawless pipeline test

#

i wanna squeal

#

so dope man

#

gpt is sick

#

im such a noob at coding

#

2 months for this ;-;

#

first project ever

sharp geyser
#

Just dont rely on gpt

#

as a new programmer it is more harmful if used improperly

lament rock
#

One thing people tend to do (myself included sometimes) is just accept the answers without taking time to understand what it all means and sanity checking it. I used GPT to help me learn blender python a bit since concrete scripting examples for what I wanted to do were sparse from my searches. It was only after I decided afterwards to look at it did I realize there were quite a few flaws and some practices were outdated

sharp geyser
#

So this isnt the effect I was going for, I want it to slide back in from the top, when they scroll up even if they aren't at the top of the page.

<script lang="ts">
    import '../app.css';
    let { children } = $props();

    import {AppBar, Tooltip} from "@skeletonlabs/skeleton-svelte";
    import {BookOpen, Home} from "lucide-svelte";
    import { onMount } from 'svelte';

    let openState = $state(false);

    onMount(() => {
        let lastScrollY = 0;

        window.addEventListener('scroll', ()=> {
            const header = document.getElementById('header');
            const currentScrollY = window.scrollY;

            if(currentScrollY > lastScrollY) {
                // @ts-ignore
                header.style.transform = 'translateY(-100%)';
            } else {
                // @ts-ignore
                header.style.transform = 'translateY(0%)';
            }

            lastScrollY = currentScrollY;
        })
    })

</script>

<style>
    #header {
        transition: transform 0.3s ease;
    }
</style>

<div id="header" class="flex flex-row justify-center p-4">
    <AppBar classes="w-80 rounded-full shadow-xl fixed">
        {#snippet lead()}
            <a class="text-2xl" href="/">Aaron Dye</a>
        {/snippet}
        {#snippet trail()}
            <Tooltip
              bind:open={openState}
              positioning={{placement: "bottom"}}
              triggerBase="underline"
              contentBase="card preset-filled p-2"
              openDelay={200}
              closeDelay={100}
            >
                {#snippet trigger()}<a class="btn-icon preset-filled" href="/blogs"><BookOpen /></a>{/snippet}
                {#snippet content()}<p>Blogs</p>{/snippet}
            </Tooltip>
        {/snippet}
        <!--    <input type="search" class="w-48 md:w-96 bg-transparent border-0 border-b-2 focus:outline-none" placeholder="Search for post..." />-->
    </AppBar>
</div>

<div class="p-4 absolute">
    {@render children()}
</div>
sharp geyser
#

Ignore the movie in the background I didn’t realize until just now

queen needle
#

So always scroll them to the top? or

#

I just am having a bit of trouble understanding what you mean is all

sharp geyser
#

So when you scroll down, it like transitions up right, like "slides" up, and when you scroll back up it will slide back down.

pearl trail
#

can you make a variable? just compare is the current scroll is less than the prev

temp = 0;
up = false;

onscroll {
  if current < temp && !up // then it's scrolling up, set up to true
  else if current > temp // set up to false
  temp = current;
}
sharp geyser
#

Im confused

#

What are you asking / telling me to do

pearl trail
#

oh wait, didnt see the code fully

queen needle
sharp geyser
#

Yes

pearl trail
#

can you like debug it with console logs? i usually do that if i find a problem

sharp geyser
#

I want to the navbar to not always be there when they are scrolling through content

#

but they can bring it back by scrolling up

queen needle
#

OHH

#

I thought you meant like this

sharp geyser
#

Nah

#

The navbar

#

I want it to transition based on the scroll

queen needle
#

Just to make sure i have this right

#

Navbar at top, scroll down the page as normal, but when i scroll up it should show the navbar but not bring me all the way back up the page

sharp geyser
#

Correct

#

Since I dont want the navbar in the way 24/7

#

but I want it to look nice, not like it just poofs

#

So I figured a translate would work

queen needle
#

something like that

sharp geyser
#

Woah that wasnt exactly

#

but that looks cool too

#

I wanted it to transition up off screen

pearl trail
sharp geyser
#

then abck down when thye scrolled up

#

YEA

#

like that

queen needle
#

ohhh

#

mine used react anyway

pearl trail
#

but you still need the logic neko_think

queen needle
#
import { useState, useEffect } from 'react';

export function useScroll(threshold = 100) {
  const [scrollDirection, setScrollDirection] = useState("up");
  const [scrollPosition, setScrollPosition] = useState(0);
  const [prevOffset, setPrevOffset] = useState(0);

  const updateScroll = () => {
    const scrollY = window.pageYOffset;
    setScrollPosition(scrollY);
    if (scrollY > prevOffset) {
      setScrollDirection("down");
    } else if (scrollY < prevOffset) {
      setScrollDirection("up");
    }
    setPrevOffset(scrollY);
  };

  useEffect(() => {
    window.addEventListener("scroll", updateScroll);
    return () => {
      window.removeEventListener("scroll", updateScroll);
    };
  }, [prevOffset, threshold]);

  return { scrollDirection, scrollPosition };
}
#

I just used this old hook

sharp geyser
#

I see

#

I use svelte

#

so

queen needle
#

Yeah i realized that lol

#

that's why the just pure js solution Takiyo is way better

pearl trail
#

hmm but my code is basically the same as code that aaron sent

sharp geyser
#

yea

#

except mine aint working

#

💀

pearl trail
#

can you do smth like this? console.log([currentScrollY , lastScrollY ]);

#

and see the result

sharp geyser
queen needle
#

Can you check and make sure the styles are getting applied to your nav?

pearl trail
#

also is the header position is fixed?

#

and not block/absolute/relative

sharp geyser
#

it is

#

fjxedi mean

#

let me check the other question

sharp geyser
queen needle
#

this is odd

sharp geyser
#

ITs being applied to the outer div tho

queen needle
#

oh yeah that's why

#

because that's not the fixed div

sharp geyser
#

Ah

#

ea

#

it works now but the problem is

#

Now its all the way to the left

#

No longer centered

pearl trail
#

use transform: translateX(-50%) and left 50%

queen needle
#

why did they think to add reaction notifications

queen needle
sharp geyser
#

How do I center it

#

if I need to make sure its fixed

pearl trail
#

either pancake's answer or mine

sharp geyser
#

I cant apply the styles to Appbar

#

it doesnt accept an ID field that the js uses

queen needle
#

it is a testid

#

which i'd assume is unique

#

but if not just try Takiyo's answer of applying those styles to the outer div

sharp geyser
#

Well

#

it works on the outer div

#

but like I said it makes it not centered

pearl trail
#

huh

#

flex justify-center ? to make the child centered

sharp geyser
#

you cant combine fixed with flex

#

<div id="header" class="flex flex-row justify-center p-4 fixed">

#

applying flexed, will ruin the flexbox properties

queen needle
#

centered and still has the scroll thing

pearl trail
#

me trying to ignore the codes without ; at the end

queen needle
#

the formatter automatically gets rid of them

pearl trail
#

💀

queen needle
pearl trail
#

that broke my heart 💔

queen needle
#

I agree

vocal knot
amber rose
#

What does this have to do with Discord applications?

#

“Hey help me fix this BF cell loop I need it for my app”

vocal knot
solemn latch
#

This channel is related to anything development ^-^

quartz kindle
#

how can i develop a fulfilling relationship

deft wolf
#

You can't

quartz kindle
#

rip

solemn latch
#

is it time to start a bromance with tim?

quartz kindle
#

kurwa

#

how to develop resistance to disappointment

#

and how to get this disappointment out of my fucking head

#

:^)

deft wolf
#

It's against ToS to be a programmer and be in a relationship 🤓☝️

quartz kindle
#

who made that ToS

#

imma sue

deft wolf
#

Probably the same one who decided that if you play League of Legends you can't take a shower

quartz kindle
#

that one's a lie, i playe league and i do take showers

#

just not that often

sharp geyser
#

Yes okay

#

Now we know tim is a liar

vocal knot
abstract charm
#

I'm having trouble with the images not showing up on my top.gg page

#

I'm using markdown's alt title

#

Is that correct? Or am I missing something here

earnest phoenix
abstract charm
#

I think something is wrong with my image hosting then

earnest phoenix
#

just be sure the link is actually an image and not some page like imgur

abstract charm
#

I'll keep messing with it

abstract charm
#

does google drive work? i assumed it would, but it isn't

deft wolf
#

Upload the photo to imgur and copy the direct link to the image

#

Google drive is able to store photos, but you are not able to place links to them on external sites in such a way that they will be displayed

abstract charm
#

I got it, I just routed the link through duck duck go instead and it works with google drive

deft wolf
#

Weird

abstract charm
#

yeah, i found a super niche and outdated reddit post about the same issue

lyric mountain
deft wolf
#

I've never used it

lyric mountain
#

imgur sometimes delete less viewed images

sharp geyser
#

Am I dumb or is the content not supposed to be below the header?

#

Dk if its the best method

#

but I added top padding to the body content

#

Though I do notice when scrolling the text shows over the nav

#

is this a z-index issue?

#

Yep

#

Seems to be

#

😎

sharp geyser
#

Current progres

#

I hate web design but I think im cooking

azure trench
#

i cant code

#

thats why i use gpt

#

but its doing well

#

i know what correct and incorrect code looks like

#

i just cannot create it off my own knowledge

harsh nova
vocal knot
#

you just need to learn good searching skills

#

then you learn as you do it

azure trench
#

ive been improving ALOT

#

at identifying the specific issues

#

once i used all my gpt plus membership

#

like the cooldowns

#

i started a weebit of trying myself and it worked

vocal knot
#

ask any good programmer and they'll tell you they do alot of googling and shit

azure trench
#

i kinda know what im supposed to see but if u asked me how to make it from scratch

harsh nova
vocal knot
#

yep

harsh nova
#

Not that it does not require skill as you need to nail down what precisely the issue is and figure out how to fix it with help from the info Google provided

vocal knot
#

yeah

wheat mesa
#

I think that GPT is going to set back CS student/junior dev knowledge a ton

#

Nobody thinks about how to approach a problem anymore, they let gpt do it for them

sharp geyser
#

I am starting to cut gpt off for backend development

#

I’ll still use it for front end

azure trench
#

im not a cs student tho

#

this is a hobby

#

im a language interpreter and commercial cleaner

wheat mesa
azure trench
#

yeah

tacit estuary
queen needle
#

After I did that I realized how much it's infringed on programming for me, and I won't let myself use it

wheat mesa
queen needle
#

Well imo it is one of the easiest sorting algorithms besides bubble sort to read how it works and implement

wheat mesa
queen needle
#

I agree with selection I forgot about that

#

These are the only sorting algorithms I know

tacit estuary
#

Questions about discord.py.
1: Can you use slash command and then get text input from a user? Example: /slash -> user input 1 2 3 4 5 6
2: Can you use slash command and then get text input from a user multiple times? Example: /slash -> user input 1 2 3 4 5 6 -> user input 7 8 9 10 11 -> user input 12 13 14 15
3: Are you allowed to use while loop when using buttons? Example: Button gets pressed -> Cycles thorough while loop again and user gets next set of buttons

deft wolf
tacit estuary
# quartz kindle yes yes yes

Just to be clear, that user input can be text based? I thought of a way for buttons to have while loop and chatgpt kinda confirmed it for me. I mean yes yes yes tank you.

pearl trail
#

type: String?

sharp geyser
sharp geyser
#

I tried setting a height

#

but the result remains the same

#

maybe the height just isn't enough

#

But the top text always moves up as the bottom is being typed out hmmCat

spark flint
#

so its forced to be that height

sharp geyser
#

smart

#

let me try

sharp geyser
#

You are a godsent

#

It works wonderfully know

#

It looks weird with just my face STAYING there

#

😭

pearl trail
#

make it like this

#

™️

sharp geyser
#

Oh my god

#

I totally would

#

but that would def fuck up the page

past rampart
sharp geyser
#

Better pic will def be up before I launch my portfolio

#

💀

#

Its also an old picture of me

#

so

#

and the only one I have

#

😭

past rampart
sharp geyser
#

lmao

sharp geyser
#
let index = 0;
    let typedChar = "";
    let typewriter: ReturnType<typeof setInterval>;
    const typeChar = () => {
        if(index < phrase.length) {
            typedChar += phrase[index]
            index += 1;
        } else {
            clearInterval(typewriter)
        }
    }

Love how simple a typewriter effect can be

pearl trail
#

hmmmm

#

should i be concerned

sharp geyser
#

What is the tld extension

sharp geyser
#

💀

pearl trail
sharp geyser
#

im sorry what

#

Ah

#

wait

#

I understand now

pearl trail
#

yeah i dont know much about domains 😅

sharp geyser
#

.us domains aren't typically protected by WHOIS protection by porkbun

pearl trail
#

oh i see

#

i guess that's why the retail price is a bit lower than namecheap? neko_think

earnest phoenix
#

whois protection is usually free

sharp geyser
#

Is my main container not supposed to be the full height?

#

The green background stops short

#

I am visualizing where stuff goes and their bounds

wheat mesa
#

check for margin, sometimes the body element has some defaults iirc

#

You can also visualize the layout by using dev tools instead of changing the background color

sharp geyser
#

AH

#

right

#

margin

#

Love it

quartz kindle
#

or use a css normalizer

pearl trail
#

what is that? neko_think

sharp geyser
#

Visualizing the bounds of divs

sharp geyser
#

e.g setting it to 0 on margin and such

pearl trail
#

is it some kind like this? or we do it manually like usual? because what i caught from tim's message is it is a module or some kind

sharp geyser
#

Likely a module or smt

#

idk

sharp geyser
earnest phoenix
#

actually just a file

sharp geyser
#

Well yea

#

its a css file

#

that you import globally

#

afaik

earnest phoenix
#

yeap

quartz kindle
#

its mainly to correct diverging defaults accross different browsers

#

but also remove defaults that dont make sense

sharp geyser
#

I will give it a shot

quartz kindle
#

its basically a one-liner you can copy paste into your own css if you want

#

or you can include it as a separate css file

sharp geyser
#

yea

vocal knot
#

i didn't know about normalize.css I'll also keep thay saved somewhere foe if i ever need it

#

will probably use it sooner than later when I'll make at least a home page and help page for my bot

pearl trail
#

whoa, that's very helpful

#

thankss

sharp geyser
#

I have a blinking cursor but it wont be centered properly. When I try it gets to the end and gets stuck there while the text continues (as shown in second video)

<p class="text-xl cursor flex items-center gap-2">{typedChar}</p>
#
    .cursor::after {
            content: "";
            width: 2px;
            height: 20px;
            display: inline-block;
            @apply bg-surface-400;
            animation: cursor-blink 1.5s steps(2) infinite;
    }

  @keyframes cursor-blink {
      0% {
          opacity: 0;
      }
  }
#

this is the cursor class

quartz kindle
#

use a flex container if you must, but keep the text itself inline

#

ie make both <p> and .cursor display:inline

#

assuming they are siblings

#

oh nvm, they are the same element lol

#

either try display:inline on the ::after, or try absolute positioning shenanigans

#

if it doesnt work, make them two separate inline elements

sharp geyser
#

Ah yea I ended up using a lib

#

cause

#

I needed more features

#

and I wasnt going to spend time coding it myself

#

💀

quartz kindle
#

lazy

lethal tide
#

@quartz kindle

sharp geyser
#

Sir

#

where is your astronomy api

quartz kindle
#

🏃‍♂️

sharp geyser
#

💀

vital mirage
#

is it worth the effort and probably months of time to make a dashboard for my bot

wheat mesa
vital mirage
#

But its going to have a lot of commands

#

a configurations for commands like changing certain channels for certain features

wheat mesa
#

I would say that if you’re doing it purely for the sake of your bot, it’s probably not worth it (unless it’s popular). If you’re doing it because you also want to learn in the process, go for it, you’ll learn a ton

small tangle
surreal sage
#

hi chat

#

trying to setup gh workflow for building and releasing a version of a gh action

#

but struggling heavy rn

earnest phoenix
#

average gh actions moment

surreal sage
#

nvm got it

#

pure suicide

earnest phoenix
#

how many commits mmLol

#

i actually managed to make a simple workflow in a single commit lmao

#

was surprised myself

surreal sage
#

think like

#

40 now

#

(trying to fix commits)

#

okay buddy

earnest phoenix
#

🗿 average github ci

surreal sage
sharp geyser
small tangle
prime crescent
#

ive seen slash commands with form inputs, as in a pop up on your screen where every text input is presented and you write in the form instead of the slash command.

What is this called? i cant find any docs on it and im prolly searching for the wrong thing

deft wolf
#

Modals?

prime crescent
#

yeah thats it, thank you

deft wolf
#

Yw

muted kestrel
cursive hare
vocal knot
#

i love google lol right when i published a website for my bot it got reported to google as phishing LOL at least it only took them a few hours to unflag it after i appealed it but bruh

solemn latch
#

👀

#

did you register it on google console before it was flagged for phishing?

vocal knot
#

no only after

solemn latch
#

I wonder if it wouldnt have flagged you if you did that first.

vocal knot
#

probably wouldn't have

#

also what i find funny is the website is pure html LOL

solemn latch
#

classic

#

litterally

vocal knot
#

all it links to is discord

#

forgot i disabled cursor for screenshots but the cursor is on the Add to Discord

lament rock
#

I recently took on the task of trying to make a queue and lock system across multiple processes for syncing rate limit buckets for Discord but god do I hate this

wheat mesa
#

Enjoy your IPC!

lament rock
#

NOOO

ionic schooner
#

That sounds like fun, I have an idea!!!!!!!!! make a microservice for it lol

#

Maybe even redis

sharp geyser
#

I have an even better idea

#

Dont do it!!!

lament rock
# ionic schooner Maybe even redis

Redis was an actual thing I got as a response when I asked the project lead, but this is actually for a lib I maintain and a goal was to make it where people didn't have to use something proprietary so that they can mix and match and was easily extendable

lament rock
vital mirage
#

So the whole designing it would probably take years

quartz kindle
#

if not, then i suggest lmdb

smoky kestrel
#

where i can find this

smoky kestrel
deft wolf
#

It's not something you can find, it's something you type yourself

quartz kindle
#

write anything you want in "authorization", and write exactly the same thing in TOPGG_WEBHOOK_AUTH

bitter granite
pine willow
#

Something like this isnt against top.gg rules right?

bitter granite
#

I dont see what its against the rules

pine willow
#

Because of privacy I mean

bitter granite
pine willow
#

It has

sharp geyser
pine willow
frosty gale
pine willow
real rose
#

I believe they're referring to the possibility of the bot misidentifying someones race

#

As AI won't always be 100% accurate

deft wolf
#

If someone squinted and the bot thought they were Asian, I can see a situation in which someone might feel offended FeelsWeirdManW

sage bobcat
#

One message removed from a suspended account.

wheat mesa
#

I think it really depends on how you interpret the results. The AI isn't intentionally racist, it's just predicting a set of statistics based on its training data. Sometimes AIs are wrong.

sage bobcat
#

One message removed from a suspended account.

vocal knot
green kestrel
pine willow
#

AI is already trained

#

doesnt need data

pine willow
#

But then the gender would be an Issue lol

deft wolf
#

Oh brother

pine willow
#

because yk, some LGBTQ members are very pissed abt that

pine willow
deft wolf
#

I mean it's AI not you so they can be mad at AI

pine willow
#

😭

wheat mesa
#

You can get offended about anything. I'm sure there are improvements you can make, but even the most well funded AIs (ChatGPT) aren't perfect at preventing offensive content from getting through

deft wolf
#

AI is ruthless shrug

pine willow
#

I tested it

earnest phoenix
#

miss the old days where ML wasn't called AI

pine willow
earnest phoenix
#

or where crypto wasn't cryptocurrency

wheat mesa
pine willow
earnest phoenix
#

ML isn't supposed to mimic a human

wheat mesa
#

I was under the impression that ML fell under the umbrella of AI, it’s just more specialized to completing specific tasks

earnest phoenix
#

yeah it does

#

though now people say AI for everything because it became the buzzword to use

#

e.g. self driving cars also use ML

#

but people just say AI because that's the only word people understand these days

pine willow
#

But yeah it doesnt say asia if the person in the Image squints

earnest phoenix
earnest phoenix
#

can't find a good picture tbh

pine willow
earnest phoenix
#

apparently called slanted eyes gesture

pine willow
#

None of them got detected as asian

#

Maybe because its a bad Image

green kestrel
#

I'm curious what it'll do

pine willow
#

but sure