#development

1 messages · Page 1760 of 1

sudden geyser
#

It's fine

hearty palm
#

still not working LOL

lusty quest
#

i know a few people here who use it to have it serving 5000 Guilds with no issues

visual goblet
#

yeah i dont think i need to switch because my bot doesnt depend on a database

sudden geyser
visual goblet
#

i just want it for warnings time mute custom prefix and thats about it

lusty quest
#

if you want to run the Bot on Mutiple machines then you want a other database, but for having it running its just fine

hearty palm
visual goblet
#

multiple machines as in?

lusty quest
#

having shards split across mutiple servers

visual goblet
#

ohhhhhh

lusty quest
#

but this is something that will not happen this fast

visual goblet
#

yeah i wouldnt know anything about shards i only have 17 servers

near stratus
lyric mountain
#

Sqlite is very much fine even for large scale projects, but the major drawback (or not) is its IO scalability

#

Like, for reading it's unbeatable

lusty quest
#

also for the temp mute stuff, i can recommend using redis for it. Redis offers some nice fatures for this, you can set a TTL for keys in the database, and when a TTL for a key runs out you can listen to a event -> unmuting since the event can also contain the userid

lyric mountain
#

But it can only have one write operation on it at a time

visual goblet
#

if thats d.js im using d.py

lusty quest
#

redis is a database

visual goblet
#

oh so anyone can use it?

lusty quest
#

usually it requires that you host a server, but there are free servers for it

visual goblet
#

i only see javascript with it so im not really sure lmao

lyric mountain
#

Just go postgres

clear marlin
#

100mb servers

#

lol

lusty quest
#

its just a recomendation, nothing you need to do

lyric mountain
#

Since you're used to sqlite

crystal solar
lusty quest
#

postgres is nice

visual goblet
#

for your pp 😳

clear marlin
#

tf

lyric mountain
lusty quest
#

used MongoDB for a while before this ive used mysql, now its the turn for Postgres

thorny arch
#

what am i supposed to do if the await ctx.send isnot working but no errors are shown

visual goblet
#

mongo i refuse to use as this might be my db for a while and mongo has a limit to how much you can use before you have to pay a good bit for it

lusty quest
#

make sure it executes

thorny arch
visual goblet
#

not saying my bot is going to be used a lot thats prob just not true LMAO but just in case

visual goblet
#

man this is my first db id rather just use sqlite3 and then work from there

thorny arch
visual goblet
#

i tried mongo and just decided not to use it

sudden geyser
#

Then I recommend you start there.

lusty quest
#

MongoDB is nice for easy and fast scaling, its really easy to shard

sudden geyser
#

If you're using the command framework, you can override on_command_error from your bot instance to handle errors.

visual goblet
#

i dont plan on using sqlite3 forever but for now to gain an understanding

#

ill use it since only 17 servers

dense spire
lusty quest
#

when ive started i where also using sqlite

thorny arch
visual goblet
#

i like that theme

lusty quest
#

then switched to Mysql bcs i knew about it already

sudden geyser
#

SynthWave looks nice except for the glow feature

thorny arch
visual goblet
#

i like the glow feature

thorny arch
#

anyways

sudden geyser
#

I find it distracting

thorny arch
#

we re getting off track

#

my prob is

dense spire
#

thanks it looks nice and the popping out is better for me cause im color blind : )

thorny arch
#

there are no errors

#

showing up

#

at all

#

everythin else is working perfectly fine

#

but once it gets to await ctx.send

#

it stops

lusty quest
#

add a breakpoint to it and inspect. also try to run your stuff inside the debugger

#

helps a lot with debugging

thorny arch
#

i am

visual goblet
#

with sqlite3 do i need a build path or is that optional?

sudden geyser
#

@thorny arch did you try out the solution I proposed?

thorny arch
#

logging errors?

sudden geyser
#

yes

thorny arch
#

i dk how to do that

sudden geyser
#

are you using the command framework

lusty quest
#

try to send the stuff with the values commented out

#

sounds weird i know, but happened to me more than once

thorny arch
sudden geyser
#

You're using it in that case.

thorny arch
#

uhuh

thorny arch
#

seems its a formatting issue

sudden geyser
#

Doesn't %s expect a string and .hours() return a number

slender thistle
#

It converts to string

sudden geyser
#

ah

thorny arch
#

then why isnt it working

slender thistle
#

Do you have on_command_error event somewhere

thorny arch
#

no

#

none for the current command

slender thistle
#

And if we ignore your command?

thorny arch
#

nothing

slender thistle
#

Do you have an on_command_error event?

thorny arch
#

bot runs as normal

slender thistle
#

Can you show your code?

thorny arch
#

ayt

#
@client.command()
async def mine(ctx):
    print('yeet')
    cnx, cursor = make_connection()
    query1 = "SELECT botcoins , cpu_level , gpu_level , cooldown_timer_end FROM economy_data WHERE user_id = %s" 
    cursor.execute(query1,(ctx.author.id,))
    results = cursor.fetchone()
    available_botcoins = results[0]
    cpu_level = results[1]
    gpu_level = results[2]
    timer_end = datetime.datetime.strptime(results[3], '%Y-%m-%d %H:%M:%S')
    print('yeet1')
    if datetime.datetime.now() >= timer_end:
        print('yeet2')
        earned_botcoins = randint(1,3)
        stat_boost = 1 + (0.2 * cpu_level) + (0.2 * gpu_level)
        total_earned_botcoins = earned_botcoins * stat_boost
        total_botcoins = total_earned_botcoins + available_botcoins
        new_time = datetime.datetime.now() + datetime.timedelta(hours = 12)
        query2 = "UPDATE economy_data SET botcoins = %s , cooldown_timer_end = %s WHERE user_id = %s" 
        cursor.execute(query2,(total_botcoins,new_time.strftime('%Y-%m-%d %H:%M:%S'),ctx.author.id))
        cnx.commit()
        cnx.close()
        print('yeet2.5')
        await ctx.send('%d botcoins™ have been added to your account' % total_earned_botcoins)
        print('yeet3')
    else:
        print('yeet4')
        timeleft = timer_end - datetime.datetime.now()
        print('yeet4.5')
        await ctx.send('wait for %s hours and %s minutes, kiddo ' % (timeleft.hours(),timeleft.minutes()))
        print('yeet5')
#

@slender thistle

slender thistle
#

Could you show your full code?

thorny arch
#

i dont see how that is relevant here

#

besides its 500+ lines of code

slender thistle
#

The error is being suppressed from somewhere

thorny arch
#

hmm

#

this is the only one

#

but the bot doesnt send that also

