#development

1 messages · Page 257 of 1

stuck dawn
#

sera que é o elemento current-display?

#

o current-report é a area dinza, mas o current-display é o pai do current-report

#

e só tem o width: 100%

lyric mountain
#

ele era o q era pra ter flex: 1

stuck dawn
#

mas com este numero da lista

#

ele fica no tamanho normal

#

isso é que nao percebo

lyric mountain
#

numero da lista?

#

ata pera

#

citizen-list tem algum tamanho?

stuck dawn
#

essa quantidade de citizen-name

lyric mountain
#

ou vc deixou sem width?

stuck dawn
#

nao

#
.citizen-list {
          position: relative;
          width: 100%;
          max-width: 100%;
          display: flex;
          gap: 1%;
          overflow-x: scroll;
          overflow-y: hidden;

          &::-webkit-scrollbar {
            display: none;
          }

          .citizen-name {
            padding: .5% 1%;
            box-sizing: border-box;
            background-color: var(--mdt-focus-color);
            border-radius: 2vh;
            color: var(--mdt-primary-background);
            font-size: 1.4vh;
            display: flex;
            align-items: center;
            white-space: nowrap;

            .icon {
              flex-shrink: 0;
              width: 1.5vh;
              height: 1.5vh;
              background-color: var(--mdt-primary-background);
              display: flex;
              align-items: center;
              justify-content: center;
              border-radius: 50%;
              margin-right: 0.5vh;

              svg {
                font-size: 1vh;
                color: var(--mdt-focus-color);
              }
            }
          }
        }
lyric mountain
#

hm

#

só pra testar, coloca 1% de width e max-width

#

pra ver se vai encurtar ou ficar igual

stuck dawn
#

ele encurtou

lyric mountain
#

então n é isso

stuck dawn
#

mas se eu adicionar mais elementos

#

ou seja mais citizen-names

lyric mountain
#

ele aumenta?

stuck dawn
#

ele aumenta o container e expande o pai

lyric mountain
#

ta, então é isso parece

stuck dawn
lyric mountain
#

a caixa preta onde ele ta, como ta o tamanho?

stuck dawn
#

esse é o estilo dela

width: 100%;
        height: 13%;
        background-color: var(--mdt-primary-background);
        border-radius: 2vh;
        display: flex;
        flex-direction: column;
        gap: 10%;
        padding: 2% 2%;
        box-sizing: border-box;
        flex-shrink: 0;
lyric mountain
#

tenta com flex-grow: 0;

stuck dawn
#

igual

lyric mountain
#

mas q caraio kkkk

stuck dawn
#

tou tipo há 3h tentanto resolver

lyric mountain
#

to achando q pode ser o padding/margin

#

o tamanho extra é exatamente a soma dos paddings

#

se for, subtrai o padding dos widths

#

tipo, width 96%

stuck dawn
#

nao me parece que seja isso

lyric mountain
#

hm

#

por isso achei q fosse

#

mas experimenta tirar tds os paddings de dentro do container cinza só pra ver

stuck dawn
#

nada

#

continua igual

lyric mountain
#

tenta fzer como diz na resposta pra ver se funciona

stuck dawn
#

nao percebi a resposta 😂 eu nsei se tem haver com o meu bug

#

é suposto eu fazer o calc 100% + 100%

#

ah acho que tem de ser o padding ne

#

2x o padding

#

mesmo assim

#

coloquei width: calc(100% + 8%); mas nao funciona

lyric mountain
#

ve a primeira resposta

#

n a aceita

stuck dawn
#

consegue ir privado?

lyric mountain
#

da pra ir, mas pq?

earnest phoenix
#

