#development

1 messages · Page 1061 of 1

pure lion
#

It's a text file

tulip ledge
#

You can make ur own file formats btw

pure lion
#

:o

tulip ledge
#

I once made a custom coding language using nodeJS and used a .cd (chickendev) extension

pure lion
#

So

#

Wait chickendev what did you use to write it?

#

Also

#

Fuc

earnest phoenix
#

Can anyone help me with discord.py/json prefix - I am so close for it to being done, just 1 tiny bug

tulip ledge
#

@copper cradle Any idea? On how to edit or at least read it so I can generate custom .bkm files

pure lion
#

@earnest phoenix code?

earnest phoenix
#
@client.event
async def on_guild_join(guild):
  chane = [x for x in guild.text_channels if x.permissions_for(guild.me).send_messages][0]
  await chane.send('Thanks for adding me!')
  servers = "{:,}".format(len(client.guilds))
  await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"{servers} servers | n!prefix"))
  with open('prefixes.json', 'r') as f:
    prefixes=json.load(f)
  prefixes[str(guild.id)] = defaultp
  with open('prefixes.json', 'w') as f:
    json.dump(prefixes, f, indent=4)
  
@client.event
async def on_guild_remove(guild):
  servers = "{:,}".format(len(client.guilds))
  await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"{servers} servers | n!prefix"))
  with open('prefixes.json', 'r') as f:
    prefixes=json.load(f)
    prefixes.pop(str(guild.id))
    with open('prefixes.json', 'w') as f:
      json.dump(prefixes, f, indent=4)```
#

It's not storing the default prefix automatically on join

pure lion
#

Hmmm

earnest phoenix
#

You have to set the prefix first, which I would like it to by default store it in the json

pure lion
#

Then on join set the prefix?

earnest phoenix
#

can someone help my github page is blank

#

I am

pure lion
#

Hmm

earnest phoenix
#
@client.event
async def on_guild_join(guild):
  chane = [x for x in guild.text_channels if x.permissions_for(guild.me).send_messages][0]
  await chane.send('Thanks for adding me!')
  servers = "{:,}".format(len(client.guilds))
  await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"{servers} servers | n!prefix"))
  with open('prefixes.json', 'r') as f:
    prefixes=json.load(f)
  prefixes[str(guild.id)] = defaultp
  with open('prefixes.json', 'w') as f:
    json.dump(prefixes, f, indent=4)
#

look.. I am

pure lion
#

Check if there's no prefix in the Json and make it !

earnest phoenix
#

there is none

#

it's not storing it in the json

#

automatically on join

pure lion
#

No

#

On join keep the json empty

earnest phoenix
#

what?

#

You're not answering my question nor helping lol

pure lion
#

:l

#

I don't know py and I'm doing my best give me a break

earnest phoenix
#

BY DEFAULT, it's not storing the default PREFIX

pure lion
#

Then don't

earnest phoenix
#

I want it to

pure lion
#

Make the prefix a global const

earnest phoenix
#

You don't just quit when something fails

tulip ledge
#

And see what happens?

pure lion
#

No

#

Nonono

#

On join
write ! to guildID object

earnest phoenix
#

can someone help for me making a github page

pure lion
#

Never githubbed

earnest phoenix
#

Still not working

#

can someone pls help me

pure lion
#

I'm doing my best-

#

No

#

Vs build tools still loading

stark abyss
#

why is one of my file just grey and not like other with color

pure lion
#

What

#

You made the extension wrong

#

Probably .jason

tulip ledge
#

So no one knows how to edit a bkm file?

pure lion
#

Or something dumb

stark abyss
#

i don't

earnest phoenix
#

fixed it

stark abyss
earnest phoenix
#
@client.event
async def on_guild_join(guild):
    chane = [x for x in guild.text_channels if x.permissions_for(guild.me).send_messages][0]
    await chane.send('Thanks for adding me!')
    with open('prefixes.json', 'r') as f:
        prefixes=json.load(f)

    prefixes[str(guild.id)] = "!"

    with open('prefixes.json', 'w') as f:
        json.dump(prefixes, f, indent=4)```
#

working code

#

Had to define !

stark abyss
pure lion
#

Try

tulip ledge
lyric mountain
#

bin? php???

#

wtf

earnest phoenix
#

does any one have good !help template

pure lion
#

Lang?

earnest phoenix
#

?

pure lion
#

What language

misty sigil
#

language

#

(and library)

#

PROTIP: make own embeds to gain skill

earnest phoenix
#

js
discord.js

pure lion
#

Template:

tulip ledge
#

So nobody knows how to open .bkm files?

earnest phoenix
#

im newbie

misty sigil
#

embeds aren't hard

pure lion
#

let help = new Discord.MessageEmbed()

gray zealot
#

Hi, so I want after the bot sends a message it will send Do you want to buy a house? then wait for an answer the proceed from there :

message.channel.send(`Do you want to buy a house?`).then(message => {
  const yes = require("./yes.json")
  if (message.content === `yes`|| `Yes`||`${prefix}yes`||`${prefix}Yes`){
    const yes = require("./yes.json")
  message.channel.send(yes.yes[Math.floor(Math.random() * yes.yes.length)])
  } else {
    if (message.content === `no` || `No` || `${prefix}no` || `${prefix}No`) {
      message.channel.send(`Place_Holder `)
    }
  }```
tulip ledge
#

I tried using a binary converter and the first line becomes this —wûü¶KProfile1\``3- the rest stay the same

#

Well it doesn't rlly stay the same

#

It likes make it weird?

#

This is the file

#

So is there just no way to open .bkm files?

tulip ledge
#
Thank you for your inquiry.

We do not support editing the mouse's firmware or using another software to adjust the settings such as the color.

This is to ensure that the mouse features and functionality will be affected.
​
Thanks!

Stay Glorious,

Sad

pure lion
#

Sad

tulip ledge
#

It sucks

#

As corsair supports it

#

And even has an API

#

And now I can't sync them 😦

#

I was ultimatly gonna make an alexa skill to change all my LED's to a set "profile"

pure lion
#

Btw chicken dev

#

How did you make a lang i wanna learn

earnest phoenix
#

@tulip ledge How İ can make my bot's add İ Want To verified it

pure lion
#

You what

tulip ledge
#

why the fuck do u tag me for this

#

Euhm @pure lion I basically just read the file and ran some if statements to check keywords etc

solemn latch
#

there should be a no tagging rule

#

🤔

#

i have had to disable adding people and pms for this server

#

and had to mute it

pure lion
#

Okay I'm gonna make a language with cpp tomorrow

#

I swear

#

If I get 1 reaction

solemn latch
#

this is by far the worst community as far as people abusing tags/pms/role tags that ive ever been in

pure lion
#

at tim X))))))))