#

so that cant be it

slender thistle
#

Right

#

Correct guess

#

You don't have an else handling any other error than CommandOnCooldown

thorny arch
#

no

slender thistle
#

What do you mean "no"

thorny arch
#

this is wat i mean by no

slender thistle
#

You overwrite the default error handler with yours, which only does something meaningful for CommandOnCooldown

thorny arch
#

hmm

#

i commented it out

slender thistle
thorny arch
#

still no error

slender thistle
#

Dear God help

#

Can you post your full code

thorny arch
#

ayt

lyric mountain
#

Check for permissions before doing whatever you're doing

slender thistle
#

Try to put an else branch in your on_command_error that prints the exception

thorny arch
#

ayt

lyric mountain
#

Just do it then

#

Check for permissions before executing the command

zinc wharf
#

Check permission, if they don't have it, then post message. Thats just a simple if(){ } ** and ** else { } statement

#

Here is one based on roles, which should only be used if you're going for a role based permission setup.

      embed: {
          "color": 0xff4248,
          "author": {
            "name": "You do not have the correct permissions",
            "icon_url": "https://whatever.com/erroricon.png"
          }
        }
    })```
^^ Javascript (Discord.JS V12)
#

And I believe, if you want to do it from role permissions (Set via discord role manager), you'd do if(!message.member.hasPermission(["BAN_MEMBERS"])){ send message }.

Make sure to have the ! tho, otherwise, if they have the permission, it'd be posting the error message, and if they don't have the permission, they be able to use the command. ! with the if statement basically means, "if they don't have", so you're looking for "if they don't have ban members permission"

lament stump
#

about my little thing, i, somehow, managed to create a flexbox..wasn't that hard tbh .-.

hearty palm
earnest phoenix
#

show your code

hearty palm
#
client.on('guildMemberAdd', async member => {
    const channel = await client.channels.cache.get(x => x.id == "798293306278281277")
    channel.send(new discord.MessageEmbed()
.setColor("#33FF86")

there is a title and other things ofc but its kinda more than 2k 2a7m

sudden geyser
#

The channel wasn't found.

#

And you don't need to await that

#

and in fact

#

.get doesn't take a function

#

Just a value (the ID)

lament stump
hearty palm
#

didn't work

#

same problem

sudden geyser
#

your current implementation will always fail

wheat mesa
#

Anyone know why I'm getting this error in VSC after I did npm init -y? String does not match the pattern of "^(?:@[a-z0-9-*~][a-z0-9-*._~]*/)?[a-z0-9-~][a-z0-9-._~]*$".. Here is my package.json file:

sudden geyser
#

So instead of

await client.channels.cache.get(x => x.id == "798293306278281277")

You write:

client.channels.cache.get(...)

Where ... is the ID as a string.

The notable differences is the lack of await and not passing in a function.

sudden geyser
wheat mesa
#

Oh

hearty palm
#

same problem

sudden geyser
#

Then make sure the channel exists.

#

Because it is correct.

hearty palm
#

i'm sure

sudden geyser
#

Interesting. If you log client.channels.cache, do you see a large collection of channels?

severe wave
#

Hi, I would have a little question, there is no error in the infrastructure where I connect my discord bot, but my bot is not active, how can I fix this error, I will be glad if you help.

sudden geyser
#

It may be visible to your client.

hearty palm
#

my client got the admin prems

#

and its visible to everyone to

sudden geyser
#

@hearty palm just because it's logically visible doesn't mean it's actually visible. Like I said, please log the collection

severe wave
sudden geyser
#

If I had to guess Naru, you may be missing intents

lyric mountain
#

Yeah, there are usually 3 reasons for a bot not starting

#

1 - wrong/missing token
2 - wrong/missing intents
3 - failing to compile

earnest phoenix
#

1 code error
2 ratelimit
3 some weird shit

lyric mountain
#

Ah, 4 then

#

Forgot ratelimit

sudden geyser
earnest phoenix
wheat mesa
#

c o m p r e s s

sudden geyser
#

I don't understand the compression meme

#

is it just a shitpost

slender thistle
#

I don't remember exactly how it started

#

But yeah, a big shitpost

earnest phoenix
#

dose any one know how to make multi server / command

lusty quest
#

?

#

you want to connect the chats of mutiple servers?

earnest phoenix
#

yes

#

like the bot @last onyx

lusty quest
#

use webhooks to send the stuff around. its not that easy to do tbh

earnest phoenix
#

1 other thing

lusty quest
#

the idea -> store the channels where you want to relay/recive from, if a message is send create a webhook in the stored channels that contain the message you want to relay

earnest phoenix
#

my bot says it needs perms but i gave it perms but it dont work

lusty quest
#

did you have it the correct perms?

#

also make sure there are no channel overwrites conflicting

earnest phoenix
#

yes

lusty quest
#

did you check that the bot got the permission before executing something needing the permission?

visual goblet
#

uh apparently vsc is unsupported? no idea what that means

lusty quest
#

unsupported?

visual goblet
#

yeah

#

it says my vsc is unsupported

#

ah it needs a reinstall

earnest phoenix
#

helo

shadow frigate
#

discord.js: Does guildMemberUpdate get emitted when a user finishes member screening?

novel jetty
#

Could someone help me with this error? Im not sure why its not working. The same line is also couple line under it but that one is working

sudden geyser
#

.channel is non-nullable, so you should check what the value of message is

novel jetty
#

After removing the .channel, the error is message.send is not a function

sudden geyser
#

Find where you're calling .run and what input you're giving

visual goblet
#

how do i import a db again? wasnt it from ..db import db?

#

oh wait nvm i can just do from lib import db

slender thistle
visual goblet
#

so i imported my db from the lib folder however apparently lib.db has no execute even though i set it up

#

maybe i imported wrong though

slender thistle
#

How the absolute fuck does one specify current class as return type via typing annotations

sudden geyser
#

Very declarative as well

slender thistle
#

It really is. Found it by random Google searching

sudden geyser
#

also how does pypi not have syntax highlighting for code blocks

slender thistle
#

I'm not sure honestly

#

Well, actually, it seems that it just doesn't support Python REPL

sudden geyser
#

ah I didn't notice

#

the readme of fluentpy doesn't use any highlighting

slender thistle
#

Unfortunately :(

earnest phoenix
#

hi guys

#

how could i console.log value from:

#

[ { value: '429334867923173377', type: 6, name: 'user' } ]

#

?

crimson vapor
#

arr[0].value

zenith knoll
#
GRANT ALL PRIVILEGES ON 'typing_gamedb'.* TO 'typing_game' @'%';

It says im doing something wrong? anything obvious?

wheat mesa
#

Does anyone know of a semi-accurate formula to estimate image file size? I'm currently using width*height*bit depth to find the size, but my formula comes out to about 47 MB for a 1080p 24-bit image, which I feel is inaccurate.

visual goblet
#

feel

#

is it truly wrong?

#

might want to figure that out before you switch

wheat mesa
#

I'll use canvas to generate an image of that resolution and bit depth to test if it's accurate

slender thistle
#

Have you found anything helpful on Google, Waffle?

wheat mesa
#

Yeah, I got that formula from google but it just doesn't seem right

errant perch
#

i've checked for the attach files permissions and all of these log as true even though it does not have the attach_files permission. i've also tried sending a file and it throws a permission error

sudden geyser
#

show how you're sending the file

errant perch
#

it works with the attach files permission

#

but i need those to log as false

#

cause its actually disabled

sudden geyser
#

Is it possibly disabled per role instead of per-channel?

errant perch
#

i disabled it everywhere

#

through the server, roles, and per user

wheat mesa
#

Oh no, have I managed to mess up basic math again...

slender thistle
#
1920*1080*24 = 8294400 bit
8294400 / 8 = 1036800 byte
1036800 / 1024 = 1012.5 KB
1012.5 / 1000 / 1.0125 MB
wheat mesa
#

1920 * 1080 *24 is 49.7 million bits

#

I forgot to divide by 8, which explains my absurd file size estimation though

#

It should come out to about 6MB for a 1080p 24-bit image it looks like

#

Which seems about right

slender thistle
#

Yup, that looks more reasonable

wheat mesa
#

yup

#

Time to figure out how to compress images now 😔

slender thistle
#

Good luck XGWkekwlaugh

visual goblet
#

does anyone have any familiarity with the error "Command raised an exception: AttributeError: module 'lib.db' has no attribute 'execute'"

sudden geyser
#

It means you tried doing .execute on a module.

#

lib.db in this case.

#

You probably want an instance of your database or whatever

visual goblet
#

well i am using a db.execute for my change prefix command but maybe

#

what if i didnt import the database properly

#

i done from lib import db and it showed no errors and popped up just fine

#

i tried doing from ..db import db but i could probably get away with from . import db like in my other files

#

unless thats wrong too...

#

"discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.changeprefix' raised an error: ImportError: cannot import name 'db' from 'cogs' (unknown location)"

#

hmmm...

sudden geyser
#

sounds like you're having state issues across files

visual goblet
#

ah

#

well maybe im doing it wrong then but every other file is from . import db and it doesnt raise any issues

torn crag
#

Hi, i was coming here in the hopes anyone knows how to use steam's api for looking at game stats.....docs havent been to helpful

torn crag
#

Why would you need to see if a message contains an embed?

#

Users cant post them (not without modifications to client)

swift cloak
#

hey why it says i pushed in my terminal

torn crag
#

try and get an embed (from a bot for example) and then console.log it and see what you get

swift cloak
#

but when i go to the repo

#

it says i didnt push

#

does anyone know why?

#

it doesnt show my latest commit

torn crag
#

give it some time

crimson vapor
#

message.embeds is an array

dense drift
#

Does anyone know how to get the /commands to wait for your bot to return? I have some code that runs, and it seems like Discord just gives up before it's finished pulling information.

crimson vapor
#

message.embeds?.length > 0

old cliff
#

Does djs have audio recieve functionality?

visual goblet
#

with dpy im using sqlite3 for my database I have a BUILD_PATH and a DB_PATH

#

with the DB_PATH does it need to be my database file?

#

i have it as database.db but i think i need it to be my file name

crimson vapor
#

check if they are a bot first kekw

#

im like 10% sure that users can send links that get embeded and are included there

visual goblet
#

with a dpy database if i reference a database.db folder in my DB_PATH do i need the folder made?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

analog roost
#

I’d recommend if you’re doing link filtering to do some domains

#

As users who are smart will just take out http or https

old cliff
#

How do I change the djs client to use my extended class instead of the default?
Example: channel class?

#

Check embed types...

bitter lantern
#

hi

earnest phoenix
#

@bitter lantern

old cliff
#

If embed type is link then return @earnest phoenix

wheat mesa
#

Can I make a limit for what a user can put in a number input in HTML, or would I need some sort of js logic for that?

old cliff
#

I guess max range exists

#

Yeah... max and min exist

#

For number input

wheat mesa
#
<label for="bitDepth">Bit Depth</label>
<input type="number" id="bitDepth" min="1" oninput="calcSize()" max="32"><br><br>
``` I have this but it doesn't prevent the user from typing in higher or lower numbers than the range.
light lodge
#