this api thing too hard ;((

lyric mountain
#

if you give up that fast then you wont go far

wheat mesa
# earnest phoenix this api thing too hard ;((

Keep in mind that you’ve just been trying for 2 days on a concept that takes a lot of time to master. Programming is not easy and neither is researching how to solve a problem, but it is very rewarding when you figure it out

earnest phoenix
#

how do i get a free domain

lyric mountain
#

you dont, at least not if you want those domains to be usable in any service

#

and not be flagged by literally anything

subtle hearth
#

stares at you judgementally

subtle hearth
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
earnest phoenix
#

.tech, .live and .me

pearl trail
#

first image is with next's Image
second image is with native img
hmmmmm

earnest phoenix
#

iirc it optimizes images hence compresses them

wheat mesa
#

Yeah, anything web-related usually tends to compress images since that’s a major source of slow load times

pearl trail
#

that's fair, but it only did it with 2 out of 8 images i have

earnest phoenix
#

2 out of 8 were worth the compression

pearl trail
#

dont freak out i'm trying to make this

#

i never tried canvas on react so yuh

#

that's my way

lyric mountain
#

ya making a tamagotchi?

pearl trail
#

lmao, kinda, except this is not a game

queen needle
#

whatever it is it's cute

feral aspen
#

Should a CE major start with learning C++?

wheat mesa
#

Learn C first

last tapir
#

doesnt it depend from uni to uni

wheat mesa
#

C is going to be more useful in the grand scheme of things because it’s more popular for embedded systems. C++ is fine too but if you know C, you’ll know C++ pretty quickly after that

#

Most universities are going to make you write C for a CE major, at least to start with

feral aspen
#

& their entire Programming I course is an absolute joke. christmasthink

wheat mesa
#

You can learn C++ first then, but you’ll eventually want to learn C anyways

#

They’re not very far off from each other as the names suggest, learning 1 will teach you parts of the other

feral aspen
wheat mesa
#

I never officially “learned” C, but I am comfortable enough with C++ that I am relatively comfortable with C

#

C++ has more features (templates, a stdlib, classes, inheritance, etc) but almost all C code is legal C++ with some exceptions

feral aspen
wheat mesa
#

If it makes you feel any better I’m taking a senior level course right now and some of the kids only know python

feral aspen
wheat mesa
#

No

#

I’m just in some senior level courses because I speedran university

feral aspen
wheat mesa
#

Some don’t either here

#

I just go to a mid tier school that accepted all 42 transfer credit hours I had

feral aspen
#

You enter the uni, study syllabus as is (no words said) and that's it

wheat mesa
#

by the end of the semester I'll be a senior

#

But I'll only have been at this school for 3 semesters

feral aspen
wheat mesa
#

I took not a lot

#

I did a lot of dual credit courses at my local community college

#

I think I had 19 credit hours from AP and 23 from community college

feral aspen
wheat mesa
#

I got a whopping 8 credit hours from calc BC

#

That class and AP Comp Sci A are the best classes I took for value

feral aspen
wheat mesa
#

Yeah it counts as calc 1 and 2

feral aspen
wheat mesa
#

CSP is useless ngl

feral aspen
#

Instead, I was assigned AP CSP, fully theory.

wheat mesa
#

I'll be so real with you

#

College for comp sci is actually useless

feral aspen
wheat mesa
#

The degree is the only thing that matters

#

I do not pay attention in any of my classes anymore and I've just been trying to score internships

feral aspen
feral aspen
wheat mesa
#

I don't have many connections in the industry but I overcompensated for that by having impressive projects when I was in high school

#

I got my first internship about 2 months ago, now I'm chasing about 4 others

feral aspen
wheat mesa
#

Expecting an offer from 1 within the next week or so, then the other 3 are going to depend on how well I do in the interviews and such

#

Yeah

#

It was a massive grind

#

But worth it, now I feel like I'm actually doing something in my career that isn't school

feral aspen
#

For context, I'm currently freshman year, but everyone's clueless about CS/CE except me.

wheat mesa
#

You'd be surprised how little other people tend to know in CS and programming in general

#

I feel like a lot of people do CS because it makes a lot of money, not because they have passion for it

#

If you have passion, that'll set you apart from everyone else

feral aspen
wheat mesa
#

That's the CS pipeline

feral aspen
wheat mesa
#

Discrete math is a good filter class

#

People start to realize how cooked they are when they do discrete math for the first time

#

I thought I was cooked but it turns out I had a shitty prof because I scored almost a 100% in my discrete math 2 course

feral aspen
#

"what do you know about coding" - "nothing really", "what's a variable" - "what". 😭

wheat mesa
#

People like to exaggerate what they know

#

You'll start to see people in your classes that have superiority complexes and ask questions to the professor that they already know the answer to so they can get validation

#

It's really annoying

#

Computer engineering might have less of that since that is harder than CS as a major

feral aspen
wheat mesa
#

But you'll still have at least 1 person in every class that acts like that

feral aspen
wheat mesa
#

There was a kid in my senior level class that bragged about knowing 2 programming languages

#

If anything by that point you should know more than 2 languages as a CS major

feral aspen
wheat mesa
#

Honestly I don't think it's much of a flex

#

After 2 languages it's really easy to learn more

feral aspen
wheat mesa
#

I "know" like 9 or 10 or something like that, but I wouldn't call myself a master in all of those

feral aspen
#

I'm currently studying over 5 and it's not fun

feral aspen
wheat mesa
#

I think my current list is like
Rust, C++, C, Java, JavaScript, Go, TypeScript, Python, and C#

#

I kinda know some dart but I wouldn't say that I know enough to be comfortable with it

feral aspen
wheat mesa
#

What I really need to do is learn a FP language like F# or Haskell

#

That would broaden my horizons

feral aspen
wheat mesa
#

Surprisingly I'm going to be learning a functional language in one of my classes

#

I think it's based on scheme

#

called Racket

feral aspen
#

ffs... I haven't even begin programming courses

#

The uni's making me finish their required courses

wheat mesa
#

Welcome to uni

#

Thankfully I'm done with that part because of AP classes and I opted to do summer courses at my community college

feral aspen
wheat mesa
#

Did 13 credit hours in 1.5 months at community this summer, was brutal but I'm glad I did it

feral aspen
wheat mesa
#

Yeah I had to take government first semester

feral aspen
feral aspen
wheat mesa
#

Yeah, Texas

feral aspen
#

Ah, thoughts on masters there?

wheat mesa
#

Depends on what you want to do and what your job prospects look like

feral aspen
#

Cybersecurity Masters

wheat mesa
#

If you want to go into something theory-heavy or with labs and such, go for it

#

ehhhhhh

#

If you're really passionate sure

feral aspen
feral aspen
wheat mesa
#

Cybersecurity can pay very well but I'd be careful, focus on making projects and getting internships. I know grad students that can't find a job because they were too focused on school to ever build anything on their own

#

I'm thinking about doing a masters but ONLY if I don't have a job offer following my bachelor's. But that's because I would only need 1 year to finish my masters at that point

feral aspen
wheat mesa
#

Build something from the ground up. Show companies that you are capable of going from an idea to a finished product

#

But also don't forget to socialize and have a little bit of fun. My university is so depressing because nobody does that and it's all just about classes 24/7

feral aspen
#

We have events, dw~ if they're ever managed properly

earnest phoenix
sage bobcat
earnest phoenix
#

i made an api but ion know how to use it for my bot :/

pearl trail
#

as simple as fetch or axios.get if you are in js

#

unless in golang/c#/java... KEK

lyric mountain
#

Even in java it's fairly simple, ur not really supposed to use httprequest

#

Tho I still make a global function to have a one-liner

#

I blame java not having a native json class

pearl trail
#

use dependency? or is there a native way beside httprequest?

lyric mountain
#

Dependency yeah, java gives the tools as barebones as possible

#

Somewhat the same case as fetch and axios

#

Openjdk could develop a better replacement, but I doubt it's be better than what apache/square give, they've been working at it for years by now

#

In case ur curious, Http from apache and Okio from squareup

#

Think about httprequest as the last resort, no-dep option when being minimalist is paramount, at the cost of QoL

#

Tho it did become more streamline after streams were added

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
         .uri(URI.create("http://foo.com/"))
         .build();
client.sendAsync(request, BodyHandlers.ofString())
         .thenApply(HttpResponse::body)
         .thenAccept(System.out::println)
         .join();

We used to use HttpUrlConnection which...was bad, thing wasn't updated since java 1

radiant kraken
#

🤢

lament rock
#

using any lib other than the built in http lib or fetch is kinda cringe in js

radiant kraken
#

though you are insane if you use the built-in http lib instead of fetch

neon leaf
#

Well the main reason people use axios is because of all the additional parsing it can do

#

(and because they use old node versions)

pearl trail
pearl trail
radiant kraken
pearl trail
#

said someone who use rust

radiant kraken
#

nah

radiant kraken
#

very useful documentation™️

#

@pearl trail aww C added a little emoji next to my text 😍

pearl trail
#

average c experience

wheat mesa
#

I love how even printf is a vulnerability 😍

radiant kraken
#

pov: you forgot to null-terminate a string with *output = 0;

wheat mesa
#

printf is a vulnerability if you directly feed user input to it

#

Because if the user feeds %p %p %p… it’ll print out addresses on your stack

radiant kraken
#

wait fr?

wheat mesa
#

Yup, try it

#

If you pass the user argument to the first part of printf that is

radiant kraken
#

like ```c
char text[] = "%p %p %p";

printf("%s\n", text);

wheat mesa
#

No that’s safe

radiant kraken
#

oh

wheat mesa
#

Feeding text to the first argument would be vulnerable

#

But that’s an easy mistake to make

radiant kraken
#

why would you even pass a non-string-literal to the first argument

#

that's dumb

wheat mesa
#

Because you’re just printing out some user input

radiant kraken
#

then i get why that's a vulnerability

wheat mesa
#

Maybe even for debugging purposes

radiant kraken
#

it's like sql injection

wheat mesa
#

Yup

#

It’s crazy how like 90% of the C stdlib functions are insecure

#

Aka anything to do with strings

#

Which is partially a design flaw of C strings themselves but still

radiant kraken
#

UNLIKE RUST WHICH IS ALWAYS SECURE, MEMORY-SAFE, AND BLAZINGLY FAST 🔥🚀

wheat mesa
#

Rust String goated 💪

radiant kraken
#

OH AND ALSO UTF-8 SUPPORT 🗣️🔥

#

jokes aside i still love C regardless

#

i love the notion of being able to manipulate bytes manually ❤️

#

memcpy() and memset() my beloved

wheat mesa
#

I like the low level aspect of it but the security of it is really annoying

#

If I had to actually write safe code then I would not go with C

#

It requires too deep an understanding of every standard function, in terms of knowing the exact behavior of each function and how to use it in such a way that it’s safe

radiant kraken
#

like golang

wheat mesa
#

That’s not the only concern

#

Buffer overflows are everywhere in C

radiant kraken
#

gotta love them

wheat mesa
#

If C’s only flaw was null pointers then it would be a much better language

radiant kraken
#

so uh

#

java?

wheat mesa
#

Java is a great language aside from the performance penalties you incur

radiant kraken
#

C scanf regex my beloved

eternal osprey
neon leaf
#

does it matter?

eternal osprey
#

yeah

#

because then i need to remove .default from each import manually

#

example:
import moment from 'moment-timezone'

neon leaf
#

🧐

eternal osprey
#

now the whole code will have moment.default.property_to_be_called

neon leaf
#

I mean yeah you are transpiling to cjs

pearl trail
#

never heard that issue with ts

eternal osprey
#

and that does not work, i must remove the .default like a morron.

neon leaf
#

its just what ts does for cjs

#

you can always add a comment to ignore the next line and keep it as-is

eternal osprey
#

so there's no way at all to remove the .default?

neon leaf
#

you can switch to esm output

#

but that may break everything

cloud cipher
#

Hello, I need help! When I create a bot, the bot is immediately deleted

solemn latch
#

?

cloud cipher
#

Yes

#

@solemn latch

solemn latch
#

Are you getting emails from discord explaining why?

#

Discord doesnt typically delete bots without sending you some form of message, typicall in an email

cloud cipher
#

on my old account, the bots I opened were never deleted back, this is the first time something like this has happened to me

solemn latch
#

Then I'd reach out to discord support

eternal osprey
#

yo what's happening with dc

#

i cannot have more than 1 account open lol

warm surge
#

simple

quartz kindle
wheat mesa
#

that's what sql transactions are for

lament rock
#

@solemn latch

solemn latch
#

what the

#

the real mee6

lament rock
#

Totally

#

thank

lyric mountain
#

It...depends, if you didn't close the connection yet then it MIGHT be reversible

#

Tho tbh it tends a lot towards the "no"

#

All in all why the hell don't u have backups

#

Less worse then ig

#

Do set backups, cron makes it so easy

#

All u need is a pg_dump script

#

Then u can make it scp to your pc if you must

#

To have it in a safe place

lament rock
#

Transactions

#

You can rollback a transaction before you commit it

#

Transactions are usually reserved for millions of row insertions though

raven nexus
#

Hi i need help

const { ActivityType } = require('discord.js');
const fs = require('fs');
const path = require('path');

module.exports = (client) => {
    const restartFilePath = path.join(__dirname, '..', 'lastRestart.txt');

    function logRestartTimestamp() {
        const now = new Date().toISOString();
        fs.writeFileSync(restartFilePath, `Last Restart: ${now}\n`);
    }

    let shardsReady = 0; // Variable to track the number of ready shards

    client.on('ready', async () => {
        const shardId = client.shard ? client.shard.id : 'Main';

        console.log(`Client - Logged in as ${client.user.tag} on shard ${shardId}`);

        // Log restart timestamp
        logRestartTimestamp();

        // Set the initial status to "Loading..."
        client.user.setActivity('Loading...', { type: ActivityType.Watching });

        // Increment the shard count when this shard is ready
        shardsReady++;
        console.log(`Shard ${shardId} is now ready. Total ready shards: ${shardsReady}`);

        // If in sharded mode, you can handle shard-specific logic
        if (client.shard) {
            // When all shards are ready, update status
            client.shard.on('ready', () => {
                console.log(`Shard ${client.shard.id} is now ready. Total ready shards: ${shardsReady}`);
                updateTotalMembersStatus();
            });
        } else {
            // Update the status if running in non-sharded mode
            updateTotalMembersStatus();
        }

        // Initial status update
        updateStatus();

        // Update status every 15 minutes (900000 milliseconds)
        setInterval(updateStatus, 900000);
    });

    function updateTotalMembersStatus() {
        const totalMembers = client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0);
        client.user.setActivity(`Serving ${totalMembers} members`, { type: ActivityType.Watching });
    }

    function updateStatus() {
        const totalMembers = client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0);
        client.user.setActivity(`Members: ${totalMembers}`, { type: ActivityType.Watching });
    }
};

how could i fix this?

desert oak
#

I know it's weird being plural. That should fix your undefined issue in the logs.

desert oak
raven nexus
desert oak
sharp geyser
#

I really really hate docker

#

Trying to have a container access a pg db that isn't behind docker seems to be more annoying than it should be

pearl trail
#

i love C

pearl trail
neon leaf
#

Or use the public IP of the host system

#

If the Pg db is exposed

digital swan
#

why on earth does the text not get cut off with an ellipsis 😔

neon leaf
#

you need to set its width

digital swan
#

doesnt work

neon leaf
#

what did you set the width to?

digital swan
#

w-10

#

40px

#

had no effect

neon leaf
#

did you make sure to add it on the h3

digital swan
#

on all of them

neon leaf
#

weird

digital swan
#

adding overflow-hidden works

#

weirdly

#

but the flex child just expands without an explicit width

#

i hate css

pearl trail
#

if yes, why dont you use truncate

digital swan
#

i didnt know of it

#

ty

digital swan
pearl trail
#

good to help

eternal osprey
#

hey guys, so i have a program that uses the fnostack protector or whatever it is called, so basically it uses canaries.
The program DOES use gets though, is there any way to still be able to change the return address?

#

i tried a buffer overflow and all it says is illegal instruction..

desert oak
# raven nexus i have set it to auto

Then discord will create the number of shards it seems necessary for your bot on startup, and assign servers automatically. If it's not on a lot of servers, then it will create one shard numbered "0"

quartz kindle
#

auto will give you 1 shard until you go past 1500 servers

warm surge
lyric mountain
#

yes

earnest phoenix
#

is this a good logo for my bible bot?

pearl trail
#

is that AI generated

lament rock
#

The Discord logo that's 50 shades of fucked is a dead giveaway

lament rock
#

You obviously dont have to make something biblically accurate but :(

earnest phoenix
#

u think im designing a logo

dreamy badger
# earnest phoenix u think im designing a logo

It's kinda a bad representation for your bot to be honest. "I don't wanna design a logo. But i'll let a machine do it for me" As a user I would be put off by that. Personally I just use something like "Canva" which is good for me since I have no background in graphic design and it looks okay

pearl trail
#

I agree

deft wolf
#

AI generated code, AI generated logo. What else can be generated with AI to make literally an entire bot made by AI

pearl trail
#

AI generated vps /s

honest slate
deft wolf
#

If only AI could generate free 24/7 hosting, preferably with 4 processor cores and at least 8GB of RAM. The world of bot developers would then be a real idyll

desert oak
deft wolf
#

Sooo... I just need to find someone with a 3D printer to print my own 3D printer so I can make components and assemble servers that I can then rent out to unsuspecting Discord users bigbrain

desert oak
deft wolf
sharp geyser
#

it might not be 24/7

#

Also whether or not you have a battery keeping the excess power stored when its night time / when sun is not really out

quartz kindle
#

but it will not change shards while running, you have to restart it to make it check that again

hushed patrol
#
<style>
iframe {
  border: 1px solid black;
  width: 100%; /* takes precedence over the width set with the HTML width attribute */
}
.css-1ghqurz {
border-radius: 50% !important;
    border: 3px solid gold;
   }
.chakra-link.chakra-button.css-u2j4ww {
  background: red;
  animation: glow 1s ease-in-out infinite alternate;
}

.chakra-button.css-hon801 {
  background: #85C888;
  animation: glow3 1s ease-in-out infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px red;
  }
  100% {
    box-shadow: 0 0 5px red, 0 0 10px red, 0 0 20px red;
  }
}

.chakra-link.chakra-button.css-qy8lgb {
  background: blue;
  animation: glow2 1s ease-in-out infinite alternate;
}

@keyframes glow2 {
  0% {
    box-shadow: 0 0 5px blue;
  }
  100% {
    box-shadow: 0 0 5px blue, 0 0 10px blue, 0 0 20px blue;
  }
}  

@keyframes glow3 {
  0% {
    box-shadow: 0 0 5px #65BA69;
  }
  100% {
    box-shadow: 0 0 5px #65BA69, 0 0 10px #65BA69, 0 0 20px #65BA69;
  }
}    

  

.page__PageContentWrapper-sc-iv577v-0.iidttR{
    width: 100%;
    height: 100vh;
    overflow: scroll;
    overflow-x: hidden;
    background-repeat: no-repeat;
    background-size: cover;
    scrollbar-width: none;
}

.page__PageContentWrapper-sc-iv577v-0.iidttR::-webkit-scrollbar {
    display: none;
}

body{
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

#menu {
    background: transparent;
}
   
.chakra-text.css-rd8i1m {
color: #00c9f9;
}
.transparentCover {
display: none
}
</style>
# Commands
moderation command
fun command
welcome system
leveling system
and many more
<iframe  id="inlineFrame" title="TryHard's Commands Page" width="300" height="200" src="https://tryhard.up.railway.app/commands" />
# What I Am Currently Doing
improving my dashboard and making the bot's commands better and trying to promote it as much as possible```
the ifram doesn't show, any idea why?
deft wolf
#

Can you add a new line between "and many more" and "<iframe"

#

Weird, looks like you can't have anything after iframe for some reason too

deft wolf
#

Front end is weird af

hushed patrol
#

ikr

#

nothing worked

#

I removed the lines after the iframe

#

and added a line between and many more and the iframe

quartz kindle
hushed patrol
quartz kindle
#

like <h2>commands</h2>
<p>moderation, fun, ... </p>
<iframe>

hushed patrol
#

ah

#

ok wait

#

still no iframe

#

well I guess it's a bug then

#

this is for coding help

quartz kindle
hushed patrol
#

oh

#

no wait

#

I'll check live

quartz kindle
#

its showing up for me

hushed patrol
#

yeah now it does

#

thanks!

lyric mountain
small tangle
#

Its working :D im sending docker events via webhook

earnest phoenix
#

how can i improve this embed

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

wut

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

nuh

sharp geyser
#

?

pearl trail
lyric mountain
#

Nuh uh

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wooden ember
#

I'm still salty about those cuz they changed the colours for md and it looks so bad now.

surreal sage
#

cry....

pearl trail
#

anyone know what's wrong here?

#

ooo oke got it, i need to make the player array a pointer

surreal sage
#

hi chat

#

what's the best way to make async push() wait for the result from the callback

#

actually i have an idea

lyric mountain
#

why are those async?

surreal sage
#

hold onnn

surreal sage
lyric mountain
#

push doesnt really need a return value, and promises.push doesnt need to be inside a promise

#

push is supposed to be an add operation

surreal sage
#

seems like i have to rename the push method

#

idea is that it waits for the callback return value

lyric mountain
#

make it async then and remove the outer promise

#

but well, why do u need the callback value for a queue?

surreal sage
#

uh

#

say a slash command makes multiple http requests that have rate limits
i want to have e.g. 5 seconds between those http operations so the rate limits arent a problem

#

push to queue, wait for return value, end slash command

lyric mountain
#

it's a bucket then

surreal sage
#

renaming the class to that..

lyric mountain
#

so, you can simply do ```js
async push (item: T) {
const p = new Promise((resolveRunner) => {...});
this.promises.push(p);
return await p;
}

surreal sage
#

doesn't await p run the promise?

lyric mountain
#

yes

#

u dont want to?

surreal sage
#

that beats the point of the bucket

#

let me excalidraw

lyric mountain
#

ah right, then u can just return the promise itself

#

return p

#

if it gets completed from another place it'll return the value to awaiters

surreal sage
#

if i do that

#

then it gets like

#

run immediately

#

afaik

#

idk

#

doesnt seem to be working anyhow

#

oh im stupid

#
  1. im not pushing it to this.promises
#

question is

#

why did it run the promise anyhow

lyric mountain
#

perhaps you'll need to make your own task object

quartz kindle
#

how are you running the promise?

surreal sage
quartz kindle
#

like, what is the class supposed to do?

surreal sage
#

im so bad at explaining

#

shit

lyric mountain
#

it's supposed to be a rest bucket so they dont hit ratelimits

quartz kindle
#

like just show an example of the class being used in code

lyric mountain
#

basically a task scheduler

surreal sage
#

looks like it works (but does it?)

quartz kindle
# surreal sage

so basically you do new Bucket(function, n)
and then you do bucket.run()
and then it runs the function, but it only allows it to run n times concurrently?

#

im still trying to understand exactly what its supposed to do lol

#

oh wait run() is private, so you call bucket.wait()

surreal sage
#

renamed some vars

#

lemme send completed code

#
type Callback<I, R> = (item: I) => R | Promise<R>;

export default class Bucket<I, R> {
  public blocking: boolean = false;

  public promises: Array<Promise<void>> = [];

  public callback: Callback<I, R>;

  public idle: number;

  constructor(callback: Callback<I, R>, idle: number = 0) {
    this.callback = callback;
    this.idle = idle;
  }

  public async runScheduler() {
    this.blocking = true;

    while (this.promises.length > 0) {
      const runnerPromise = this.promises.shift();
      if (!runnerPromise) continue;

      await runnerPromise;

      if (this.idle > 0)
        await new Promise((resolveIdle) => {
          setTimeout(resolveIdle, this.idle);
        });
    }

    this.blocking = false;
  }

  public scheduleAndWait(item: I) {
    const { promise, resolve, reject } = Promise.withResolvers<R>();

    const runnerPromise = new Promise<void>((resolveRunner) => {
      Promise.resolve(this.callback(item))
        .then(resolve)
        .catch(reject)
        .finally(resolveRunner);
    });

    this.promises.push(runnerPromise);

    if (!this.blocking) this.runScheduler();

    return promise;
  }
}```
quartz kindle
#

damn i didnt know about Promise.withResolvers

#

thats so damn good to have

surreal sage
#

so much cleaner code

quartz kindle
#

i assume callback is an async function right?

surreal sage
#

async or normal yes

#

hence the promise resolve

quartz kindle
#

the moment you do this.callback() that function will start running regardless

#

if you dont want that, you need to check for this.blocking before that

surreal sage
#

oh true..

#

wait

#

no

#

the this.callback is inside a promise's function

quartz kindle
#

its still gonna run

#

code inside a Promise is still sync, until it isnt

surreal sage
deft wolf
#

What

surreal sage
#

??

quartz kindle
#

there is nothing like promise.run()
the moment you do new Promise(), its contents will already run, like a self invoking function

deft wolf
#

Another support scam attempt? Thonk

surreal sage
#

ok guess im making it uh

#

callback functions

#

instead of promises

#

in the array

#

thank u tim

quartz kindle
#

basically yeah, promises are like fancy callbacks

surreal sage
#

callbacks that you dont know when will finish

#
/* eslint-disable no-await-in-loop */

type Callback<I, R> = (item: I) => R | Promise<R>;

export default class Bucket<I, R> {
  private blocking: boolean = false;

  private bucket: Array<() => Promise<void>> = [];

  private callback: Callback<I, R>;

  private idle: number;

  constructor(callback: Callback<I, R>, idle: number = 0) {
    this.callback = callback;
    this.idle = idle;
  }

  private async runScheduler() {
    this.blocking = true;

    while (this.bucket.length > 0) {
      const runnerPromise = this.bucket.shift();
      if (!runnerPromise) continue;

      await runnerPromise();

      if (this.idle > 0)
        await new Promise((resolveIdle) => {
          setTimeout(resolveIdle, this.idle);
        });
    }

    this.blocking = false;
  }

  public scheduleAndWait(item: I) {
    const { promise, resolve, reject } = Promise.withResolvers<R>();

    this.bucket.push(
      () =>
        new Promise((resolveRunner) => {
          Promise.resolve(this.callback(item))
            .then(resolve)
            .catch(reject)
            .finally(resolveRunner);
        }),
    );

    if (!this.blocking) this.runScheduler();

    return promise;
  }
}

yippee

deft wolf
quartz kindle
#

yeah that should work

#

a bit overengineered xD

lyric mountain
#

so much for a ```java
var cbk = new CompletableFuture<Integer>();
tasks.add(cbk);
var value = cbk.get();

...
// somewhere else
for (var t : tasks) {
t.complete(123);
}

lament rock
#

This is the implementation I've worked on for some time and found works.

surreal sage
#

80 lines so long

lament rock
#

Its rather customizable and functional

#

That's what I needed for the lib

#

Only issues I've had is when the routify regex fails which is totally unrelated to the bucket impl

#

Need to fix eventually but I just stole the regex from eris

earnest phoenix
#

can someone help me with a python cmd

lyric mountain
#

Ask the question, no need to ask to ask

earnest phoenix
#

idk how to make a command to enable the qotd. which would send at a certain time each day in a selected channel if its enabled

neon leaf
#

@solemn latch

earnest phoenix
#

@solemn latch

lament rock
#

If you want it at a specific time, set a timeout to wait until it reaches that time

#

then enable a loop

earnest phoenix
#

wut

lament rock
#

whats so confusing

wheat mesa
#

You can also use a cron job, but that’s more complex than what @lament rock suggested

#

cc @earnest phoenix

earnest phoenix
#

im going off my api

#

i js gotta fetch the data and send it at a certain time as long as its enabled

lament rock
# earnest phoenix i js gotta fetch the data and send it at a certain time as long as its enabled

Here's a flow that should make sense:
If the time isn't right, set up a timeout to wait until the time you want to send the quote (if the time is negative, just assume the quote was already sent)
when the timeout is reached if any, send the quote then set up an interval to do that every 1 day.

In the body of the send quote function, get the quote, filter servers by which have the qotd enabled, send to a channel for each server if any.

chrome quest
#

i did


axios.post('https://top.gg/api/bots/1134246383587688488/stats', 
  {
    server_count: 18200
  }, 
  {
    headers: {
      'Content-Type': 'application/json',
      'Authorization': ''
    }
  })
  .then(response => {
    console.log(response.data);
  })

yet it still shows as 0. It just returned {}.

lyric mountain
chrome quest
#

but with {}

chrome quest
#

it works now

lyric mountain
#

but yeah, topgg has cache issues with a lot of things, usually just ctrl + f5 is enough to see your changes

earnest phoenix
#

i cant figure it out

lyric mountain
#

what is your current progress?

lament rock
#

That's about as much as I'd be willing to elaborate on the logic behind what I do for donor payments for my bot for example

#

which is weekly

lyric mountain
#

honestly all that's needed is setTimeout + database, or even crontab which will make the messages be sent precisely at the same time everyday

#

ah, nvm, you and waffle both suggested those already

lament rock
#

They mentioned they're using python as well iirc

lyric mountain
#

py has an equivalent to setimeout

lament rock
#

I figured as much. Or rather I would sure hope so

lyric mountain
#

nvm py2 docs

#

but I imagine it still exists in 3

solid isle
tough condor
#

( ps. @lyric mountain @lament rock he's using AI to code the majority, if not all his API, he's new to Python )

lament rock
#

That would explain it

raven nexus
#

Hi, may i know did i do anything wrong? it dont show any alert

// memberJoin.js

module.exports = (client) => {
    client.on("guildMemberAdd", async (member) => {
        const LOG_CHANNEL_ID = '1294785149380202637';

        try {
            // Fetch the log channel
            const channel = await client.channels.fetch(LOG_CHANNEL_ID);

            if (channel) {
                // Prepare the join message with a pink theme and emojis
                const embedMessage = {
                    content: `🌸 **Welcome to the Server!** 🌸`,
                    embeds: [
                        {
                            color: '#FF69B4', // Pink color
                            title: `🎉 New Member Joined!`,
                            description: `> Welcome, **${member.user.tag}**!\n> We're excited to have you with us!`,
                            thumbnail: {
                                url: member.user.displayAvatarURL({ dynamic: true })
                            },
                            fields: [
                                { name: '👤 Username', value: member.user.tag, inline: true },
                                { name: '🆔 User ID', value: member.user.id, inline: true },
                                { name: '📅 Joined Server On', value: `<t:${Math.floor(member.joinedTimestamp / 1000)}:F>`, inline: false }
                            ],
                            footer: { text: `Member #${member.guild.memberCount} in ${member.guild.name}` },
                            timestamp: new Date()
                        }
                    ]
                };

                // Send the message to the log channel
                await channel.send(embedMessage);
            } else {
                console.error(`Channel with ID ${LOG_CHANNEL_ID} not found.`);
            }
        } catch (error) {
            console.error('Error handling guildMemberAdd event:', error);
        }
    });
};
earnest phoenix
#