iron scroll
#

Who can help me with MongoDB (Java)?

pure lion
#

Where do you need help

iron scroll
#

I get some error

tulip ledge
#

I found the code again @pure lion

quartz kindle
#

@tulip ledge what mouse is it?

#

or whatever it is you're trying to edit

tulip ledge
#

Glorious Model D

#

It doesn't seem to work @pure lion

pure lion
#

@tulip ledge i wanna see how it's structured, I'll probably look up a tutorial for a c++ interpreter

tulip ledge
#

Ok it works now

earnest phoenix
#

is there a way to delete a message from specific user like ?delete user 5

#

in javascript

tulip ledge
#

STUUR "Hello"

#

stuur means send in dutch

#

It also works with variables

#
DEF dice = "Dice"
STUUR dice
#

@quartz kindle Do u know a way to do it?

quartz kindle
#

you'd need to either figure it out from the file, or reverse engineer the software that created the file

tulip ledge
#

I don't know how to reverse engineer

#

Ok so

#

Is there anything I can do with this?

#

This might be helpful

earnest phoenix
#

Any docs

#

for emoji collecting

tulip ledge
#

Also the text.xml file is weird

#

It looks like some stuff for a game

strange saffron
#

Is there anyone here who has worked with Tornado and Discord.py before?

tulip ledge
#
        <tc_chiji1>PUBG - Topressure Special Keys</tc_chiji1>
        <tc_chiji2>Fire speed</tc_chiji2>
        <tc_chiji3>PUBG - Exit Press Gun Key</tc_chiji3>
        <tc_chiji4>Exit topressure options</tc_chiji4>
        <tc_chiji5>Red point mirror</tc_chiji5>
        <tc_chiji6>Three hair topressure</tc_chiji6>
        <tc_chiji7>A key must be specified as the exit gun mode key</tc_chiji7>
        <tc_chiji8>4X</tc_chiji8>
        <tc_chiji9>Topressure amplitude</tc_chiji9>
        <tc_chiji10>Exit topressure mode when press key again</tc_chiji10>
        <tc_chiji11>Specify other keys as exit topressure mode key</tc_chiji11>
        <tc_chiji12>Basic</tc_chiji12>
        <tc_chiji13>Shooting List</tc_chiji13>
        <tc_chiji14>Press button   </tc_chiji14>
        <tc_chiji15>Default</tc_chiji15>
        <tc_chiji16>Amplitude</tc_chiji16>
        <tc_chiji17>Office Mode</tc_chiji17>
        <tc_chiji18>Topressure color indicator</tc_chiji18>
        <tc_chiji19>Game Mode</tc_chiji19>
        <tc_chiji20>Press key number has reached the maximum value</tc_chiji20>
#

a piece of it

warm marsh
#

Profiles?

tulip ledge
#

Dont think so

#

Ok

quartz kindle
#

how do you apply those leds to your mouse?

tulip ledge
#

I think I have a virus

quartz kindle
#

do you open the app, and click some button on it?

tulip ledge
#

My pc is fucking slow now

#

Help me

#

I thin kI have a virus hel^pp

warm marsh
#

Yeah, in-order to change the LEDs you require to open the app.

tulip ledge
#

I dont know what happened

#

I tried to install something a couple minutes ago to read bkm files

#

And all of a sudden my pc is slow af

#

And it should

#

I have an i9-9900k and 16GB rams

#

It shouldn't be slow

quartz kindle
#

what did you install?

#

check task manager

warm marsh
#

i9 is a bit overkill?

quartz kindle
#

whats using high ram/cpu

tulip ledge
#

It's called Setup_File_Magic

#

When I do ctrl shift escape it goes fast again

#

When I close it

#

It goes slow again

#

I think its a trojan

earnest phoenix
#

What's a good way to make a documentation for my bot/website without html, css or something

pure lion
#

ok fuck it im making an interpreter for hode hh, who wants to vc pogey

proven lantern
#

@earnest phoenix use markdown

tulip ledge
#

Ok

#

I fixerd it

#

it's gona

pure lion
#

gggg

tulip ledge
#

I deleted the trojan

#

Like why would u make your trojan go to Program Files

#

And why the fuck would u call it Setup_Magic_Malw

pure lion
#

because trojan

#

anyway im gonna make a new file extension called .hh, and its going to be an interpreter aksdlkadghdshkgflskhfgs idk what im saying cd can you dm

tulip ledge
#

@quartz kindle (sorry for ping) do you know a way to do it?

quartz kindle
#

nope

tulip ledge
#

rip

#

Would it be smart to edit some values here?

LedOffVal=0
LedOpt1=1,1,0,1,0,0
LedOpt2=5,1,0,0,0,0
LedOpt3=3,1,0,0,0,7,255,0,0, 0,0,255, 0,255,0, 0,255,255, 255,0,255, 255,255,0, 255,255,255
LedOpt4=2,0,1,0,0,1
LedOpt5=10,1,0,0,0,1
LedOpt6=4,1,1,0,0,0
LedOpt7=7,1,1,0,0,2
LedOpt8=9,1,1,0,0,0
LedOpt9=0,0,0,0,0,0
#

Its in the Cfg.ini file

warm marsh
#

Change them see what happens.

tulip ledge
#

Would it be smart?

warm marsh
#

You've got a backup of the data, you'll be fine.

tulip ledge
#

Ok

proven lantern
#

i bet those are colors

#

LED colors

solemn latch
#

i bet they are LedOpts

tulip ledge
#

I don't think it's changing anything

warm marsh
#

You could learn to write it's mem.

pure lion
#

i bet they are colros

tulip ledge
#

?

warm marsh
#

Write to the mouse's onboard memory.

tulip ledge
#

How

warm marsh
#

Idk.

tulip ledge
#

I just tried something

#

Theres a set

#

Of possible DPI's

#

I bet this also is something