Hi

old cliff
#

It prevents submission

#

Nevertheless also filter it on the backend side

wheat mesa
#

Not sure why

#

I could probably use some sort of regex but... 🤮

wheat mesa
#

I did

#

Lets me type in numbers higher than 5

#

And lower than 1

old cliff
#

Filter it on the backend side or use js then

wheat mesa
#

Alright

torn crag
#

Hi, i was coming here in the hopes anyone knows how to use steam's api for looking at game stats.....docs havent been to helpful

supple oriole
#

can anyone help me with this.

#

I tried installing sqlite on vscode

#

but I got this

lament rock
#

I wouldn't recommend npm installing through vscode since it does some whacky stuff with file permissions

#

remove the node_modules directory then npm install through the standard terminal

visual goblet
lament rock
#

yes. It won't create the file for you

#

a basic schema also needs to be loaded

#

There are some good tools to help you create a database file and/or modify a database schema or manage rows

visual goblet
#

well I'm not sure where to fill it up and I don't know any tools that could help with that

short python
#

How am I able to get into bot development? I have no previous experience/knowledge and want to learn.

crimson vapor
#

learn the basics of your chosen language

#

then you can make a simple bot

#

then learn the standards and smarter ways to do things

#

and go on from there

prime mist
short python
#

Thank you

deep mantle
#

Check if https:// is in the message

trail finch
#

Um how can I dm dylan who reviewed my bot? I had some stuffs to tell him

zenith terrace
#

just by dming him?

lusty quest
#

not really you can corrupt files with it.

clear marlin
#

it doesn't lock the file, just writing to the file asynchronously

lusty quest
#

just use sqlite lol

worn sonnet
#

Is anyone here familiar with BscScan?

lusty quest
#

bcs json is not a database

#

blame Million for this one

clear marlin
#

just use a keyv, I've already said this before

lusty quest
#

when ive started making bots ive used enmap, but then switched to mysql then to MongoDB and now i try Postgres