how do i advertise my server, bot, and api

pearl trail
#

try asking AI

deft wolf
#

Rude

pearl trail
#

sorry 😔

gilded anvil
gilded anvil
quartz kindle
raven nexus
deft wolf
#

Are you sure you have the correct intents enabled?

quartz kindle
#

or the place where you create a new client?

raven nexus
#

the event thing i use the same which the one same with my bot

quartz kindle
#

you need to add the GUILD_MEMBERS intent to your client

raven nexus
#

GatewayIntentBits.GuildsMembers?

quartz kindle
#

yes

raven nexus
#

is there like a way to list all intent?

quartz kindle
#

you can do like console.log(Object.keys(GatewayIntentBits)) if you want to list them all

#

or if you want to apply them all, you can do intents: Object.values(GatewayIntentBits)

deft wolf
#

The documentation probably has them too, the documentation has everything

raven nexus
#
const client = new Client({
    intents: Object.values(GatewayIntentBits)
});```

like this?
quartz kindle
#

here is the full list

raven nexus
#

embeds[0].color[NUMBER_TYPE_COERCE]: Value "#FF69B4" is not int.

#

is this color error?

deft wolf
#

Try 0xFF69B4 instead if you are using discord.js v14

solemn latch
chrome quest
earnest phoenix
solemn latch
#

Hi ^-^

quartz kindle
#

hi woo

earnest phoenix
deft wolf
#

hi woo

quartz kindle
warm surge
#

lmao

earnest phoenix
#

how do i add a description to this

#

?

#

library?

#

wut

earnest phoenix
earnest phoenix
#

because for the programming language x and library y it will be different than the programming language a and library b

earnest phoenix
earnest phoenix
#

i can send the script

#

how did you even code it if you have no idea what you're doing?

#

copy pasted?

#

good thing you have the active "dev" badge though

earnest phoenix
#

built off it with chatgpt

#

simple

#

share the part of the command

#

how do i put it in a codeblock

#

...

#

```
code
```

#
@bot.slash_command(name="verse", description="Fetches a Bible verse by reference.")
async def fetch_bible_verse(interaction: Interaction, reference: str):
    data = await fetch_data_from_api(f"https://praxis.multiple-uses.site/verse?ref={reference}")

    if data and data.get("text"):
        verse = data["text"]
        ref = data["reference"]

        # Create an embed for the Bible verse
        embed = nextcord.Embed(
            title="📖 Bible Verse",
            description=f"**{verse}**\n\n**{ref}**",
            color=nextcord.Color.from_rgb(31, 86, 149)
        )
        embed.set_thumbnail(url="https://i.ibb.co/nR7Wv5J/logo.png")
        embed.set_footer(text="Powered by Praxis API")

        # Send the embed response
        await interaction.response.send_message(embed=embed)
    else:
        await interaction.response.send_message("Sorry, I couldn't find that verse.", ephemeral=True)
#

and what's in the requirements.txt file

#

i dont have anything in it yet

#

im js making it in replit

#

then puttting it in a host

sharp geyser
#

😔

earnest phoenix
#

and what's at the top of the file

#

what imports

#

import nextcord
from nextcord.ext import commands, tasks
import os
import json
import asyncio
import requests # Add requests for API calls
from nextcord import Interaction # Corrected import for Interaction

#

Either use docstrings or set the option to

reference: str = nextcord.SlashOption(description="....")
#

where do i put that

#

As I said, set the option to that

#

Look where you have something similar and replace it

#

Also consider learning python, discord bots are not meant for beginner neither people that can just use chatgpt or whatever else shitty ai

#

nextcord, the library used in your case, is not a library meant for beginners

#

im pro!

#

im still lost on where to put it

#

is it so hard to ctrl+f

earnest phoenix
#

sooo

#

do i replace the whole line

#

or just add it on

earnest phoenix
#

async def fetch_bible_verse(interaction: Interaction, reference: str = nextcord.SlashOption(description="eg. John 3:16"))

#

like that

#

?

#

try it and see

#

i did

#

keeps showing errors

#

async def fetch_bible_verse(interaction: Interaction, reference: str = nextcord.SlashOption(description="...."))
File "/home/runner/Praxis-Bot/main.py", line 99
async def fetch_bible_verse(interaction: Interaction, reference: str = nextcord.SlashOption(description="...."))
^
SyntaxError: expected ':'

#

got it

atomic bone
#

how and where can i make a bot

digital swan
#

I heard you have to type some magic words into a computer but idk

lofty talon
#

A

lyric mountain
#

it never ends well, they always lose all the motivation and end up with a half-assed bot

#

it's time to stop, drop and roll to do it the right way

#

run a newbie's python course till you get what's what, then start build a bot, brick by brick

tough condor
gleaming niche
#

can you make a slash command that can only be used 3 times per user?

tough condor
gleaming niche
#

so there is no app_commands check for it? provided by discord.py

tough condor
gleaming niche
#

databases seem like a waste of time, when i could do it more simply, still learning code so

tough condor
gleaming niche
#

ok

tough condor
lament rock
#

Writes should be done when you are done with it totally like on process exit

tough condor
lament rock
#

I only use JSON to pickup where I left off on process restarts for ephemeral data. If they had it in such a way where they kept that data in memory for the time being and wanted to pick up after restarts that's fine, but people would build a reliance on JSON for what it wasn't made for. It isn't a db

lament rock
#

Most of the frequent proficient devs here would probably tell you similar stuff

lament rock
#

It's deep when people give amateurs advice that can lead to pitfalls

deft wolf
#

What a conversation

sharp geyser
#

speaks to my soul

#

Though I agree with mr Ophidian

#

Json is a terrible thing to recommend as a persistent database

quartz kindle
#

i used json db until 2000 servers

#

:^)

deft wolf
sharp geyser
pearl trail
eternal osprey
#

i used to always do that a few years back when i was getting spoonfed code

#

cant lie my go-to has become either sqlite or mysql.
I like the way that sqlite is basically plug and play lmao, but mysql needs like a whole structure, login, daemon etc running...
but i think it's more safe than just a local file you can accidentally delete

small tangle
#

I just use postgres, because its so simple to spin up a docker container

eternal osprey
#

hey @neon leaf

#

could you quickly add me as a friend i need to send you something in the dm

neon leaf
#

ok

lyric mountain
#

and dont be afraid to use databases, they're not highly expensive premium storage, they're just storage

eternal osprey
#

There is a change of race conditions though if 2 ppl interact with the same json at the exact same time, but at that point just implement a lock type shit.

digital swan
#

orrr spend 30 mins figuring out sqlite instead of trying to build a json database

eternal osprey
#

no but i get where they are coming from though

#

i was like this as well, it's just a human tendency to stay with the things you are familiar with and not go with 'hard' and 'scary new' options that may be better.

#

And for a small case project, it doesn't really matter

deft wolf
#

People seem to be "afraid" of databases for some reason kappalul

eternal osprey
#

yeah

radiant kraken
#

sql is scary

eternal osprey
#

it's because it's so different

#

sql is unlike all other languages.

lament rock
#

Sql is fun imo

#

I sucked at it at first but it was fun

lyric mountain
#

cant get simpler lmao

#

actually step 1 is optional even, most libs will create one if not found

eternal osprey
#

Sql is fun, overall working with data is fun.
Except for working with Hadoop. That shit is deadass fucked up.

#

Scala used by spark on the other hand is cool and allat, just don't like hadoop's way of fucking serialization and class objects.

limpid rain
#

Hi

covert brook
#

Oop

warm surge
#

why can it do it automaticly

covert brook
quartz kindle
#

you need to create a new session with a new shard count

#

since the shard count defines which guilds go to which shard, when the shard count changes the guilds also change

slender wagon
#

Guys i need some quick AI for a specific light task

#

Its supposed to put a link together on a certain message

#

In a way that i cant handle with regez

#

Regex*

#

Any suggestions?

hushed patrol
lyric mountain
slender wagon
lyric mountain
#

any example?

warm surge
#

Btw can you force another shard being added

quartz kindle
#

you cant change an existing session, but you can have multiple sessions running at once

#

you also dont need to have all shards in a session running, you can have a session with only certain shards running, leaving other shards offline

#

but how the guilds are spread through the shards will be different every time

warm surge
#

Ahh

quartz kindle
#

so you cant really mix sessions

#

for example running a 2-shard session at the same time as a 4-shard session, both sessions will have different guilds in shard 0 for example

warm surge
#

Hmm

quartz kindle
#

well, its not technically right to call it a sessoon

#

its basically just "i want to connect shard 0 out of 4" vs "i want to connect shard 0 out of 2"

#

it will be the same shard 0 but will have different guilds on it

small tangle
#

i rewrote almost 90% of one of our projects which made many things much better but now means that im responsible for it derpcat

quartz kindle
#

rip

pearl trail
#

in postgres, can I do INSERT INTO ........ RETURNING * ?

#

what i know it may working is INSERT INTO ......... RETURNING id

delicate zephyr
#

You can

pearl trail
#

nice to hear, thanks!!! :D

radiant kraken
small tangle
#

to respond with the created rows i assume

radiant kraken
#

what do you mean?

earnest phoenix
#

e.g. your id is a uuid generated, you insert and get the id back

#

let's say the user is on /products and creates a new product

#

it gets inserted, uuid generated and returned

small tangle
#

sometimes you want to know how many things were inserted or updated, RETURNING allows you to return that

earnest phoenix
#

then the client can directly go to /products/{uuid} without the backend having to select the last inserted row

radiant kraken
earnest phoenix
#

for example, yes

radiant kraken
#

interesting, never knew postgres could do that

earnest phoenix
#

many can?

radiant kraken
#

look i am not that deep into SQL lmao

earnest phoenix
#

e.g. mysql/mariadb have UUID() function

#

same for mongodb

small tangle
#

im just using auto increments

radiant kraken
#

why not just a unix timestamp and a random generated number bitwise OR-ed

earnest phoenix
#

because uuids have become a standard

radiant kraken
#

i understand that

small tangle
#

or auto increments :^)

earnest phoenix
#

meh, that's not really recommended

small tangle
#

why not

earnest phoenix
#

depends what you do though

pearl trail
#

having user id 1 is weird 💀

small tangle
#

the OG row

radiant kraken
#

lmaoo

#

@pearl trail what are you working on?

pearl trail
#

some simple media player

radiant kraken
#

media player?

#

like what kind of media does it play

pearl trail
#

imma think that later

radiant kraken
#

why the reaction?

lyric mountain
#

it may lead to hard to debug errors regarding column order in *

pearl trail
#

ooh, so it's just about order?

#

havent tried it yet but my guess that it can parse it correctly no matter the order is (?)

lyric mountain
lyric mountain
#

but it's a good standard to always be explicit about your columns when working with sql, merely because it's very predictable about what's doing what

pearl trail
#

oke, thanks for the advice!!

sharp geyser
#
2024/10/15 17:11:21 [error] 850#850: *14236 upstream timed out (110: Unknown error) while reading upstream, client: 172.71.30.169, server: , request: "POST /zitadel.admin.v1.AdminService/TestSMTPConfig HTTP/2.0", upstream: "grpc://127.0.0.1:8080", host: "auth.chimeralabs.sh", referrer: "https://auth.chimeralabs.sh/ui/console/instance/smtpprovider/generic/create"
2024/10/15 17:20:50 [error] 850#850: *14288 upstream timed out (110: Unknown error) while reading upstream, client: 172.69.70.64, server: , request: "POST /zitadel.admin.v1.AdminService/TestSMTPConfigById HTTP/2.0", upstream: "grpc://127.0.0.1:8080", host: "auth.chimeralabs.sh", referrer: "https://auth.chimeralabs.sh/ui/console/instance?id=smtpprovider"
2024/10/15 17:21:51 [error] 850#850: *14297 upstream timed out (110: Unknown error) while reading upstream, client: 172.71.31.80, server: , request: "POST /zitadel.admin.v1.AdminService/TestSMTPConfigById HTTP/2.0", upstream: "grpc://127.0.0.1:8080", host: "auth.chimeralabs.sh", referrer: "https://auth.chimeralabs.sh/ui/console/instance?id=smtpprovider"
2024/10/15 17:30:02 [error] 850#850: *14301 upstream timed out (110: Unknown error) while reading upstream, client: 172.69.70.75, server: , request: "POST /zitadel.admin.v1.AdminService/TestSMTPConfigById HTTP/2.0", upstream: "grpc://127.0.0.1:8080", host: "auth.chimeralabs.sh", referrer: "https://auth.chimeralabs.sh/ui/console/instance?id=smtpprovider"
2024/10/15 17:31:03 [error] 850#850: *14303 upstream timed out (110: Unknown error) while reading upstream, client: 172.71.31.133, server: , request: "POST /zitadel.admin.v1.AdminService/TestSMTPConfigById HTTP/2.0", upstream: "grpc://127.0.0.1:8080", host: "auth.chimeralabs.sh", referrer: "https://auth.chimeralabs.sh/ui/console/instance?id=smtpprovider"

I have this nginx error log, anyone can tell me what it means/ what could cause this? this is using grpc_pass rather than proxy_pass

deft wolf
lusty venture
spark flint
#

...

#

they asked here for help

#

why would they use chatgpt lol

sharp geyser
#

argh

#

I hate nginx

#

I have to build it from source, since i need to add modules that aren't in by default

#

and now my stuff no worky

spark flint
#

its nginx but with lua modules

sharp geyser
#

man I would but idk if I have the patience rn

sharp geyser
spark flint
#

openresty is a fork afaik

sharp geyser
#

I see

spark flint
#

OpenResty® is a full-fledged web platform that integrates our enhanced version of the Nginx core, our enhanced version of LuaJIT, many carefully written Lua ...

sharp geyser
#

honestly idk what the issue is

#

and at this point i;d be willing to pay someone to solve my networking issue

#

💀

#

I've been at this for 4 days now

small tangle
covert brook
#

In one of the script lines

#

Causing it to fail with a fatal error

#

Such as what you stated

#

Which is very common to get this type of error honestly

covert brook
sharp geyser
#

I think its called deadpool im not sure

#

Though that may be for sqlx on its own

slender wagon
pearl trail
warm surge
#

@quartz kindle is there a way to restart the bot automatically when it needs another shard?

lyric mountain
#

I mean, I can't imagine bots like dyno full restarting every 1500 servers

warm surge
lyric mountain
#

It takes a loooooooong time to coldboot a big bot

#

Because you'll face IDENTIFY ratelimits often

warm surge
#

true

sharp geyser
#

if you are using async then yes, diesel-async + deadpool

#

deadpool handles pooling, and diesel-async allows you to use diesel asyncronously (obv)

covert brook
#

Womp

radiant kraken
#

what's a deadpool

quartz kindle
#

i have no idea what actually happens if for example you keep running a shard continuously until is goes past 2500 guilds

#

but either they let it pass 2500 and do nothing, or they terminate the session and ask you to reconnect

#

but djs for example will not launch a new shard, it will try to reconnect using the existing shard setup, and probably fail

#

djs decides the shard configuration during startup only

earnest phoenix
#

so you don't really need to do anything, just let ws tell you to reconnect and then it will reconnect - and libraries should handle that

radiant kraken
#

simply don't make discord bots

#

😎

quartz kindle
#

you need to connect with a new session with a different shard count

#

i dont think libs change the shard count number from a standard reconnect flow

#

the lib should do the following:

  1. try to reconnect, receive invalid session
  2. get /gateway/bot
  3. check that recommended shard count is different than program's current shard count
  4. terminate all sessions/shards
  5. create new shards with updated shard count
#

idk if libs do this when running internal shariding, but i am pretty sure djs wont do this when running normal/child_process sharding

#

or maybe they will idk, check their sharding manager code lel

sage bobcat
#

One message removed from a suspended account.

coral pagoda
#

character development

earnest phoenix
subtle hare
#

How to get the server count on a bot

lyric mountain
#

on "a" bot or on your bot?

#

the former you'd need to rely on whatever they posted on topgg

#

the latter depends on what lib u use

subtle hare
lyric mountain
#

you can fetch a specific bot using the api, it'll return the server count shown in the page

#

unless you actually mean posting the server count

quartz kindle
quartz kindle
#

what language are you using?

subtle hare
#

Js

quartz kindle
#

you can use the top.gg sdk from npm

subtle hare
#

Ok I will look into it tomorrow

#

And hopefully that it works

crystal wigeon
#

are there any servers where people talk about start up ideas etc? flork_think

#

i got some ideas. who wanna build it with me kekcry

#

Tim

quartz kindle
#

lmao

vivid fulcrum
#

fiverr has some cheap workforce 🙃

crystal wigeon
coral pagoda
#

guh

#

what's the startup idea

crystal wigeon
#

Plus prototyping will probably only take like a week

#

Just throwing the idea out there

deft wolf
#

I don't think Tinder is about dating Aware

crystal wigeon
#

Lmao

#

Bumble then

#

No dating app is about dating today ig

wheat mesa
#

Dating apps are very difficult and expensive to create

coral pagoda
#

absolutely 0 experience with mobile apps

crystal wigeon
#

But just saying this is like an extra flavor to your typical dating app experience

crystal wigeon
#

Nothing extra

#

React native kekcry

wheat mesa
#

Real

crystal wigeon
#

Lmao I mean it gets the job done

#

Why chase the rabbit hole when we wanna build something quick and dirty to see if it works

coral pagoda
#

i generally avoid (making) any apps that hold personal info:/

crystal wigeon
#

Prototyping would be even simpler. Set up some page showing how it’d work and get a waiting list for people to sign up

wheat mesa
#

Isn’t that every app to an extent though

coral pagoda
crystal wigeon
#

I mean dating apps do require some info tho

wheat mesa
#

Names and numbers are not that sensitive

coral pagoda
#

they are

crystal wigeon
#

We don’t even need to share numbers

wheat mesa
#

Credit cards are sensitive, but names and numbers are very commonly leaked

crystal wigeon
#

It’s a messaging app. Users can exchange numbers of they want

coral pagoda
#

getting your full name leaked is just a few steps away from your home address being leaked :v

crystal wigeon
#

You’re worrying about things that don’t matter here

wheat mesa
#

Not really no

crystal wigeon
#

Bro your data is alr leaked

coral pagoda
#

yes really white pages and dumbass relatives on facebook

crystal wigeon
wheat mesa
#

If someone can find your home address from your name then you shouldn’t be posting your home address online

coral pagoda
crystal wigeon
#

Nah it is

coral pagoda
#

lol

wheat mesa
#

Think about how many social media celebrities don’t have their address leaked

coral pagoda
#

they often do

crystal wigeon
#

Anyways

#

I think it’d be a cool idea

#

Billion dollar business

coral pagoda
#

it is

crystal wigeon
#

Or atleast 100m

wheat mesa
#

Hype = pressure to release an app = releasing an unfinished product

crystal wigeon
crystal wigeon
#

It’s just to see how many sign ups you’d get

#

Then release it 6 - 12 months after

wheat mesa
#

While leaking your idea? Fantastic idea lol

crystal wigeon
#

Well maybe we need some working prototype

coral pagoda
crystal wigeon
#

But there are products that have a wait list

wheat mesa
#

If it actually got traction you’d be outpaced by a corporate conglomerate

crystal wigeon
#

It’s common way to validate quickly

wheat mesa
crystal wigeon
wheat mesa
#

Another point: why would it get leaked

crystal wigeon
#

anyways

coral pagoda
crystal wigeon
#

Fam once you get rich you can hide all you want

wheat mesa
#

You could do that to any house around you.

crystal wigeon
#

Lmao

wheat mesa
#

Irrational fear

crystal wigeon
#

Fr

deft wolf
crystal wigeon
#

Just paranoid

#

The matrix already has your data

coral pagoda
# wheat mesa Irrational fear

people on discord on the internet in general aren't "average" people plus it's easy to have someone obsessive target you

crystal wigeon
#

Calm down man

wheat mesa
#

Then don’t associate your real name with discord?

#

It’s not that hard?

crystal wigeon
#

Is this a new guy

wheat mesa
#

Nobody is going to meet with someone on a dating app without their real name too lol

crystal wigeon
deft wolf
#

We are not average peepoWoW

crystal wigeon
#

Fr

crystal wigeon
#

Bro data breaches alr happened and they alr have your data

wheat mesa
#

Your data is probably already online somewhere

crystal wigeon
#

Just last week the biggest insurance company in my country was breached with over millions of data

coral pagoda
crystal wigeon
#

And it’s suspected that CTO of the company sold it cause he want more money

wheat mesa
#

I’m against storing super sensitive data myself like SSNs or credit card numbers, that stuff is different

coral pagoda
crystal wigeon
#

And this is a huge company that was trusted for years

coral pagoda
#

i'll pay you

wheat mesa
#

I don’t care about your social info

#

And 99.9999999% of people don’t either

coral pagoda
crystal wigeon
#

Pay me for free if you got so much moni

#

Stop being unnecessarilyparanoid pls

#

Nobody knows who you are

coral pagoda
#

no level of paranoia is too paranoid

#

schizochads won

crystal wigeon
#

Well if serial killers are using dating apps idk what to say man. Wtf

wheat mesa
#

Then stop using the internet and go off the grid