cunning gorge
#
ClientConnectorCertificateError(
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discordapp.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')]

Can someone help me with this issue that I get when running python3 main.py on a mac? Please ping me if you have a solution 🙂

warm marsh
#

Did you run the cert file?

tulip ledge
#

I'm just gonna stop I'm not gonna try anymore

earnest phoenix
#

What's the max a bot can purge without API abusing?

quartz kindle
#

@tulip ledge how do you apply the settings?

tulip ledge
#

wdym

quartz kindle
#

do you have to open the program and click on some apply button?

tulip ledge
quartz kindle
#

then you change the settings there, and apply, does your cfg file also change?

tulip ledge
#

mmmh

#

Actually I don't know

#

Let me check

cunning gorge
#

@warm marsh

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I get this error when I do

But I ran

python3 -m pip install --upgrade certifi

Instead
Its technically the same command I think, but it worked?
But the SSL error still pops up

opal plank
#

im brainfarting hard rn

tulip ledge
#

no it doesn't @quartz kindle

#

The thing is

quartz kindle
#

so the cfg doesnt actually do anyting

tulip ledge
quartz kindle
#

if you close the program, and randomize the cfg values, and open it again, does anything change at all?

tulip ledge
#

Nope

#

Already tried

quartz kindle
#

that program is not oemdrv?

tulip ledge
#

When opening my program it opens OemDrv

opal plank
#

Reeeeee

#

shouldnt promises be returned before the code continues?

#

or async functions

tulip ledge
#

Oh and I found the file that manages the text

opal plank
#

aaaarg fucking callbacks

tulip ledge
quartz kindle
#

the code continues if there is no await keyword

opal plank
#

fuck

#

any cheesy way to await it?

#

in sync code

#

tried function and promises

warm marsh
#

.then?

opal plank
#

i could but thats an index

#

i cant chain the whole thing inside

#

(could, but prob not the best)

amber fractal
#

Not really any way to await something in sync code

#

it's not made for it

opal plank
#

well yeah

#

i might throw it into a JSON file tbh

#

making the whole index async cuz of this will be a pain

amber fractal
#

you might be able to add a callback if you dont want to put it all in a .then

opal plank
#

even callbacks

#

its way too big

#

not worth it, i'll swap to JSON

proud condor
#

@cunning gorge you get Certificate error whenever you start the bot?

cunning gorge
#

@proud condor yes

proud condor
#

I had this problem

#

try opening Internet Explorer

cunning gorge
#

im on a mac

proud condor
#

Oh

cunning gorge
#

so should i download interet explorer

proud condor
#

Hmm wait

solemn latch
#

i think he just means your browser

#

🤔

proud condor
#

Nah

#

I have windows and i used internet explorer for this

#

But I've seen a solution for mac

lyric mountain
proud condor
#

Lol

pure lion
#
                        tChannel.awaitMessages(f, {max:1})
                        .then(async c => console.log(await tickets.set(`tickets.${msg.guild.id}.${msg.author.id}`, {
                            type: 'sale',
                            questions: [c.first().content],
                            userID: msg.author.id,
                            channel: tChannel.id
                        })))
                        tChannel.send(salesQ2embed)

i want the collector to collect the message and then send it but its not waiting

cunning gorge
#

oh yes pls tell me a solution, i havnt figured this out for 2 days now

#

Iv seen the download internet explorer thing solution but ye the mac...

proud condor
quartz kindle
#

@opal plank you cant return inside a callback, not even in an async function. what you need is to wrap the callback into a promise and return the promise

cunning gorge
#

Yea I ran the install certificate command

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I get this error when I do

But I ran

python3 -m pip install --upgrade certifi

Instead
Its technically the same command I think, but it worked?
But the SSL error still pops up

#

And some people have been telling me to use sudo with the command, however, I also get the error that my account isnt in the sudeors file....

opal plank
#

@quartz kindle ugh thats gonna mess up this code rather quickly

#

ty tho

proud condor
#

@cunning gorge Then idk, sorry mate

pure lion
#

jsjsj

#

pliz hep

cunning gorge
#

@proud condor its okay thx for trying

proud condor
#

c:

pure lion
#
                        tChannel.awaitMessages(f, {max:1})
                        .then(async c => console.log(await tickets.set(`tickets.${msg.guild.id}.${msg.author.id}`, {
                            type: 'sale',
                            questions: [c.first().content],
                            userID: msg.author.id,
                            channel: tChannel.id
                        })))
                        tChannel.send(salesQ2embed)

i want it to send the message upon collected

#

but its not waiting

quartz kindle
#

you need to await tChannel.awaitMessages

#

and not use .then there

pure lion
#

okay

earnest phoenix
pure lion
#

god i wish my bot was here rn (bin the file)

#

tim, how would i get the collected messages then?

quartz kindle
#

the promise returns them

pure lion
#

so like

#

So like

#

...awaitMessages({}).(something goes here)

quartz kindle
#
let promise = tChannel.awaitMessages(...) // this returns a promise
// promise is a Promise
// there are two ways to get data out of a promise
let data = await promise
console.log(data);
// this forces the code to wait for the promise, and returns the value to the current scope
// or
promise.then(data => console.log(data))
// this doesnt force the code to wait, the code will continue normally, and when the promise arrives, a new code starts inside the callback, and the value is given there
pure lion
#

oooo sexy

#

got it

earnest phoenix
#

ping me if you help me with the above

pure lion
earnest phoenix
#

what is this

#

?

#

tell me what it is and i get in i don't trust

quartz kindle
#

its a website for you to paste your code in, and it gives you a link to post your code

#

instead of sending a text file with your code

earnest phoenix
#

aaa

#

😎

#

I need everything in a message so that the API abuse is not prohibited

quartz kindle
#

an embed can only have 25 fields

#

if you have more than 25 fields, you need more messages, or use description instead of fields

lyric mountain
#

or paginate

earnest phoenix
#

and I can not do it by categories?

quartz kindle
#

yes, if you have a lot of commands, maybe make pages with categories

earnest phoenix
#

there are 89 commands ._.XD

lyric mountain
#

or something like !help moderation

#

that'd be the "cheap pagination"

earnest phoenix
#

seems complicated

lyric mountain
#

lul THAT seems complicated?

earnest phoenix
#

yes

#

xd

lyric mountain
#

that's the easiest 'n cheapest way of pagination

earnest phoenix
#

Can i make the bot send you a file with the commands?

torpid sail
#

Any good nsfw api ideas for discord.js?

lyric mountain
#

Any good nsfw api ideas for discord.js?
@torpid sail not the right place to ask ig

#

Can i make the bot send you a file with the commands?
@earnest phoenix don't

torpid sail
#

Where do I ask

lyric mountain
#

idk, like, you CAN ask here

torpid sail
#

I need a new nsfw api for nsfw commands in discord.js so xD

lyric mountain
#

but very few people would actually be able to help with that

#

easiest nsfw api would be phub itself

earnest phoenix
#

phub 😳

pseudo hare
#

How can I make that this code throw an error when the stack size gets too large instead of having it crash the V8 context?

async function loop_generator () {
    return function () {
        return loop.apply(null, arguments);
    }
}

async function loop (c) {
    print(c);
    (await loop_generator())(c + 1);
};

loop(0);
lyric mountain
#

about ur lastest question, sending a file with commands would result in one of 4 outcomes:

1 - nothing, the user didn't give "send files" perm to the bot
2 - nothing, the user don't trust the bot enough to even open the file
3 - confusion, the text file doesn't have any visual formatting
4 - success, the user reads and understand how each command work

#

@earnest phoenix

earnest phoenix
#

xD

quartz kindle
#

you can build an infographic

#

and send them in an image

opal plank
#

CANVAS

lyric mountain
#

just be careful not to exceed 8 MB file limit

#

and use jpeg

opal plank
#

cuz fuck quality

quartz kindle
#

quantized png > jpg

opal plank
#

bot do respect the 8mb limit right?

lyric mountain
#

yep

earnest phoenix
#

you can build an infographic
wowowo 89 comands in a photo???

opal plank
#

aight

lyric mountain
#

wowowo 89 comands in a photo???
@earnest phoenix what about zerotwo that have 700+ lol

opal plank
#

just zip the commands folder into a .rar and send them

lyric mountain
#

lul

#

send a tar.gz

earnest phoenix
#

@earnest phoenix what about zerotwo that have 700+ lol
._.xd

lyric mountain
#

better yet, send a .exe file that installs the instructions on their pc

opal plank
#

i got 51 on the D, 32 on T and 13 on Y

#

almost 100 commands total

#

¯_(ツ)_/¯

lyric mountain
#

mine has 145

quartz kindle
#

i have like 10 lol

#

but hundreds of arg combinations

lyric mountain
#

your bot is highly specialized

#

lul

pure lion
#

oh speaking of canvas

lyric mountain
#

so specialized that it's like throwing a rock and splitting an atom in half

opal plank
#

would you say a bot that works in 3 different IRC's is specialized?

#

simultaneously, i must add

pure lion
#

when i do filltext it doesnt change the text per running of the command

#

the first person to use it has their tag on the canvas, then everyone else who uses the command gets the first users tag

tulip ledge
#

dude apples are so fucking good

pure lion
#

DUDE IKR

quartz kindle
#

lmao

tulip ledge
#

u still haven't solved it Dice?

pure lion
#

someone help me ive been stuck for 2 days

#

nope

tulip ledge
#

send the code again

pure lion
#

ok

#

i gotta bin it with my sexy bot command

tulip ledge
#

lmao

#

can u send me the code to like bin a file? I wanna make an app where I can just do like bin <file> in the cmd line and it'll bin it would be pretty usefull

pure lion
#

wait bin a file path

#

yo

#

how can i ```cpp
std::cin

in node
#

also bin^

tulip ledge
#

Og fuck I forgot to take of the sticker of the apple

#

I just ate half a sticker

pure lion
#

lmao

lyric mountain
#

I just ate half a sticker
@tulip ledge you'll awake the [S T I C K Y F I N G E R S] stand that way

quartz kindle
#

@pure lion you need to create the canvas inside the command

#

otherwise you're always reusing the same canvas

pure lion
#

O H

#

THAT MAKES SO MUCH SENSE WHY AM I A RETARD

#

:'D

quartz kindle
#

reusing the canvas is good for performance, but if you dont manually clear it, it will have leftover data from previous commands

tulip ledge
#

oh haha

#

stickers are nasty yuk

pure lion
#

afihasdfhasjldhfaslkdhjfasjklfh im laughing at myself

quartz kindle
#

but if you reuse the canvas AND have async functions in it, then 2 commands executed at the same time will both write on the same canvas at once and create a mess

#

lmao

pure lion
#

;D

#

ok it works

opal plank
#

anyone know why my second instance of VSC doesnt format objects like in the left?

pure lion
#

hopefully

#

how do i format objects like the left?

opal plank
#

huh?

#

on the left they are collapsible/uncollapsible, on the right they are raw

pure lion
#

it always does like the right

opal plank
#

nah, theres an option to make objects display like that with a debugger

#

but i cant find it

pure lion
#

oh

opal plank
#

asking if someone knows which option it is, im pretty sure its on launch.json

fervent goblet
#
        let episodes = []

        chars.episode.forEach(async (episode) => {
         const {body} = await request.get(episode)
         episodes.push(body.name)
        });
        console.log(episodes)

why does this array return empty? im so confused

#

@low orbit what error did it return when you used it?

tulip ledge
#

@fervent goblet Make it a promise

#

The console.log is executed before the body.name is being pushed

#

@low orbit What do you mean doesn't work

#

Theres alot of thigns that might not work

fervent goblet
#

so put an await before it?

tulip ledge
#

no

#

Make it a promise

frosty swan
#

hi

small prairie
#

I prefer using for

tulip ledge
#

Help?

pure lion
#

Oh it says .sql

#

Did you not install py and windows build tools

tulip ledge
#

Yes

pure lion
#

When?

tulip ledge
#

I restarted pc and I have a diff error now

pure lion
#

O?

tulip ledge
pure lion
#

Hmmmmmm

#

var No = [
sql,
clue
]

still merlin
#

your code is trying to open a file that it cant from thr looks of it

tulip ledge
#

yeah I'm just not gonna use canvas

still merlin
#

the*

pure lion
#

Dude I just did npm i canvas

#

Is that what you did cd?

tulip ledge
#

?ope

#

Nope

#

I did npm i canvas

pure lion
#

H m

tulip ledge
#

I'm just gonna use canvas then

north hollow
#

I need help to make a private DM so if they cant send them it will send them a error

tulip ledge
#

.catch()

paper phoenix
#
        let episodes = []

        chars.episode.forEach(async (episode) => {
         const {body} = await request.get(episode)
         episodes.push(body.name)
        });
        console.log(episodes)

why does this array return empty? im so confused
@fervent goblet

let episodes = [ ];

await Promise.all(
  chars.episodes.map(
    async episode =>
    episodes.push( ( await requests.get( episode ) ).body )
  )
);

console.log( episodes );
topaz fjord
#

spoon-feeding is amazing isn't it

slender thistle
#

map supports async functions?

paper phoenix
#

The map returns an array of promises.

#

But yes

crisp geyser
#

Does anyone know why I get this everytime I satrt my bot? Didn't happen to me before... Bot is still working good tho

0|zbot   |   size: 0,
0|zbot   |   timeout: 0,
0|zbot   |   [Symbol(Body internals)]: {
0|zbot   |     body: PassThrough {
0|zbot   |       _readableState: [ReadableState],
0|zbot   |       readable: true,
0|zbot   |       _events: [Object: null prototype],
0|zbot   |       _eventsCount: 2,
0|zbot   |       _maxListeners: undefined,
0|zbot   |       _writableState: [WritableState],
0|zbot   |       writable: false,
0|zbot   |       allowHalfOpen: true,
0|zbot   |       _transformState: [Object],
0|zbot   |       [Symbol(kCapture)]: false
0|zbot   |     },
0|zbot   |     disturbed: false,
0|zbot   |     error: null
0|zbot   |   },
0|zbot   |   [Symbol(Response internals)]: {
0|zbot   |     url: 'https://discordapp.com/api/v7/gateway/bot',
0|zbot   |     status: 429,
0|zbot   |     statusText: 'Too Many Requests',
0|zbot   |     headers: Headers { [Symbol(map)]: [Object: null prototype] },
0|zbot   |     counter: 0
0|zbot   |   }
0|zbot   | }```
#

Just happens at startup

sudden geyser
#

Did you reach the 1000 limit or something for the day

paper phoenix
#

So if you want to asynchronously iterate over something, but wait until they're all finished before proceeding, use Promise.all and an async function in map

crisp geyser
#

1000 limit for what? @sudden geyser

smoky spire
#

You can only login 1000 times a day before getting blocked

crisp geyser
#

But I'm not getting blocked

#

Bot still working good

smoky spire
#

Yeah ur just getting ratelimited

crisp geyser
#

Don't understand the issue here, I'm getting rate limited but not limited?

#

As I said, bot is still working good, isn't it supposed to be blocked from login if it is limited?

sudden geyser
#

The 1000 I was thinking about would reset your token and email you, so that's probably not the issue here.

smoky spire
#

since ur getting ratelimited on login it'll mostly likely just take longer to start up

crisp geyser
#

Nah, not getting longer either

fervent goblet
#

@paper phoenix thanks

crisp geyser
#

This issue is not bothering me, but just wanted to solve it so my logs don't get spammed

sick cloud
#

how do you people count how many messages your bot sees

crisp geyser
#

And I can prevent any future issues related to this

sick cloud
#
  • 1 on the msg event?
wicked pivot
#

how to export embed?

#
const {RichEmbed} = require('discord.js')


var config = {
    ball : async(bot) => {
        let helpembed = new RichEmbed()
      .setTitle("Page d'help de la commande `8ball`")
      .setDescription(`> > **Information**
      > Envoie une réponse a votre question 

      > > **Utilisation** 
      > !8ball [question] 

      > > **Exemple** 
      > !8ball comment vas-tu ?`)
      .setColor("#10B1C1")
      .setThumbnail(bot.user.displayAvatarURL)
      .setFooter(`© ` + bot.user.username, bot.user.displayAvatarURL)
      return helpembed
    }
}

module.exports = config```

```js
if(!args[0]) return message.channel.send(EmbedExport.ball(bot))``` ![Detente_ref](https://cdn.discordapp.com/emojis/547849405210951708.webp?size=128 "Detente_ref")
sick cloud
#

send(ball(bot))

#

require the file with the ball code in it

copper cradle
#

huh

still badge
#

=m/spotify

#

-_-

#

=m/.

#

=m/h

#

-_-

#

aeon help

cunning gorge
#

Hey I am sending a user a DM

bot.users.cache.get(`524002223181660167`).send("Hi");

It does send, but in my console it gives

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
#

Like it works but throws that, should I be concerned?

still badge
#

vx_spotify

#

vx_help

#

-_-

copper cradle
#

@still badge you can't run commands on this channel

still badge
#

sry

#

i didnt even realise

#

sry

earnest phoenix
#
        user = message.mentions[0]
        if user:
            await message.channel.send(user.id)
        else :
            await message.channel.send(message.author.id)```
#

help

copper cradle
#

what's the problem

#

first

#

what are you even doing

#

and

slender thistle
#

What's going on with that code

copper cradle
#

that doesn't seem very python at all

slender thistle
#

It does

copper cradle
#

well yes

#

I'm on moibile so I can't really read it

#

it looks weird

slender thistle
#

@earnest phoenix Does that error out when you don't mention anyone?

#

I'm on phone too mmulu

copper cradle
#

lol

earnest phoenix
slender thistle
#

for (character of MyString)
MySecondString += character + " "

MySecondString.Trim()

#

There's also the option of using a for loop and only adding the space if the index isn't equal to string.length - 1

#

@earnest phoenix use an if for message.mentions

#

Because you are trying to access the first element of an empty list

still badge
#

bonjour

#

i need help with spotify command

earnest phoenix
#

@earnest phoenix use an if for message.mentions
@slender thistle what?

slender thistle
#

if message.mentions will check if the list is empty

earnest phoenix
#

ok

#

if message.mentions in user:

slender thistle
#

So you first check if a list has ANY elements before trying to access one

#

No

#

Literally just message.mentions

glossy elk
#

im so confused

#

what im doing wrong

earnest phoenix
#

if message.mentions:

glossy elk
low shard
#

How i can add login with discord to my bot site?

zinc condor
#

preparing for my next discord bot made in Go, set up a unique mc like permission system with node and now im working on API for website

autumn aspen
#

Guys I wish I could get a free code that I want as my birthdays present from u :/

zinc condor
low shard
#

How i can add login with discord to my bot site?

glossy elk
#

nvm

#

https://discord.com/api/oauth2/authorize?client_id=695075574946725979&redirect_uri=https%3A%2F%2Fibot.cloud.libraryofcode.org&response_type=code&scope=identify

#

i got it

slender thistle
#
# will work
my_list = [1,2]
if my_list:
    var = "yes"

# will not work because my_list is empty
my_list = []
if my_list:
    var = "yes" ```
#

@autumn aspen birthday isn't an excuse to be spoonfed

autumn aspen
#

I wish tho :/

low shard
#

How i can add login with discord to my bot site?

zinc condor
#

just learn how to code

glossy elk
#

nvm i got it

slender thistle
#

Riku it's hopeless

zinc condor
#

@low shard asking the same thing every 5 seconds will not help

slender thistle
#

Yup, spamming your question won't help anyone, including you

low shard
#

@zinc condor sry

zinc condor
#

KEKW when i ask questions its mostly about the api part itself

still badge
zinc condor
#

altho im kinda writing my own library so

#

thats a given

#

if you are on javascript or Golang use the canvas library @still badge

still badge
#

ok ty

zinc condor
#

you can find documentation online on how to do it

still badge
#

ty

summer basin
#

hello would someone like to code an entire bot for me send me the script give me all the credit and realize this is a joke?

solemn latch
#

yeah i gotchu @earnest phoenix

#

oof

#

sorry snowflake

hearty wind
#

how does it calculate the percentages ?

sonic lodge
#

why does this: bot.users.resolve('[my user id here]').dmChannel (discord.js v12) return null? the bot was able to send a message to me

solemn latch
#

pretty basic math @hearty wind

hearty wind
#

right but im saying whats the code to check reactions.

#

and how is it constantly updating?

solemn latch
#

reaction collectors probably

#

or just occasionally checking

low shard
#

You can help me guys?

solemn latch
proven lantern
#

shouldn't it be something like

user.dmChannel```
sonic lodge
#

bot.users.resolve('[my user id here]') gives the user object just fine, but its dmChannel property is null

low shard
#

How i add to my html site login with discord?

solemn latch
#

dmChannel doesnt have to exist, right?

proven lantern
#

i think you need to fetch it to get the whole object

low shard
#

?

sonic lodge
#

strange, tried that and i still get null

proven lantern
#

user.createDM()

hearty wind
#

what is the logic to go back and edit a message?

#

apologies. i get the logic

solemn latch
#

fetch the message

#

use .edit

proven lantern
#

const channel = await user.createDM()
channel.send('')

hearty wind
#

i cant find the python command.

solemn latch
#

would be in the docs

zinc condor
#

@sonic lodge so ok i think i know why

#

discord had an update recently

#

lemme see

solemn latch
#

🤔

zinc condor
#

i fixed thie before

solemn latch
#

i didnt think DmChannel has to exist.
if it doesnt exist, a DM hasnt been sent between the two users before

#

i thought

zinc condor
#

oh wait wrong problem

#

im dum

#

i thought it was a new limit discord released

low shard
#

How i add to my html site login with discord?

solemn latch
#

@low shard oauth

zinc condor
#

@low shard i told you, stop asking and start looking around, google and problem solve yourself

hearty wind
#

ok im confused.

zinc condor
#

if its just javascript then you should find some libs or info online

solemn latch
low shard
#

@solemn latch tnx

hearty wind
#

my bot only has two commands !poll and !update when people type !c4 why does it even bother checking.

zinc condor
#

im prepared for him to ask the same question later because discord official api docs are too hard catahhhhhhhhhhhh

hearty wind
#

it just says command not found.. because it's part of a different bot.

zinc condor
proven lantern
#

@hearty wind for some reason bots get all messages and not just messages with the prefix

solemn latch
#

i found the oauth stuff really well explained

hearty wind
#

its stupid 😦

#

no work around. unless i have a weird prefix?

zinc condor
#

yeah its well explained when you actually have dev experience,
i assume someone asking the same question over and over without response is a sign of a new script kiddie who has yet to figure out the fundamentals and is just looking at examples @solemn latch

proven lantern
#

@hearty wind you have to filter the messages yourself

zinc condor
#

i would know this because i was this

#

and so was everyone

hearty wind
#

await message.edit(content="newcontent")

this is the command to edit... now i need to figure out... how to count the emojis and constantly edit.

#

is it something with async to constantly edit?

#

as the emojis build up?

solemn latch
#

there are reaction events, or a reaction collector

hearty wind
#

ok i will read the api.

#

thank you.

sick cloud
#

way easier guide if you don't get the api docs

solemn latch
#

oh did he say he was using js?

#

i didnt see

sick cloud
#

you can't use non-js in websites??

#

html can only use js scripts

solemn latch
#

🤔

quartz kindle
#

you can use wasm :^)