#

whatever floats your boat

rose pumice
#

who can make invite tracker bot? NetroxDance

clear marlin
#

you can

#

if you try

rose pumice
#

im bad at coding GC_xd

lusty quest
#

there is no good or bad, just a different level of knowledge

near stratus
#

just a different level of Googling skill

prime mist
vale garden
#

hi i keep getting this error

#
discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.
#

all i do is use a few commands

#

and this shows up

#

this is my bot

rose pumice
#

@prime mist Dms

vale garden
#

does anything look like it would instantly trigger that

near stratus
vale garden
#

i just used the search and help command like 4-6 times each

vale garden
#

and my code is also fine i think

#

does anyone know why its happening so much

modest crane
#

are you using repl to host your bot?

elfin shadow
near stratus
#

sowwy i don't do python

vale garden
earnest phoenix
#

thats the answer

modest crane
#

use a proper host

earnest phoenix
#

if one bot gets ratelimited all do

vale garden
vale garden
earnest phoenix
vale garden
#

bruhh

#

where do i host it then

earnest phoenix
#

well

modest crane
near stratus
vale garden
#

kk tks

modest crane
#

google cloud has a free tier btw

vale garden
near stratus
modest crane
modest crane
#

its pretty limited tho

near stratus
earnest phoenix
#

help me please

(node:15216) UnhandledPromiseRejectionWarning: AkairoError [NOT_IMPLEMENTED]: HelpCommand#exec has not been implemented```
worn sonnet
lusty quest
#

if no one answers probably

vale garden
#

hi

#

how long does it take generally for bots to get verified

#

ive heard it takes between 2-3 weeks

#

but it has been 25 days for me

#

lol

sweet matrix
#

Hello

#

can i use this in the description bot page or no ?

<style>
.entity-header__image {
    border-radius: 50% !important;
    border: 3px solid gold;
    animation: float 5s ease-in-out infinite;
}
  
@keyframes float {
  0% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    -webkit-transform: translatey(0px);
            transform: translatey(0px);
  }
  50% {
    box-shadow: 0 25px 15px 0px rgba(0, 0, 0, 0.2);
    -webkit-transform: translatey(-30px);
            transform: translatey(-30px);
  }
  100% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    -webkit-transform: translatey(0px);
            transform: translatey(0px);
  }
}

.entity-wrapper {
    width: 100%;
    height: 100vh;
    overflow: scroll;
    overflow-x: hidden;
    background: url('https://cdn.discordapp.com/attachments/776345413132877854/782660450205958174/753060-black-wallpaper.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    scrollbar-width: none;
}

.entity-wrapper::-webkit-scrollbar {
    display: none;
}

body{
    scrollbar-width: none;
}

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

#menu {
    background: transparent;
}
.entity-content__description {
    background: transparent !important;
    border: none;
}

.entity-content__divider {
    display: none;
}

.entity-hint {
    display: none;
}