sick cloud
#

fair enough

zinc condor
#

dorime @sick cloud um, i would think that he might be talking about backend too since oauth needs callbacks

solemn latch
#

🤔

zinc condor
#

its not all frontend

sick cloud
#

you can do callbacks on front end

zinc condor
#

backend doesnt have to be js

sick cloud
#

just saying

zinc condor
#

no like

#

bruh

#

if you add oauth to website

sick cloud
#

its still a decent guide

#

regardless

#

of lang

#

it explains it more simply

zinc condor
#

you need to callback to the internal api and have it send back some sort of token to keep in cookie storage

#

that determines auth i think

cursive spindle
#

C# backend zoomeyes

zinc condor
#

asp

cursive spindle
#

Yes

#

I use all the time

zinc condor
#

i hear about blazor actually

#

sounds nice for large projects but id rather stick with vue

cursive spindle
#

Ope

earnest phoenix
#

ncpl

honest perch
#

And thats what we call spaghetti

valid frigate
#

you need to use a return statement

#

also use async/await

earnest phoenix
#

alright

#

ty

valid frigate
#

np

earnest phoenix
#

btw just to make sure where do i put the async

#

hope this isnt a dumb question

#

but yeah

valid frigate
#

message.channel.send()

earnest phoenix
#

alright ty

stable nimbus
#
client.on('guildCreate', (guild) => {
    const message = require('discord.js')
    const embed01 = new MessageEmbed()
    .setAuthor(guild.me.displayName, client.user.displayAvatarURL())
    .setTitle(':wave: Hello! :wave:')
    .setColor(0xA1ee33)
    .setDescription(`Hello! And thank you for adding me to your server! Here is a bit about me:`)
    .addField('My Purpose: ', "To continue to bring legitimacy to all roleplay servers! Making in game chat easier to use!")
    .addField('My Owner: ', "I am developed and coded by Fuzzy Wilson, with love and hate in discord.js@12.2.0.")
    .addField("Getting Started: ", "To start, please use my /news command to find out what has happened lately! After you can use /help to get started on other things.")
    .setFooter(copyright.copyright);
    
    const embed02 = new MessageEmbed()
    .setAuthor(guild.me.displayName, client.user.displayAvatarURL())
    .setTitle(":wave: Server joined! :wave:")
    .setColor(0xA1ee33)
    .setDescription("I have been added to a discord server!")
    .addField('Server count: ', client.guilds.cache.size)
    .addField("Server Name: ", guild.name)
    .addField('Server Owner: ', `@${guild.ownerID}`)
    .setFooter(copyright.copyright);
    
    message.channel.send(embed01)
    .then(
        client.channels.cache.get('682406158363131982').send(embed02)
    )
});```
This is currently what I have in my index, but I do get an error when I try to get this to work.
```js
(node:72) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
    at Client.<anonymous> (C:\Users\dargc\Desktop\Coding\TheFluffBot\index.js:80:18)
    at Client.emit (events.js:322:22)```
Trying to get my bot to send a message when its added to a server.
honest perch
#

Isnt it message.embed

still badge
#

i need help making a spotify time and detail canvas

#

like*

stable nimbus
#

Sure it can be either.

slender thistle
#

@stable nimbus you need to choose a channel

#

There's no message, let alone message.channel

stable nimbus
#

All I want it to do is send a message to the first one that it can send to, before the bot role comes into play, like a general chat, but popular channel doesn't exist anymore.

slender thistle
#

A for loop with a return once a channel with permissions has been found

stable nimbus
#

Need more help because I'm still basic bitch level of what I've learned

#

Have any guides that might be able to help me out?

slender thistle
#

Don't know any, but the general logic is to access something along guild.textChannels (if there's such property), use channel.permissionsFor(guild.me) and get the permission to send messages from there

stable nimbus
#

Okay.

slender thistle
#

I suggest searching the documentation because I highly doubt the methods I mentioned actually exist

stable nimbus
#

Okay, thank you, that was a lot more helpful that the official server.

earnest phoenix
#

i remove the break

zinc condor
#

does anyone have an invite to the discord api server

misty sigil
#

u mean discord-developers?

sudden geyser
earnest phoenix
sudden geyser
#

wot

stark abyss
#

how to export a function and use it as it has parameters?

#

i have this function
function getRandomNumber(start, range) {
let getRandom = Math.floor(Math.random() * range + start);
while (getRandom > range) {
getRandom = Math.floor(Math.random() * range + start);
}
return getRandom;
}

#

that i need for many other files

sudden geyser
#

module.exports?

stark abyss
#

okay but how would i

opal plank
gritty bolt
#

can someone explain to me/direct me to some resources on how to use forEach() in an arry in nodejs?

opal plank
#

actually scratch that

#

fuck that website

#

here

#

proper docs

gritty bolt
#

I want to pull a stat from an API that appears in each array of JSON

#

But I dont know where to start

opal plank
#

for each bad btw

gritty bolt
#

whats better?

opal plank
#

for () while(), use proper loops

proven lantern
#

i disagree with that

#

use forEach map and reduce

#

all good functions

stark abyss
#

ok thx

gritty bolt
#

Im using the League API specifically so would this work if I want to pull the gameId from each of these?

"matches": [
        {
            "platformId": "NA1",
            "gameId": 3493499599,
            "champion": 82,
            "queue": 400,
            "season": 13,
            "timestamp": 1594693066874,
            "role": "SOLO",
            "lane": "TOP"
        },
        {
            "platformId": "NA1",
            "gameId": 3492570676,
            "champion": 82,
            "queue": 400,
            "season": 13,
            "timestamp": 1594604322875,
            "role": "DUO",
            "lane": "TOP"
        },```