blockquote {
    background: linear-gradient(90deg, #363636 30%, #fff0 100%) !important;
}
</style>```
vivid fulcrum
#

it isn't a script

#

but try it

rocky hearth
#

is here anyone, who knows firebase queries well. 🙂

#

I've a player field map in a document hving 2 keys, white and black which is an id
I want to get all documents which has an id equals to either of the keys.

players: { white: 'id1', black: 'id2' }

id == players.white || id == players.black

willow mirage
#

anyone have idea how I can find this with mongoose?

//database
{
  a: {
    b: 10
  }
}

//Code

const data = await Datas.find({b: 10})

?????

#

is this possible?

#

or I have to do something else

#

ah nvm

#

Datas.find({'a.b': 10})

lusty quest
upper moss
#

hey

#

i want my bot to change a users nickname when they types ~nickname
if message.content.startswith('~nickname'): nickname = 'name' await message.author.edit(nick=nickname)
its giving me errors :(

earnest phoenix
#

?

#

what error?

upper moss
#

the error

earnest phoenix
#

well

#

give it permissions

upper moss
#

it has

earnest phoenix
#

alright

#

no idea

upper moss
#

:(

#

i see

earnest phoenix
#

well i only have 1 idea

#

it cant change the owner of the servers nick

upper moss
#

hmm i can't change the owners name but its not changing the members name either

earnest phoenix
#

well

#

any error?

#

or same

upper moss
#

a little different

earnest phoenix
#

ok

upper moss
#

hmm any idea

earnest phoenix
#

well

#

try with more permissions i guess

upper moss
#

'mor'

#

oh

#

lol it worked

#

thanks

earnest phoenix
#

typescript > JS

#

admit it

lusty quest
#

just slapping Administrator permission on it wont work

#

ts is weird

earnest phoenix
#

@every1

#

lol

#

weird but you can enforce types and it makes your editor (with internal debugger) feels like an IDE

lusty quest
#

also how tf did you attach something to a class to make it aviable everywhere where you call the class in ts

#

i know i started to use ts a few days ago

earnest phoenix
#

well ts is just javascript

#

but some features changed

lusty quest
#

i know

earnest phoenix
#

like import instead of require

#

and type annotations

#

and export something instead of modules.export()

vale garden
#

oh wait no

#

i didnt mean on topgg

#

i was asking for discord verification

vale garden
lusty quest
vale garden
#

no 3 weeks on discord

lusty quest
#

discord can be easy 6 weeks

vale garden
#

ooof

#

kk

earnest phoenix
#

by that

earnest phoenix
vale garden
earnest phoenix
#

oh

#

and is it verified

#

or rejected yet

vale garden
#

nope

earnest phoenix
#

WOW

#

that's so long

#

3 weeks alr

vale garden
#

the request is being processed

vale garden
marble juniper
#

how to check if the client is destroyed for discord.js

#

lol

earnest phoenix
#

long forsomeone who is impatient like me

vale garden
#

lol

earnest phoenix
#

client.on('invalidated', () => {
// you handle it
})

marble juniper
#

Client.destroy()

earnest phoenix
#

oh

marble juniper
#

the destroy method

#

can I check or something if the websocket connection is still there

earnest phoenix
#

client.on('disconnect', () => {})

#

?

marble juniper
#

but like I wanna do that without an event

#

I want to check if the client is destroyed without an event

earnest phoenix
#

client.destroy().then()

#

try that

#

wait nvm

#

there's no listener for that

#

destroy have callback

#

doesn't it

marble juniper
#

no it just returns void

#

essentially no promise or whatsoever

earnest phoenix
#

yeah

#

that's sad

#

client.destroy() = disconnect right

#

why dont you want to check the client without using events

marble juniper
#

because I want to check if its destroyed inside an if statement

#

and without events

earnest phoenix
#
/* index.ts */
export var disconnected;
client.on('disconnect', () => {
  disconnected = true;
});

/* listener.ts */
import { disconnected } from 'index.ts'
if(disconnected) {
  // what you wanna do
} else {
  // what to do if not disconnected
}
#

how about that

marble juniper
#

ig

cinder patio
#

that won't work

#

Try using client.uptime or client.readyAt

earnest phoenix
#

that's my way lol idk

worn sonnet
vale garden
#

2 people i know got theirs verified exactly 3.5 weeks after applying

earnest phoenix
#
let db = JSON.parse(fs.readFileSync(`./server/${message.guild.id}.json`, "utf8"))

        db["role"].push({ invitesNeeded: 1 ,
            roleID: "12345689" }).write()
            message.channel.send(`invites req: ${args[0]}\n Roleid ${args[1]}`)```
keen wedge
#

the error is already telling you, write is not a function

earnest phoenix
#

but I don’t know how to fix it

#

🤣

keen wedge
#

There's a lot of wrong stuff here

1 - A Json datavase
2 - You're creating a json file for each server, that's the worst possible thing you could do aside from using a json database
3 - If you're trying to write to the file, fs has a writeFileSync function which u can use

earnest phoenix
#

you use json database? what even is that

#

it’s a very small bot for 2 servers

#

i know h2 database, mysql, sqlite, mariadb, etc. but JSON database?

earnest phoenix
#

(jk)

keen wedge
#

that... that's worse, I know it's a jole but damn

earnest phoenix
#

mh maybe

cinder patio
#

Are you just guessing

#

.push returns a number

#

to write to a file you use fs.writeFile or writeFileSync

keen wedge
#

guessing is fine, but try to read the docs, why would push return a file ref that u could use to call write on it

earnest phoenix
#

yes

keen wedge
#

if it's pushing to an array

earnest phoenix
#

mh

#

and also writefile has a callback

#

while writefilesync does not and is synchronous

keen wedge
#

it's just breaking down things by their name and what they're doing

#

you wouldn't expect new Cat(); to return a reference to a Car o object

woeful pike
#

you would expect push() to return the array that got pushed to but it returns a number instead YEP

earnest phoenix
#

does topgg has javascript webhook thingy

#

yes

#

what's the name

#

tho

earnest phoenix
#

OMG

#

i thought i got verified/rejected

#

it's just you pinging me...

#

sad

#

lol

#

How does one make a post request in golang

keen wedge
#

use the http package, it's under net/http

#

you can directly call http.Post

#

although it's pretty bare bones, I recommend reading the official examples in godoc

#

there are more advanced ways of doing it, but just using http.Post should be enough

earnest phoenix
#

replit moment: i used absolute imports and repl tried to install @components/buttons

#

how the absolute fuck do i stop the shitty packager

#

well

#

no idea

slender thistle
#

Ctrl-C?

lyric inlet
#

my bot have a whois command that show all user info
can i add a feature in that command that also show badges of user??

vagrant sorrel
#

let locatedString = S(stringResponse).between("<a href=\"", "</a>").s

#

what is this S().between().s thingy

earnest phoenix
#

just read the docs and added this to my .replit and it still tries to install it

language="nodejs"
run="npm run dev"

+ [packager]
+ ignoredPaths="src"
+ ignoredPackages=["@components/TabButton"]

SO THAT WAS A FUCKING LIE

digital ibex
#

both?

#

@earnest phoenix

#

both are links which direct u to a different site

modern rock
#

how to deploy bot without PI writing like you have to code 3billion letters

#

for one comand

umbral zealot
#

The amount of code you have to write usually has no relevance to where you're hosting the bot

#

What code are you talking about?

modern rock
#

any

#

i dont understand anything in codes

vivid fulcrum
#

then hire somebody to make the bot for you

modern rock
modern rock
modern rock
#

rly?

zinc wharf
#

I have no idea if im allowed to say it, so I will put it in tags, ||discord bot maker on steam||

modern rock
#

:0

#

hmm cool

light lodge
#

Hi

summer torrent
#

show code

thin quarry
#

in python?

#

then i know da wae

#

i made this:

#

here you have not only the instruments to detect links, but also see if they are rickrolls

eternal osprey
#

hey

#

so i am checking for channel names:

const D = message.channel.name.toLowerCase() === 'miniboss-match1'

However, i am generatin a random string after the match1: miniboss-match1-f2fj28
How can i now check if the channel starts with miniboss-match1?
Is it gonna be: message.channel.name.toLowerCase().includes( 'miniboss-match1')?

eternal osprey
#

love you evie

umbral zealot
near stratus
#

/^(http|https)\:\/\/[a-zA-Z0-9-]{2,63}.[a-zA-Z]{2,10}/ This should detect a normal url

#

but not
https://google.coooooooooooooooom.in

#

^°^

lavish bramble
#

How can I make anti bot add?

#

In my Raid bot

near stratus
lavish bramble
near stratus
visual goblet
#

if i make database tables in my main file with sqlite3 can those be used anywhere or should i declare the table within my command folder?

lavish bramble
#

Its in security bot too

near stratus
visual goblet
#

the most you can really do is a backdoor command but that requires like a guild id and some other stuff

#

its for getting a server invite link iirc

near stratus
lavish bramble
visual goblet
#

thanks akio ill give it a shot appreciate it bro

near stratus
visual goblet
#

thats a confusing question

near stratus
#

wait a moment

#

@lavish bramble You actually can

#

If you can access the audit log

lavish bramble
#

Can I get that In audit log?

#

Yup

#

Thnx

near stratus
#

but there's a huge problem with that

earnest phoenix
#

which parser does github use for parsing gfm

cinder patio
#

gfm?

earnest phoenix
#

github flavoured markdown

#

hello?

hidden knot
#

Error:
Failed to create a new invite. Please try again or contact website administrators.

pale vessel
earnest phoenix
#

what's the name

lyric mountain
wheat mesa
#

How would I align these boxes?

#

Using HTML/CSS

#
<label for="widthRes">Width</label>
<input type="number" id="widthRes" min="1" oninput="calcSize()"><br><br>
<label for="heightRes">Height</label>
<input type="number" id="heightRes" min="1" oninput="calcSize()"><br><br>
<label for="bitDepth">Bit Depth</label>
<input type="number" id="bitDepth" oninput="calcSize()" min="1" max="32"><br><br>
lyric mountain
#

use two divs

#

one for the text and one for the boxes

#

align text div to right and box div to left

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric inlet
#
.setDescription(`Hey ${message.author.username}, Sorry but for now bot has only 3 commands(`avatar`,`ping`,`invite`) ```
pls help me its not working i am learning pls help me **:(**
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric inlet
#
    .setDescription(`Hey ${message.author.username}, Sorry but for now bot has only 3 commands(`avatar`,`ping`,`invite`) :sad_cry:
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: missing ) after argument list
Hint: hit control+c anytime to enter REPL.
 ```
pls help me i'm learning i don't understand this
#

this is error

sage bobcat
#

One message removed from a suspended account.

slender thistle
#

Oh great

#

This is what your string is interpreted as:

`Hey ${message.author.username}, Sorry but for now bot has only 3 commands(`
#

If you want to use the backtick in your template literal, you must escape them with a backslash (\`)

digital ibex
#

http://google.com and https://google.com both are links, both send u to google.com

lavish bramble
#
client.on("message", async bot => {
const user = await bot.guild.fetchAuditLogs({
        type: 'BOT_ADD'
    }).then(audit => audit.entries.first())
    const entry = user.executor
    
  const c = client.channels.cache.get("843784909235683371")
    c.send("bot added! :- ")
	
})
#

Why its spamming

woeful pike
#

you're sending a message every time your bot sends a message

lavish bramble
#

So what can I do?

earnest phoenix
#

...not send a message if it's from your bot?

lavish bramble
#

I'll try

earnest phoenix
#

this possible with Djs?

earnest phoenix
#

you cant fetch guilds your bot is not in

#

if it is in 🤔

#

then maybe you can do smth

#

i had invite and i need details like above is this possible with djs

#

and bot is in the server ^

#

oh

earnest phoenix
#

no no

near stratus
#

pretty sure you need to loop through every single Invite in every single server

earnest phoenix
near stratus
#

HUGE BRAIN

slender thistle
#

Doesn't seem like d.js supports it

#

However

lavish bramble
#
client.on("message", async message => {
if(message.author.bot) return 
const user = await message.guild.fetchAuditLogs({
        type: 'BOT_ADD'
    }).then(audit => audit.entries.first())
    const entry = user.executor
    
  const c = client.channels.cache.get("843784909235683371")
    c.send("bot added! :- ")
	
})
#

Now its not sending any message

earnest phoenix
#

@earnest phoenix

slender thistle
#

v9 when 😛

earnest phoenix
#

shivaco found the correct api endpoint

earnest phoenix
#

i need the process animethink

slender thistle
#

Send a GET request with an Authorization header containing your bot's token

earnest phoenix
#

no

slender thistle
#

Process the received JSON

earnest phoenix
#

you dont need that

slender thistle
#

Oh, yeah

#

Weird

earnest phoenix
#
const resp = await fetch(`https://discord.com/api/v8/invites/${invite_code}`)
const data = await resp.json();

// process data
near stratus
#

axios cooler

earnest phoenix
#

nup

#

🤔

#

fetch api better

near stratus
earnest phoenix
#

^

near stratus
#

cooler >> better

earnest phoenix
#

bitwise shift

#

noice

near stratus
near stratus
#

I thought you were talking about read-writstream

#

in cpp

#

didn't knew it was a thing in js

lavish bramble
#
client.on("guildMemberAdd", async message => {
const c = client.channels.cache.get("843784909235683371")
if(message.author.bot) return 
const user = await message.guild.fetchAuditLogs({
        type: 'BOT_ADD'
    }).then(audit => audit.entries.first()).then(() => {
const entry = user.executor
    
  
    c.send("bot added! :- ")
    })
})

Error :- bot is not defined

earnest phoenix
#

I've got my own question
I want to align my divs like this using CSS:

/---------\ /-------------------\ /---------\
|   25%   | |        50%        | |   25%   |
\---------/ \-------------------/ \---------/

I'm trying to use flexbox to do that but I never used it before so I'm stuck

#

||and yes i am using inline styles||

near stratus
near stratus
#

like this ?

earnest phoenix
#

float is ignored in flexbox

#

but i can use the width

slender thistle
#

There's the option of doing justify-content: center and then increasing the width of the middle element

quasi hearth
#

Have the center div with flex: 50% and the other divs with flex: 25%?

earnest phoenix
#

akio's method worked

#

ty

near stratus
#

@earnest phoenix use

flex-basis:25%;
earnest phoenix
#

wots that

near stratus
earnest phoenix
#

ok

#

that's enough coding for today, time to go play FRHD

#

ill leave yall to find what the heck that means

lavish bramble
#
client.on("guildMemberAdd", async member => {
	if(member.bot)return 
const c = client.channels.cache.get("843784909235683371")
const user = await member.guild.fetchAuditLogs({
        type: 'BOT_ADD'
    }).then(audit => audit.entries.first())
const entry = user.executor
 
 c.send("bot added! :- ", + entry.tag)

	
})

Its not sending me the bot inviter name

near stratus
#

what does it send / show ?

lavish bramble
#

Just
Bot added :-

near stratus
#

...

crimson vapor
#
  1. audit logs are slow
  2. aren't you returning if the member is a bot?
lavish bramble
#

Yup

#

Its bot tracker

near stratus
#

if(!member.bot){ return false }

crimson vapor
#

so you would want it to work if the member is a bot

lavish bramble
#

How?

jovial elk
#

Anyone has an example for a callable as argument? For the cooldown decorater?

near stratus
crimson vapor
#

any capable linting program would scream about redundant !s

swift cloak
#
List item values of ModelType are required``` ayo anyone know why dis happening?
slender thistle
#

List item values of ModelType are required, meaning whatever that requires a list of ModelType values requires a list that consists of ModelType objects

earnest phoenix
slender thistle
#

idk

#

You tell me

swift cloak
#

hmm?

slender thistle
#

What do you use KEKW

swift cloak
#

i searched all my files

#

discord.js and im helping with an npm handler

#

for / commands

cinder patio
#

That doesn't look like a default js error or a discord.js error

#

most likely another lib

neat crater
#

What are some features of a discord bot which won't require use of databases?

earnest phoenix
vivid fulcrum
#

everything

#

you don't need a database for anything

#

but at the same time

#

you need a database for everything

#

the design is entirely up to you

lyric mountain
#

databases are like pants

#

you don't need them at all, it's just that...9 out of 10 times it'd be better to have one

pale vessel
#

i have no pants then

latent heron
#

amog us

<?php

class{
  public bool $👌;
  public bool $😡;
  public int $💀;

  public function __construct(bool $😈, int $💀 = 0, int $👨)
  {
    if($😈) $this->👌 = true;
    $this->💀 = $💀;
    $this->😊 = $👨;

    if($this->👌) $this->🔪();
  }

  public function 🔪()
  {
    while($this->😊)
    {
      $this->💀++; $this->😊--;
      echo "ඩ 🔪 😊 [{$this->💀}] 😇\n";
    }
  }
}

new ඩ(1, 0, 6);

?>
heavy marsh
#

So my bot is d.js v 12 I always get these cache guides when the bot or the shard connects. How can I get this spam fixed

pale vessel
#

is that valid?

#

also isn't the ?> optional and recommended to omit if it's all php code

latent heron
#

it's optional but still a good coding habit

pale vessel
latent heron
#

same reason why JS wants you to use ; even though it can run without it

slim heart
#

js doesnt want ;

#

and shouldnt

#

because fuck ;'s

pale vessel
#

wow ok

#

w/e bro

lyric mountain
#

semicolons are love

pale vessel
#

semicolons are life

drifting shell
latent heron
drifting shell
#

IM GONNA SAY IT

#

SOMEONE STOP ME

latent heron
#

why?

#

that's kinda sus of you

drifting shell
#

AMOGUS

#

Fuck that was hard to keep in

round cove
#

How do you detect who deleted a message in D.js?

pale vessel
#

you can't

#

maybe audit logs but those aren't reliable and slow to update

round cove
#

Ah I see.

latent heron
#

you can't detect an audit log event

#

nothing is created afaik from audit logs

pale vessel
#

you can still fetch it on message delete event

round cove
#

I mean you can check it thouggh

#

Yeah

latent heron
#

you have to directly check from the message events

#

just not audit log

round cove
#

Wonder if it's worth.

latent heron
#

imo i think you should check everything from the audit log and not every endpoint

#

but discord smooth brain

pale vessel
#

i believe luca does that and it fails sometimes (hence the "Moderator: ???")

latent heron
#

there's shit audit logs actually log that the endpoints don't tell you

#

example is server changes

round cove
#

Discord really b like

latent heron
#

plus having to define specific things for each endpoint to check to me

#

is a horribly inefficient method

#

it's good for accessibility and i like that but there's also a lot of endpoints to check LMAO

#

although i guess this is more of an API wrapper-related issue than the API itself

earnest phoenix
#

hey who can help me with this

#

pymongo.errors.ServerSelectionTimeoutError: kanjali-db-shard-00-01.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108),kanjali-db-shard-00-00.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108),kanjali-db-shard-00-02.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108), Timeout: 30s, Topology Description: <TopologyDescription id: 60abef45383a0b0bfd1ee972, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('kanjali-db-shard-00-00.nl5eg.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('kanjali-db-shard-00-00.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>, <ServerDescription ('kanjali-db-shard-00-01.nl5eg.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('kanjali-db-shard-00-01.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>, <ServerDescription ('kanjali-db-shard-00-02.nl5eg.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('kanjali-db-shard-00-02.nl5eg.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')>]>

#

ehh whats happening?

lyric mountain
#

did you just wtf?

lusty quest
#

your Ceritifcate for Authentification expired

#

or is wrong installed

#

one easy and quick fix would be disable SSL auth and use passwords. then make sure that only your Server can access the MongoDB server

earnest phoenix
#

Someone familiar with require
My Folder structure
->Functions
--->parser.js
->Commands
--->Owner
------>update.js //file where parser.js should get required

cinder patio
#

../../Functions/parser.js

lusty quest
#
../ -> One Folder Up
../../ -> 2 Folder Up
./ -> Same folder
earnest phoenix
#

thx

lyric mountain
#

read .. as up

#

up/up/blabla.js

stiff lynx
#

Hi guys, I would like to do a 'in command' cooldown cause a lot of people write the wrong syntax of the command, and with the cooldown in message.js it messes up.
How can I do a cooldown only for the command works?

lyric mountain
#

you need to store the timestamp of previous executions

#

like, use executed the command at X time

#

he'll only be able to execute again after 10 seconds

#

so just check if current time is higher than X + 10000

smoky mica
#

i'm making my testing/making useless commands bot send a message every x amount of mins. how frequently should i make my bot send a message so that it doesn't abuse the discord api and ban me

umbral zealot
#

You should not be doing things on a loop at all.

smoky mica
#

Well, I just host it locally for 5 mins every once in a while to annoy my friend or is that also considered under abuse of API

sudden geyser
#

@smoky mica Discord does not have a well-defined duration for the time span between API requests. The current consensus is it should be "reasonable".

umbral zealot
#

That isn't relevant at all, we're talking of the API itself.

smoky mica
sudden geyser
#

Evie says you shouldn't be sending API requests in a loop in general

umbral zealot
#

Yeah basically there is no true safe zone. It's a sliding scale of possibility of being banned. So don't do it.

smoky mica
#

Oh, okay. Thanks 👍 😄

solemn latch
#

I think discord will eventually get more strict on the subject tbh.

umbral zealot
#

Maybe one day they'll figure out how to do these things heuristically

digital ibex
#

yo

#

i got a question

#

i have this:

lyric mountain
#

yep

digital ibex
#

and i also have this in the script tag: js function remove(id) { document.getElementById(id); } but i get an error saying document.getElementById is null, but if i log id it logs the role id

#

any ideas why?

lyric mountain
#

remember to remove the entry after the time expires

#

there're also self-expiring map libs out there

lyric mountain
sudden geyser
digital ibex
#

?

lyric mountain
#

so...what exactly are you trying to do with it?

digital ibex
#

i am trying to remove an element, a button by clicking on them

#

the id of the button is the role id btw

lyric mountain
#

that sounds like a very bad way of doing that

earnest phoenix
#

well

lyric mountain
#

but anyway

#

are you sure the buttons are receiving the right ids?

digital ibex
#

i just double checked and apparently they arent, so im assuming u cant have a class and id on the same element?

lyric mountain
#

you can

digital ibex
#

oh

lyric mountain
#

you just can't have two buttons with the same id

digital ibex
#

well its not rendering

#

yeah

earnest phoenix
#

you can create something like this:
set id to this "role-(roleid)"

digital ibex
#

lemme show u the html and whats actually being rendered

#

yes ik

#
<button class="modroles" id="<%- role.id %>" value="<%- role.id %>" onclick="remove("<%- role.id %>")">
``` and whats being rendered:
#

ok so, i got mixed up between 2 things but the id is being rendered btw, mb

#

wait wrong ss

#

mb for cluttering the channel

lyric mountain
#

yeah, the ids are the issue

#

also, you don't need the value if it's the same as the id

digital ibex
lyric mountain
#

make them unique

#

don't add another button if one with that ID already exists

digital ibex
#

ah alr kk

earnest phoenix
#

ctx.globalCompositeOperation = "destination-in"; it merges with the square shape i drew before.

const logo = await loadImage(`${__dirname}/../assets/images/kart/spotify.png`);
ctx.fillStyle = colors;
ctx.fillRect(53, 48, 48, 48);
ctx.globalCompositeOperation = "destination-in";
ctx.drawImage(logo, 53, 48, 48, 48);
#

what should i do?

lyric mountain
#

don't use comp ops

#

simple

earnest phoenix
#

i just want to recolor the logo.

lyric mountain
#

read that

#

has some helpful info regarding comp ops

#

what you want is basically hue

waxen meteor
#

I'm trying to re-tool my bot so I can manage it via a GUI (for example, start/stop, logging, data and config editing). Is there a way I can set up my bot as a class that can be run in a mainloop on another script instead of dealing with bot.run()?

solemn latch
#

typically, youd run those on separate processes

lyric mountain
#

as uwu said, you'd run 2 processes

#

one is the bot, and one being the dashboard

#

then estabilish a connection between the two (like REST requests or websocket)

#

the dashboard wouldn't manipulate the bot directly but make requests to it

earnest phoenix
# lyric mountain has some helpful info regarding comp ops

i already know.
it merges with the section named ... top code.. i am asking how to avoid this problem

// ... top code

const logo = await loadImage(`${__dirname}/../assets/images/kart/spotify.png`);
ctx.fillStyle = colors;
ctx.fillRect(53, 48, 48, 48);
ctx.globalCompositeOperation = "destination-in";
ctx.drawImage(logo, 53, 48, 48, 48);

// ... bottom code
lyric mountain
#

but what is the top code?

earnest phoenix
lyric mountain
#

I don't see the issue

#

could you show the output image?

wicked pivot
#

Do you know that she has the limit of chanel per guild?

lyric mountain
#

she who?

earnest phoenix
#

yeah

#

i recolor the logo like this.

lyric mountain
#

don't use destination-in, use hue btw

earnest phoenix
lyric mountain
#

dot dot dot

#

the docs I sent earlier explained it

earnest phoenix
#

wait.

lyric mountain
#

I don't really see the issue in your code, sorry

earnest phoenix
#

i am trying

earnest phoenix
#

hue

lament stump
#

This looks fine, until I add more characters to the texts

#

then this happens

lyric mountain
#

limit the widths

#

or use flexbox

lament stump
#

oop

lyric mountain
#

the child elements must have flex: 1

#

so each will have 1/3 of the space available

lament stump
#

code: .partner-container { display: flex; justify-content: space-between; flex-direction: row; justify-content: center; -webkit-display: flex; width: 100%; overflow: hidden; } .partner-title-center, .partner-title-right { margin-left: 5%; } .partner-title-left, .partner-title-center, .partner-title-right { text-align: center; font-weight: bold; font-size: 22.5px; font-family: 'Inter'; color: white; background: #060A13; border-radius: 20px 20px 0px 0px; border: 3px solid #7289da; width: 75%; height: 100%; } .partner-desc-left { margin-left: 0%; } .partner-desc-center, .partner-desc-right { margin-left: 5%; } .partner-desc-left, .partner-desc-center, .partner-desc-right { text-align: center; font-weight: bold; font-size: 17.5px; font-family: 'Inter'; color: white; background: #060A13; border-radius: 0px 0px 10px 10px; border: 3px solid #072176; width: 1110px; padding: 10px; height: 100%; }

lyric mountain
#

just send as a file bruh

lament stump
#

sorry forgot some unrelated code

lyric mountain
#

discord parses into a smaller embed

lament stump
#

me dum sory

lyric mountain
#

but anyway

lament stump
lyric mountain
lament stump
#

wdym

#

@lyric mountain

boreal iron
#

Just set a max-width for the boxes = width your header boxes

lyric mountain
#

it's hard to draw with a mouse yk

lament stump
#

didn't work

lyric mountain
#

if there are 3 elements, each with flex: 1 they'll each get 33% of the space available

lament stump
#

but how do I like add that to code

lyric mountain
#

dot dot dot

#

flex: 1

#

literally

#

add that to child elements' css

lament stump
#

what is a child element lol

heavy marsh
boreal iron
#

What do you mean by stop the spam?
If you don’t wanna send the messages then don’t do it. okeh

lyric mountain
#

you do know basic html right?

lament stump
#

i do, i just didn't know what children were

solemn latch
#

tiny drunk people. /s

lyric mountain
#

"how to remove child from parent with fork"

lament stump
#

@lyric mountain flex: 1; worked for the description things

#

but not for the titles

#

like this worked

lyric mountain
#

you need to put both inside a div

lament stump
#

i did

#

oh wait

lyric mountain
#

then use align-items: stretch

lament stump
#

do i need to apply flex: 1; to the container

lyric mountain
#

yes

lament stump
#

oh

lyric mountain
#

wait, what container are you saying?

#

btw, that image looks quite fine for me

#

what's the issue with it?

lament stump
#

this is the issue

lament stump
#
                <div class="partner-title-left">Test Server Title 1</div>
                <div class="partner-title-center">Test Server Title 2</div>
                <div class="partner-title-right">Test Server Title 3</div>
            </div>
            <div class="partner-container">
                <div class="partner-desc-left">Test Server Desc 1</div>
                <div class="partner-desc-center">Test Server Desc 2</div>
                <div class="partner-desc-right">Test Server Desc 3</div>
            </div>```
lyric mountain
#

yeah, that's the one supposed to be flexed

#

pro tip: use F12

#

keep experimenting with element inspect

#

instead of doing it blindfolded

lament stump
#

so i applied both flex: 1; and align-items: stretch; on the container and it still looks like htat

#

and this happened to the description

vivid fulcrum
#

no

#

your bot needs to have some original functionality

#

it can't be a carbon copy

lament stump
#

we actually do, as long as it has custom commands

#

we just decline 1 : 1 copies

earnest phoenix
#

Hello, I was wondering if anyone could help me with a quite simple task,

  var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=';

       let result1 = characters[Math.floor(Math.random() * characters.length)]
      ```
That is the current code I have to display 1 letter out of **CHARECTERS**, but I would like it to display 6 letters making a "Code".
vivid fulcrum
#

do a simple for loop that iterates 6 times

#

each time adding a character to a string

earnest phoenix
#

🤨 ......

vivid fulcrum
#

i.e.

let mystr = "";
for(;;) {
  mystr += characters[...];
}
#

also don't use var