quartz kindle
#

array.map() would be better in this case

gritty bolt
#

how does that work?

quartz kindle
#

well, still depends on what you want to do

gritty bolt
#

I want to pull the gameId from a giant list of those

quartz kindle
#

array.map() is good if you want to transform the array of objects into an array of gameIds

gritty bolt
#

I need to plug the gameId into another function

#

In the API

quartz kindle
#

do you need to await a response from the api?

#

for each id?

gritty bolt
#

Each time yes

quartz kindle
#

so a for loop is better

gritty bolt
#

can you link me to some info on that?

quartz kindle
opal plank
#

fuck

#

beat me to it

quartz kindle
#

for of will also work well in this case

gritty bolt
#

which would be easier?

quartz kindle
#

for of is easier to use

proven lantern
#

does that require a hasOwnProperty check?

gritty bolt
#

ok thanks

opal plank
#

i love their descriptions ```Summary
Sharp minds might have noticed that all higher-order functions can actually be written with for...of inside blocks instead.
In my opinion, intent can usually be better expressed with higher-order functions than with loops.
Use forEach if you’re experienced enough and absolutely know what you’re doing.

If you’re returning something in a forEach callback, you don’t know what you’re doing.
If you’re chaining forEach after map or filter, you don’t know what you’re doing; reduce is an ambiguous case, you most likely don’t know what you’re doing.
If you’re using an async callback function, you most likely don’t know what you’re doing (see rationale).```

quartz kindle
#

hasOwnProperty would be in for in when looping over object keys

#

and even then, only needed if its a complex or non-standard object

proven lantern
#

i use reduce to define booleans. instead of doing let x = false; if(y){ x = true }
i never use let

quartz kindle
#

wat

opal plank
#

wat

proven lantern
#

let is bad

quartz kindle
#

troll is good

opal plank
#

the bait

proven lantern
#

everything should be a const

#

i follow functional programming rules

quartz kindle
#

i mean

opal plank
#

const is a signal that the identifier won’t be reassigned.
let is a signal that the variable may be reassigned, such as a counter in a loop, or a value swap in an algorithm. It also signals that the variable will be used only in the block it’s defined in, which is not always the entire containing function.

quartz kindle
#

i use let everywhere because its shorter than const

proven lantern
#

const validTeams = teamSizes.reduce((acc, val) => val && acc, true);

misty sigil
#

hello
How do I make my prefix non case-sensitive

opal plank
#

just put everything to lowerCase

#

¯_(ツ)_/¯

proven lantern
#

^

misty sigil
#

ah yes

opal plank
#

or be a dick and set everything to uppercase, just to see the world burn

quartz kindle
#

i use toUpperCase lmao

opal plank
#

some people just like to see the world burn

misty sigil
#

OR BE A DICK AND SET EVERYTHING TO UPPERCASE, JUST TO SEE THE WORLD BURN (like this?)

opal plank
#

i bet you use snake_case too

quartz kindle
#

nope

proven lantern
#

XMLHttpRequest or XmlHttpRequest?

opal plank
#

its still got on my bucket list to make a code so atrocious it'd put a developer into a coma

#

might add toUpperCase() on that

quartz kindle
#

i mean

#

just copy luca's code

opal plank
#

shots fired

#

is Luca open source?

quartz kindle
#

its troll code

opal plank
#

already triggered

#

Ln10

proven lantern
#

me too

#

@opal plank

#

never use let ever

quartz kindle
#

you've seen nothing

#

scroll down

opal plank
#

what?

#

dude

proven lantern
opal plank
#

@proven lantern const is a signal that the identifier won’t be reassigned.
let is a signal that the variable may be reassigned, such as a counter in a loop, or a value swap in an algorithm. It also signals that the variable will be used only in the block it’s defined in, which is not always the entire containing function.

proven lantern
#

In functional programming, you can’t modify a variable after it’s been initialized. You just can’t. You can create new variables just fine – but you can’t modify existing variables, and this really helps to maintain state throughout the runtime of a program. Once you create a variable and set its value, you can have full confidence knowing that the value of that variable will never change.

quartz kindle
#

i dont need js to babysit me, i use let because its shorter to write

proven lantern
#

what about the optimizations that come with const

opal plank
earnest phoenix
#

even with const the type can be modified with reflection

#

so uh

proven lantern
#

objects can be modified too

#

unless you use Object.freeze

opal plank
#

use the goddamn variables when they are suppose to be used ffs

#

better yet

#

dont even declare them

#

done

#

no declaration

proven lantern
#

global scope is sad

opal plank
#

no let vs const vs var war

proven lantern
#

using let like const is okay i guess

#

just dont mutate

opal plank
#

aight, fuck it, too much procrastination, back to building bot N5

solemn latch
#

🤔

#

Just made my first api pogey

#

Extremely basic, but it works

opal plank
#

api.on('ping')
return sender ('pong');

#

fuck, why did i come back?

solemn latch
#

lol

#

not that basic

#

but like, getting xp for a user for each guild the user is in, along with basic info about that guild(name, id, icon)

#

that kinda stuff

stark abyss
#

so I have this function I wanna export

module.exports = {

  randomNum = function getRandomNumber(start, range){
  let getRandom = Math.floor(Math.random() * range + start);
    while (getRandom > range) {
      getRandom = Math.floor(Math.random() * range + start);
    }
  return getRandom; 
  }  
}

I think I did that part right, but how do I use it then?
const { getRandomNumber } = require(./../../function);

proven lantern
#

()=>{}

stark abyss
#

where?

proven lantern
#

oh, nm

stark abyss
proven lantern
#

are you using node or react?

stark abyss
#

bro i don't even know

#

node

#

i think

earnest phoenix
stark abyss
earnest phoenix
#

react is an SPA framework for node

#

lol

stark abyss
#

node node

proven lantern
#

react does exports differently than node

earnest phoenix
#

it doesn't

proven lantern
#

export default

stark abyss
#

okay I am not interested in that

earnest phoenix
#

that's not react

#

that's es6 import export

#

lol

stark abyss
proven lantern
#

react uses that

stark abyss
#

okay so whoever helps me first wins

#

go go go

proven lantern
#

    randomNum: function getRandomNumber(start, range){
        let getRandom = Math.floor(Math.random() * range + start);
        while (getRandom > range) {
            getRandom = Math.floor(Math.random() * range + start);
        }
        return getRandom;
    }
}```
#

= => :

stark abyss
#

?

proven lantern
#

randomNum = function => randomNum: function

stark abyss
#

okay well then how would i use it in different file?

#

const { getRandomNumber } = require(./../../function);

proven lantern
#

const { randomNum } = require('./path/to/file')

stark abyss
#

i am so lost

#

first why are u doing randomNum: function

#

getRandomNumber is the function

proven lantern
#

randomNum is the key

stark abyss
#

oh

earnest phoenix
#

hey

#

i need help with html css

quartz kindle
#

if you're only exporting a single function, you dont need to wrap it in an object

earnest phoenix
#

the top

stark abyss
#

oh

earnest phoenix
#

is not at the top

#

the header won't go to top

quartz kindle
#

you can export an anonymous function directly

#

module.exports = function(start,range) {}

proven lantern
#

you can change the function to a arrow function too. you're not using this so you should be fine

quartz kindle
#

yes

earnest phoenix
#

are you sure you have the license to use uni sans lol @earnest phoenix

proven lantern
#

module.exports = (start,range) => {}

earnest phoenix
#

no

#

DMCA takedown incoming

#

it qas on google for free

#

was*

#

uni sans is not free

#

it was on google?

#

you need a license to use it

#

google-fonts

stark abyss
#

these are some confusing times

earnest phoenix
#

it said free use for non-commercial

#

so idk

proven lantern
#

google fonts have a good license

earnest phoenix
#

thx for wasting time tho

proven lantern
#

you can use those

earnest phoenix
#

I can't get my gargle at top to the top

proven lantern
#

inspect and look for padding or margin

sick cloud
#

body
margin: 0

#

usually sorts it

earnest phoenix
#

nope

#

i tried

#

here is link

opal plank
#

someone here bored with twitch account by any chance?

proven lantern
opal plank
#

need an extra hand(account)

earnest phoenix
#

??

#

ben

#

that's not even my code

proven lantern
#

built in to the browser

sick cloud
#

the margin is on the html element for some reason

#

put margin: 0 0 on the html element

lyric mountain
#

Who uses em for margin calculations?

earnest phoenix
#

ok I fixed it

#

can you help me

sick cloud
earnest phoenix
#

remove the space

sick cloud
#

cool

earnest phoenix
#

at bottom

#

it's huge lol

sick cloud
#

overflow: none works but i'd be looking into why it's there first

earnest phoenix
#

over flow none

#

does not work

#

I've tried

opal plank
#

ads

sick cloud
#

doesnt work lmao

#

@earnest phoenix overflow: hidden

opal plank
#

i dont even bother clicking

#

¯_(ツ)_/¯

earnest phoenix
#

I did..

#

it didn't work xd

sick cloud
#

none and hidden are different

#

what element are you putting on

proven lantern
#

we can't see it until it's approved

quartz kindle
#

remove width and height from container

proven lantern
#

body { height: 100vh}

earnest phoenix
#

I did

proven lantern
#

hacks

earnest phoenix
#

it still didn't do anything

sick cloud
#

learn css, tbh

quartz kindle
#

looks fine here

proven lantern
sick cloud
#

do F5 to refresh

earnest phoenix
#

wtf

#

is element

#

style

#

Ctrl f5 hard refresh

proven lantern
#

add that to the body

earnest phoenix
#

it's not working

sick cloud
#

lol its just F5 for me

earnest phoenix
#

ben

#

paste code

quartz kindle
#

element style is when you add css directly to the inspector, to test it live

earnest phoenix
#

Not always

proven lantern
#
    overflow: hidden;
}```
sick cloud
#

@earnest phoenix hit F5 or ctrl + F5 on your kbd

earnest phoenix
#

Some css works fine but sometimes needs hard refresh

sick cloud
#

it's already fixed

earnest phoenix
#

bruh

#

it's still

#

doing it

#

I a dded code

quartz kindle
#

dont add that width and height, he has some margins and paddings somewhere, those widths and heights will cause overflow, and hiding overflow with hidden its not ideal lol

#

doing what? what are you trying to fix?

earnest phoenix
#

the gap...

proven lantern
#

use flex layout

quartz kindle
#

what gap?

sick cloud
#

i see nothing wrong lmfao

quartz kindle
#

you mean you want to center the entire thing verically?

earnest phoenix
#

dude

#

why am i only person

#

who sees it

#

the gap

#

from bottom

#

it's huge

quartz kindle
#

thats a totally different thing

#

we thought you were talking about something else lol

#

thats vertical centering

earnest phoenix
#

oh

#

well

#

the vertical centering

#

is fat af

quartz kindle
#

for vertical centering you need to control the height

earnest phoenix
#

how

quartz kindle
#

but its more complicated than that

proven lantern
quartz kindle
#

for example height: calc(100vh - 37px) (37px being the header height)

#

just for having the correct height on main

#

then you need to calc the height difference to make the block appear in the middle

earnest phoenix
#

um

#

idk

quartz kindle
#

or use flexbox, but even with flexbox it will not be perfectly centered because of the header and because your item has a huge empty space above it

earnest phoenix
#

bruh

#

I don't want

#

these huge spaces

quartz kindle
#

for example, this is with flexbox and the heigh fix

earnest phoenix
#

?