#development

1 messages · Page 1628 of 1

pale vessel
#

😐

quaint wasp
#

idk..

#

The error is this:
DiscordAPIError: Invalid Form Body DICT_TYPE_CONVERT: Only dictionaries may be used in a DictType at RequestHandler.execute (E:\Program Files\smug\code\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (node:internal/process/task_queues:93:5) at async RequestHandler.push (E:\Program Files\smug\code\node_modules\discord.js\src\rest\RequestHandler.js:39:14) { method: 'put', path: '/guilds/774085711791783998/bans/388452965884755970', code: 50035, httpStatus: 400 }

pale vessel
#

.

quaint wasp
#

😐

#

waaiitt

#

Wow

#

what do u use to edit pics?

solemn latch
#

sharex

quaint wasp
#

dang

#

I do snipping tool

#

guys

#

HELP.

quaint wasp
#

..

pale vessel
#

Are you-

quaint wasp
#

Not even sure if thats an error tho..

#

problem*

quaint wasp
pale vessel
#

Change it to an object containing the property reason

#
{ reason: text }```
quaint wasp
#

?

boreal iron
pale vessel
boreal iron
#

Poor flazepe

quaint wasp
#

so I change () to {}?

#

no,

#

?

boreal iron
#

As he said and don’t forget the key "reason"

quaint wasp
#

who deleted that?

#

yes, i didnt.

modest maple
#
Question:  what about some anime themed bots?
Answer: Pick Crunchy
Question:  give me dank memes
Answer: Pick Dank memer

Man you know when you're pro-procrastinating when you make a natural language search engine for bots bloblul

umbral zealot
#

Remember this guy was banned 6 months ago from my server for not wanting to learn simple JavaScript. And, ironically, it was because he was begging for a ban command. So we used ours 🤣

quaint wasp
#

HEY HEY HEY HEY

boreal iron
#

The world is small, hmm

quaint wasp
#

That was 6 months ago!

umbral zealot
#

Hasn't evolved at all in 6 months. It's a shame.

pale vessel
#

I actually feel bad

quaint wasp
#

not at all.

pale vessel
#

6 months ago?

umbral zealot
#

Yeah exactly in 6 months you should have made SOME progress.

quaint wasp
#

I DID

pale vessel
#

I actually feel bad

umbral zealot
#

So why are you still stuck on a ban command.

pale vessel
#

I said that twice now

quaint wasp
#

see all that? thats my cmds that my bot has!

pale vessel
#

Hopefully those aren't copy-pasted

umbral zealot
#

And yet you don't know the difference between a string and an object.

quaint wasp
umbral zealot
#

Clearly you vampired your way through all of those. Poor souls you sucked dry.

quaint wasp
#

Object: Has mass.

pale vessel
#

Don't make excuses

quaint wasp
#

String: Is a string.

pale vessel
#

There's lots of resources around in the internet

umbral zealot
#

Ok so change the string to an object. Let's goooo

pale vessel
#

I learned everything by just googling

modest maple
#

Man ive learnt Rust to a intermediate to advanced level in the time it's taken you to write a command bloblul

solemn latch
#

most people here have learned on their own tbh, one of the smartest people here is entirely self taught

quaint wasp
#

😐

#

ya

#

THATS ME

solemn latch
#

no tim

umbral zealot
#

No... Hahahahahahahabahahahahahahah

pale vessel
umbral zealot
#

The Karen is strong in this one.

quartz kindle
pale vessel
#

Lurker

quaint wasp
#

Karen?

modest maple
quaint wasp
#

😐

umbral zealot
#

Yeah Tim is awesome.

quaint wasp
#

Well then..

#

I AM THE 2ND AWSOME!

quartz kindle
quaint wasp
#

😁

umbral zealot
#

Seriously.

quaint wasp
#

JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. ... In addition to objects that are predefined in the browser, you can define your own objects.19 февр. 2021 г.

quartz kindle
#

arent you that santa claus dude?

umbral zealot
#

Great so now define your own object.

#

With a key called "reason"

quaint wasp
#

const reacson = ...

#

?

quartz kindle
#

yes, wasnt your name santa claus at somoe point?

modest maple
quartz kindle
#

or was that someone elsew

umbral zealot
#

Make that an object.

quaint wasp
#

uhh

#

It was YEARS ago before I got banned from here for a year or so..

quartz kindle
#

lmao

boreal iron
umbral zealot
#

Didn't ignore it. He doesn't understand the answer. it's not the same.

solemn latch
quaint wasp
#

then how?

umbral zealot
#

He's going to ask until someone spoonfeeds him the full answer

boreal iron
modest maple
#

this is a yikes, im not even a JS dev and i know this bloblul

quartz kindle
#

google "js object literal"

misty sigil
#

i am a js dev and i now want to consume multiple pints of beer just from looking at this conversation

umbral zealot
#

Same.

quartz kindle
#

beer tastes like soap

quaint wasp
#

A JavaScript object literal is a comma-separated list of name-value pairs wrapped in curly braces. Object literals encapsulate data, enclosing it in a tidy package. This minimizes the use of global variables which can cause problems when combining code.

craggy pine
#

I'll take an Ale ty

umbral zealot
#

Ok fine. Some great apple cider.

quartz kindle
#

that i can dig

#

:)

misty sigil
#

Eh, some Scotch whiskey then

boreal iron
#

Well coding JS after 14 years of php actually requires hard drugs... trust me

umbral zealot
#

We're not giving you the answer this time. I think we're all done doing that

solemn latch
#

objects are what, an hour long subject if your just learning about it the first time

quartz kindle
#

an hour long?

#

thats a lot

quaint wasp
#

I dont know how to make an object..

quartz kindle
#

dude

umbral zealot
#

So keep reading and learn.

quartz kindle
#

didnt you see a single example?

umbral zealot
#

Don't just read the first sentence.

quartz kindle
#

when you googled them?

umbral zealot
#

LEARN.

boreal iron
umbral zealot
#

He doesn't understand this code.

#

He has no idea what any of this is unfortunately.

boreal iron
#

You’re reaping yourself

craggy pine
#

Bec all of those cmds are copied n he claims he learned it all.

quaint wasp
#

no

boreal iron
#

Huh wtf is reaping

quaint wasp
#

siriosly

solemn latch
#

i mean, hes clearly worked with objects many times making those commands

quaint wasp
#

I came up with some

boreal iron
#

Damn auto correction

quartz kindle
solemn latch
#

since djs is entirely object based

umbral zealot
#

Objects is like day 1 JavaScript... This guy has been at it for years.

misty sigil
#

oh god

quaint wasp
#

not years

misty sigil
#

how long then

dusk scarab
#

Hi, how do you make it so in my warning system I also send it to a specific channel? like guild.channels.cache.get('channelid').send(message) but how do I get it to send it in that channel?

umbral zealot
#

Exactly like that.

#

That's exactly the way to do it.

dusk scarab
#

wait what

#

but its giving me an error

#

lol

#

wait

#

i see why

#

nvm

umbral zealot
#

What error?

quaint wasp
dusk scarab
#

maybe not nvm

modest maple
misty sigil
#

long but doesn't know how to make an object

#

wow

quartz kindle
#

i object to your object

umbral zealot
#

Let's just all agree to stop the spoonfeeds.

pale vessel
#
function createObject() {
    return {};
}

const object = createObject();```
boreal iron
solemn latch
#

can you modify a const object?
👀 silly question
const objects can be modified but you cannot add new methods/properties right? sweat

craggy pine
#

So much for that.

pale vessel
#

You can

umbral zealot
#

You can't redefine it. But you can modify them.

pale vessel
#

const objects can be modified but you cannot add new methods/properties right?
Only if the object is sealed

umbral zealot
#

You can't do const thing = blah twice. But if an object is in a const you can edit its prooerties.

solemn latch
#

coolio, i dont know why i never bothered to learn it

quaint wasp
pale vessel
#

Yes

misty sigil
#

bahhu

#

lmfao

quaint wasp
#

😐

misty sigil
#

flaz please

pale vessel
#

How else am I supposed to do it?

solemn latch
#

no other way

quaint wasp
#

idfk

pale vessel
#

Exactly.

umbral zealot
#

Poor thing is even more confused now.

quartz kindle
#

did you read the link i sent?

dusk scarab
quartz kindle
#

i mean

#

how the hell is this hard to understand

#

@_@

dusk scarab
misty sigil
#

wtf tim

pale vessel
#

Wtf

misty sigil
#

i dont get it

#

how do i

#

wha

quartz kindle
#

LOL

quaint wasp
pale vessel
#

I didn't know that was possible blobpain

misty sigil
#

no

pale vessel
#

Yes

misty sigil
#

i didn't have a clue i could do that i was always doing

const object = function () {return {};}()
boreal iron
#

At least one normal person in here...

quaint wasp
dusk scarab
#

nvm

dusk scarab
boreal iron
#

is php even installed ?

umbral zealot
#

Stop saying it doesn't worj

#

And tell us the error

pale vessel
#

That name

dusk scarab
umbral zealot
#

Ok so define the guild

sudden sky
#

x2 it happens to me too, what I do it’s put a html file that redirects to the php XD

umbral zealot
#

Or get it from whatever event you're in

boreal iron
#

You told your webserver to how to deal with .php files?

dusk scarab
pale vessel
#

var/www you using apache?

umbral zealot
#

probably message.guild

dusk scarab
dusk scarab
umbral zealot
boreal iron
#

Set that in your http.conf?

#

SetHandler application/x-httpd-php

#

httpd.conf

quaint wasp
#

Is this how it should be?

#
function reason() {
    let reason = args.slice(1).join(' ');

    if (!reason) reason = 'Unspecified';
}```
boreal iron
#

Errr Unix or Windows?

quaint wasp
#

?

solemn latch
#

it should be an object, not a string

umbral zealot
modest maple
#

also where are you getting args from

umbral zealot
#

Woo still trying.

pale vessel
#

So in etc?

boreal iron
#

Huh I don’t see that post wtf

#

Can you link it?

quartz kindle
#

you're over complicating

pale vessel
#

Try cd httpd/conf

boreal iron
#

Just to make sure you’re using php tags in your php file, hmm?

umbral zealot
boreal iron
#

Before going on

quartz kindle
#

lmao

umbral zealot
#

Literally has no idea what any of this JavaScript even means, after 6 months...

quaint wasp
#

what do u mean @quartz kindle ?

misty sigil
#

o h god

#

6 months?

pale vessel
#

It might have been my fault

quartz kindle
umbral zealot
#

I don't often say someone doesn't have the mental capacity to do programming but this is clearly an extreme case.

misty sigil
#

this is clearly a case where you need to say taht

blissful coral
#

uhhh?

pale vessel
#

Check console?

blissful coral
boreal iron
blissful coral
#

nothing in console

umbral zealot
#

Extreme trying to compete with top.gg lol

#

J/k

blissful coral
boreal iron
#

Usually

pale vessel
#

What FakeE said, my bad

blissful coral
#

@umbral zealot its nothing to do with listing

umbral zealot
#

I know I was joking 🤣

pale vessel
#

also, it's because top.gg is unstable

#

that's the joke

umbral zealot
#

White page is weird. Look at the source?

pale vessel
#

What about etc/httpd.conf

boreal iron
#

Which distro are u using?

#

php-fpm?

blissful coral
#

I console.log()ed used on my backend and it is all there

#

I don't see why it would work for 1 user and not another

#

I have catches in place to redir back if it can't find the user

boreal iron
#

Installing it on Linux should usually add the handler to the webserver conf

quaint wasp
blissful coral
#

oh lord

quaint wasp
#

oh cmon

#

is that wrong again?

wise umbra
#

🙄

boreal iron
#

Just ls your etc folder and search for apache2 and/or httpd

#

Depending on the package it may uses different directories, who knows

#

Looks inside apache2

#

May it’s a symbolic link only

modest maple
quaint wasp
#

defineing

#

define

misty sigil
#

constant

quaint wasp
#

ya

misty sigil
#

isnt it

pale vessel
#

constantin

quartz kindle
quaint wasp
#

String

#

and..

quartz kindle
#

yes

boreal iron
#

Oh there we go, it’s called apache2 conf in that package

quartz kindle
#

how would you create a string

quaint wasp
#

I forgot.

misty sigil
#

6 months of javascript?

quaint wasp
#

Isnt string a number?

misty sigil
#

BAHYSAGYH

quartz kindle
#

no

#

string is text

#

number is number

boreal iron
#

The rest of the configuration files can be found in conf-enabled

misty sigil
#

string, number???

blissful coral
#

String, Boolean, Number, Map, Object, Array

quaint wasp
#

oh

#

ya

boreal iron
#

And mods-enabled

misty sigil
#

What about Function

quaint wasp
#

that...

pale vessel
#

some of those aren't primitive though

quartz kindle
#

so show me how would you create a string

blissful coral
#

Shush matthew

misty sigil
#

ok ok

boreal iron
#

Actually need to unload my car

quaint wasp
#

message.channel.send("stuff")

boreal iron
#

I’m back soon

misty sigil
#

thats not creating a string

pale vessel
#

that's creating a promise

quartz kindle
#

well, its sending a string

quaint wasp
#

const (something) = "stuff";

quartz kindle
#

yes

#

now an object is also a data type

#

just like a string

#

so how do you create an object?

boreal iron
#

Make sure to add the file handler

#

<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>

#

brb

quaint wasp
#

const?

#

no

#

function?

quartz kindle
#

no...

modest maple
#

man, this is

#

this is something else

quartz kindle
#

you need to relearn how variables work

misty sigil
#

fuck i need at least 2 bottles of whiskey at this point

boreal iron
#

And reload or restart your webserver after changing the conf files

#

That’s required

quartz kindle
#
const abc = "something"
  ^ variable declaration
       ^ variable name
                 ^ value

declaration and name work the same way everywhere.
you just change the value

blissful coral
modest maple
quaint wasp
#

oh

blissful coral
#

When I pass user into the header, the header is being loaded because I can console.log(user) and it sees it

quaint wasp
blissful coral
#

And there are catches for the header partial that make sure it doesn't error out

modest maple
quartz kindle
quaint wasp
#

ok..

quartz kindle
#

its as simple as this

#

the left part, declaration and name are the same for everything

#

the right part, the actual value, is all you need to change

quaint wasp
#

ur name is John Doe?

blissful coral
modest maple
craggy pine
quartz kindle
#

ok now this is trolling

pale vessel
umbral zealot
#

He's copying from a tutorial you should have read 6 months ago.

pale vessel
#

lmao

misty sigil
#

bHFUHUAIHIHIU

modest maple
misty sigil
#

tim is revealed as John Doe

modest maple
#

change that to a face palm

umbral zealot
#

Tim revealed as a const

earnest phoenix
#

hey guys i had trouble in the code machine?? what is an object?

quartz kindle
#

im john const

misty sigil
#
const tim = {firstname: 'John', lastname: 'Doe'}
```?
quartz kindle
#

john constantine

blissful coral
#

Anyone wanna help me now Thonk

quaint wasp
#

oh

#

lol

royal herald
pale vessel
modest maple
earnest phoenix
#

and now i sleep

blissful coral
#

Whatcha need

pale vessel
#

bye

modest maple
#

code ig, logs etc...

quaint wasp
#

so

#

What I DO need to change is this:

#

wait

#

no

modest maple
blissful coral
#

What is your error

quaint wasp
#

the Unspecified one

umbral zealot
#

Seeing you struggle is so.... Painful

modest maple
#

how... how are you like this

pale vessel
#

You. Need. To. Use. An. Object.

quaint wasp
umbral zealot
#

It literally hurts my soul.

quaint wasp
#

😦

quartz kindle
#

lmao

umbral zealot
#

I'm physically pained by your inability to seriously want to take the time to learn.

misty sigil
#

can't hurt my soul if i drink it away

craggy pine
#

Goto codecademy or something and take the JS corse.

pale vessel
umbral zealot
#

Speaking of which I need to get alcohol to cope tonight.

craggy pine
#

clearly you need to take it like 5 more times.

quaint wasp
#

😐

misty sigil
#

at LEAST 5 more times

umbral zealot
#

Or come to terms with the fact that if you've been trying to learn 6 months and can't understand even objects, you should find another hobby.

quaint wasp
#

But I dont have lots of free time like u guys have..

pale vessel
#

Seriously, 6 months...

modest maple
#

what makes you think we have free time mmLol

umbral zealot
#

I don't think time is the problem.

quaint wasp
quartz kindle
#

the thing is, you are either willfully ignoring or skipping the base rules of javascript

umbral zealot
#

I have a full time job and a kid. What's your excuse?

blissful coral
#

@modest maple

misty sigil
#

i could pick a random programming language right now

quartz kindle
#

programming languages have a very clear set of rules

torpid crown
#

Hi

misty sigil
#

and spend 3 hours researching it

#

and still be better than him

quartz kindle
#

if you know the rules, everything becomes easy

modest maple
umbral zealot
#

Tim knows the rules, and so do I.

blissful coral
torpid crown
#

Do I still can use the BDscript in glitch & heroku?

blissful coral
#

For some reason when I do it with my user profile, it works fine

quaint wasp
blissful coral
#

And when I do it for someone else it goes blank

quartz kindle
pale vessel
blissful coral
#

But some users work some don't

torpid crown
#

Bruh

blissful coral
royal herald
umbral zealot
#

Extreme are you sure you're not silently dismissing errors somewhere?

torpid crown
#

I know lots about BDscript and Java %0

blissful coral
#

@umbral zealot I just made a final check of the one thing that it could have been but it didn't fix it so I am pretty sure it isn't that

quartz kindle
#

any errors on client side console?

blissful coral
#

Nope

quartz kindle
#

nothing on server side console either?

blissful coral
#

Well now that I did a check on the level thing for incase they didn't have the roles it fixed most

#

But a few still don't work

#

Wait let me see something

#

Is guildMember#roles always populated?

#

For djs

#

it mwould be with the guild id right?

pale vessel
#

if member exists then yes

blissful coral
#

Yeah

quartz kindle
#

yes

#

how did you define founduser?

torpid crown
#

And also one question do I can use heroku to host my bot without any use of git hub and also make the commands of the bot designer for discord to work perfectly i mean heroku hosting the bot without ads and BDFD will manage the commands if it not so I had to watch a lot of ads per day

blissful coral
modest maple
quartz kindle
#

do you have fetchAllMembers:true?

blissful coral
modest maple
#

its their whole marketing model

blissful coral
#

in client options?

quartz kindle
#

yes

pale vessel
#

Extreme aren't you using master

modest maple
#

if you dont wanna watch ads buy a vps and actually code a bot bloblul

blissful coral
#

Well you fixed it @quartz kindle

#

thx

#

What? @pale vessel

lyric mountain
#

actually, coding a bot would be a good solution to imediate issue

torpid crown
quartz kindle
#

do you actually need fetchAllMembers tho?

blissful coral
#

I guess

lyric mountain
#

handwritten codes are ads-free

quartz kindle
#

it will kill your ram

pale vessel
#

Discord.js master

modest maple
#

yikes....

lyric mountain
#

and totally free

blissful coral
pale vessel
#

So no fetchAllMembers option thonkconga

quartz kindle
#

ye master removed fetchAllMembers

pale vessel
#

How did it work then

lyric mountain
blissful coral
#

oh wait no

#

I am on stable

pale vessel
#

Ah

blissful coral
#

For this project

lyric mountain
#

"When a product is free, YOU'RE the product"

quartz kindle
#

you should probably remove it anyway

#

and fetch the member instead

#

member = await guild.members.fetch(id)

#

user = await client.users.fetch(id)

lyric mountain
#

just as a note, by going full-code way your bot will become 100% lighter and 200% faster

torpid crown
lyric mountain
#

please, both are like car and carpet

torpid crown
#

Javascript

#

I always call it Java I like this name MEGAflushed

boreal iron
#

Could you solve it, I’m back at least a bit

lyric mountain
#

also, it's never a waste of time when you're learning a prog lang

#

consider it an investment

boreal iron
#

huh

lyric mountain
#

also no, when you learn what everything do it becomes really easy to understand what's happening

#

js is among the easiest langs

nimble kiln
#

php-curl is probably not installed

boreal iron
#

Aye

torpid crown
#

Well I use the BDscript beocuse it can shortcut the commands from 100 words to 1 word and find the error easy and the js it would be very very hard to find the erorr between 1M words

boreal iron
#

It’s not only curl

#

There are lot of additional package required

#

But I’m unable to help while driving

nimble kiln
#

For that error it's just curl missing

boreal iron
#

Can help u in a few hours

lyric mountain
#

And no, JS tells you exactly the line and column where the error is

nimble kiln
#

You can create a php file with this content in the same directory:

phpinfo();
?>```
#

and check if it's being loaded

quartz kindle
#

but the drawback is exactly that

#

it only works for BDFD

#

and nowhere else

nimble kiln
#

CTRL+F through it and search for curl

lyric mountain
#

Just think about it, you can spend time both learning BDFD or JS, but you can't put BDFD in your resumee

torpid crown
nimble kiln
#

only that?

#

nothing else?

#

Then it's most likely not loaded/installed

pale vessel
#

Aren't those just the credits

lyric mountain
pale vessel
#

if you can't find this, then it's not installed

lyric mountain
#

Also, you barely have freedom in BDFD

#

You'll be stuck to generic stuff

nimble kiln
#

I didnt have it installed on my server. After installing it this showed up:

#

Try some apt install php-curl again

#

and maybe restart your webserver afterwards

lyric mountain
#

Like, not even a crisscross game is possible with that tool

torpid crown
lyric mountain
#

Javascript

nimble kiln
#

You're installing PHP 8.0 curl but your webserver is using PHP 7.0

#

🙂

#

php7.0 modules being loaded

quartz kindle
#

just install php8

#

xD

pale vessel
#

You should upgrade to PHP 8 anyway, it's a huge improvement

nimble kiln
#

yeah use php8 if your script supports it

crimson vapor
#

hi Tim

nimble kiln
#

you have to change your webserver configuration for that domain to use the PHP8 engine

boreal iron
#

Just remove the whole installation and reinstall it including your needed extensions

nimble kiln
#

^or that if it's fresh I guess? 😄

boreal iron
#

Don’t forget apache2-php

lyric mountain
torpid crown
lyric mountain
#

It's your choice, but don't regret futurely

#

Javascript is the one that has most tutorials out there

crimson vapor
#

you can make a bot better than most on top.gg with basic js knowledge and understanding of how to google things ngl

lyric mountain
#

Don't watch videos tho

torpid crown
#

If i chose Java I would live in pain and a huge deamge to me

lyric mountain
#

Javascript

#

Or js if you want to go short

torpid crown
lyric mountain
#

Yes, it'll be a pain

crimson vapor
#

videos aren't bad as long as you are watching the correct ones. Don't watch tutorials. Do watch videos explaining the concepts.

lyric mountain
#

The first step is the hardest

#

The one that hurts the most

crimson vapor
#

I agree first understanding the language is the hardest

#

it takes the most time

boreal iron
#

U need to remove all installed packages

lyric mountain
#

I'd say 90% the time you need to make a bot is the time you take to do the first step

#

Everything after is faster and easier

boreal iron
#

Then search a LAMP stack install guide without actually installing MySQL

#

If you don’t need it

nimble kiln
#

D: Dont just delete the directory

torpid crown
lyric mountain
#

No it cant

boreal iron
#

Oh huh don’t delete directories... it’s not Windows

lyric mountain
#

No programming lang can damage you

nimble kiln
#

Use apt remove php7* --purge
^this also deletes files

boreal iron
#

You need to run these commands via ssh

#

How did you install it

torpid crown
#

Just look at this script holy hell and what even is this {}?

lyric mountain
#

That's a scope

torpid crown
#

And how mcuh spaces did he spam

lyric mountain
#

That's no spam, that's formatting

torpid crown
#

And it's very long I couldn't even take screen shot of it all

lyric mountain
#

It's not long

nimble kiln
#

does the phpinfo() output PHP8 now?

lyric mountain
#

Actually it's because ur cellphone breaks the lines

#

The actual code is way shorter

nimble kiln
#

Well now it's not using PHP at all

torpid crown
#

Did he worte that all with his self?

lyric mountain
#

Not at all

#

Most of it is generated by ctrl + space

#

Or by the IDE itself

#

Like the imports

earnest phoenix
#

why

boreal iron
#

How did you install php?

#

Post the command

torpid crown
#

What to do now?

pale vessel
boreal iron
#

Wrong

lyric mountain
boreal iron
#

Don’t get me wrong but you need to listen to the tips

lyric mountain
#

And read

nimble kiln
#

Not technically wrong but it's not everything he needs

lyric mountain
#

A lot

boreal iron
#

It’s technically wrong

#

Install all required package regarding apache2-php, curl etc.

torpid crown
boreal iron
#

As I said above

quartz kindle
#

java is not javascript

quartz kindle
#

its two different things

modest maple
#

two very different things

quartz kindle
#

like cry said

#

java and javascript are like car and carpet

#

they have 0 relationship with each other

earnest phoenix
pale vessel
#

Why?

nimble kiln
#

sudo apt install libapache2-mod-php8.0 php8.0-curl

#

idk what other extensions you need

torpid crown
boreal iron
#

@earnest phoenix sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} && sudo apt-get install libapache2-mod-php -y

modest maple
#

my IDE is registering this commented out python code as SQL bloblul

boreal iron
#

Without MySQL

#

If you don’t need it of course

quartz kindle
modest maple
#

doesnt even have to be JS

nimble kiln
#

check your site if it loads now, where you got the curl error before

modest maple
#

most popular languages have a discord lib support

boreal iron
#

Reload the webserver

quartz kindle
#

yes

quartz kindle
#

lmao

pale vessel
#

mentally

misty sigil
#

gets put in hospital because of js?

boreal iron
#

Yeah because you installed the package without the required ones I mentioned before

torpid crown
#

Guys

#

Can ya just leave me alone

#

Forget about it please

quartz kindle
#

i was just answering your questions lol

misty sigil
#

** dies because he learned js a few decades ago **

#

must’ve been the js

torpid crown
#

It's 3 am and I just waana go to my bed take some rest and wake at I don't know maybe 12 pm

lyric mountain
#

If you wanna be a bdfd slave....to each it's own

torpid crown
#

I will leave my phone open

#

Or maybe I can't sleep wtfbro

boreal iron
#

Google for install LAMP on Debian AND install it as explained without MySQL actually

#

But make sure to remove all packages before

#

Can’t actually write any commands while driving dude, it’s just a little bit of work for you to do

#

If you can’t do it you will have to wait until I’m at home

earnest phoenix
pale vessel
#

Are you using gifencoder?

#

Pog

boreal iron
#

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-debian9

Can’t actually read it but it should be up to date, skip the MySQL part and packages

DigitalOcean

A 'LAMP' stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This stack typically consists of the Linux operating system, the Apache web server, a MariaDB database, an

#

Did you install a phpxx-curl package?

#

Did you reload the webserver?

earnest phoenix
earnest phoenix
boreal iron
#

Changing extensions for php or the webserver will always require a reload of the webserver - keep that in mind

lyric mountain
#

When u rescale an image it uses an interpolation by default

#

Cubic, linear, etc

boreal iron
#

Alright

earnest phoenix
pale vessel
#

@earnest phoenix Did you enable cumulative for gif-frames?

pale vessel
#

Try enabling that

#

It's in the options

earnest phoenix
#

yes but, look this gif xd

#

original: yeg

lyric mountain
#

Change disposition mode to replace

lyric mountain
#

Don't use cumulative

earnest phoenix
#

thonkang, ok

lyric mountain
#

Cumulative stacks frames

earnest phoenix
#

I think it will help me

lyric mountain
#

The one on top is a cumulative gif

#

The one below is a replace gif

#

Both will give u the same quality, but the one above will be smaller

#

Also, depending on color count, the one above will have more colors available

earnest phoenix
lyric mountain
#

If only discord supported apngs...

#

Trillion colors, small af sizes, translucent pixels, smoooooooth

clear notch
#

I don't know if this is a thing yet but, is there a something that tracks issues on github repo and sends a message when an issue is made to be sent to a set channel?

quartz kindle
#

you dont need a bot for that

clear notch
#

Webhook?

quartz kindle
#

yes

clear notch
#

How?

quartz kindle
#

create a webhook on your discord server

#

then go to github, and create a webhook there

#

and put the discord webhook data into the github webhook configuration

clear notch
#

Cheers Tim, I think I got the rest now

quartz kindle
#

the api blocks cross origin requests

#

is the api yours?

#

add a Access-Control-Allow-Origin header

dusk scarab
#

how do I make a simple blacklist? and also have it shift to lowercase? currently I have this:

client.on(`message`, message =>{
    if(message.author.bot) return;

    const command = message.content

    if(message.content.has('word')){
        message.delete({ timeout:50 })
        message.reply(`that word is not allowed`)
    }
});

my issue is that is says message.content.has is not a valid function, so how do I make it a valid function and also shift it to lowercase?

quartz kindle
#

what is your api made with?

#

you can set headers in php

blissful coral
#

Now the fun part

quartz kindle
#

with a *

blissful coral
opal copper
#

so i want my bot to be able to delete the trigger for the command, so would i make that command require the bot to have manage_messages or how should i go about it

quartz kindle
#

ye

lyric mountain
#

Why would the bot require manage message for deleting a database related info?

#

Just rewrite the user to have it, not the bot

opal copper
#

no like i type the command, and i want it to delete the command i sent

lyric mountain
#

Ah, then require manage msg

opal copper
#

and should i do that per command or globally

lyric mountain
#

Per command

opal copper
#

ight thanks :P

lyric mountain
#

Np

boreal iron
#

Instead of adding the headers you can also curl localhost/path/file.php

#

But not your php path directly

#

If you wanna block external access make sure to throw a htaccess file into the directory your php files are in with "Require local" for the directory directive

#

Or creating a virtual host

#

Or even more simply just don’t add the webserver to your firewall exceptions

#

Dropping all incoming connections on port 80

lyric mountain
#

Be careful not to lock yourself out of the vps tho

boreal iron
#

Which shouldn’t be opened up by default anyways

boreal iron
lyric mountain
#

Yeah

#

It's so easy to fck yourself

boreal iron
#

Your server will end up as bot server anyways without any exception

lyric mountain
#

Like, one wrong step

#

Just keep the ssh port open

#

Everything else is optional

#

If u wanna use voting webhook, open port 80

#

If wanna switch to ssl, close 80 and open 443

boreal iron
#

That won’t work

lyric mountain
#

Https still requires 80?

pale vessel
#

443?

lyric mountain
#

I don't remember

#

It was 4xx something

boreal iron
#

Creating ssl certificates will require to identify your host at least once which will happen on 80

lyric mountain
#

Which was it?

boreal iron
#

As long as you’re using providers like let’s encrypt etc and don’t buy domain based certificates etc

pale vessel
#

yeah it's 443

boreal iron
#

Or wildcard certificates... whatever

lyric mountain
#

Yep, just confirmed

lyric mountain
#

Best cert

boreal iron
#

Well if you like to use Cloudflare, I don’t

outer zenith
#

pog

#

bot finally verified

boreal iron
#

The blocking policy of CF would fuck up my infrastructure and lots of clients relaying on my DNS resolvers without getting blocked

#

If you know what you do then host your own dedicated firewall and secure all your dedicated/cloud servers behind it

#

Relying on a good provider, load balancing your services and host your services on different locations worldwide, and you won’t get downed by anyone

#

More and more services are relying on CF and other service providers and we saw what happen if one DNS resolver is sharing wrong data

#

But to keep on topic if you’re not experienced enough stick to services which will actually deal with security stuff like managed servers

#

That’s my opinion

#

And regarding the growing amount of bot servers, attacks and scans on my servers every day I see I’m right

#

But yeah ...
Could you actually fix your request error?

#

And watch out for a dude called @quartz kindle
He acts like he would help you but actually throws complicated phrases around to frustrate you ending up in a DM with him, he will ask you for your bank ID and PIN.

#

very scary dude

summer jolt
#

Cannot read property 'members' of undefined

#

when trying to sumit a bot

slim heart
#

code?

#

oh

summer jolt
#

yes

slim heart
delicate shore
#

Hey guys

#

as you can see I have a folder named well-known and I have this file in it

#

but my domain just redirects me to the home page

#

I am using ReactJS'

#

nvm, I had to put it in /public

hasty mulch
#

Is there a way to get this cooldown thing in d.py to show days, hours, minutes instead of just seconds?

solemn latch
#

with a little math yeah

hasty mulch
slim heart
hasty mulch
slim heart
#

you're gonna have to test it i dont use python i just know people who do who use the package

boreal iron
#

Dunno why Discord doesn’t allow me to jump to the message.
What’s the issue?

rustic nova
#

is the message they're replying to

boreal iron
#

Hmm I’m not allowed to jump to my own answers/messages... okeh

#

Hmm how did you build the request?

#

Using localhost ... ?

#

Yes

#

Brb

lyric mountain
#

Divide by 24 and you have hours

hasty mulch
#

And then round the hours off

lyric mountain
#

No need

#

You're supposed to subtract the seconds from minutes, and minutes from hours

#

So it'll all be integers

hasty mulch
#

I want it to show hours AND minutes

lyric mountain
#

Read my message above

#

Subtract seconds from minutes, and minutes from hours

#

Seconds = millis / 1000

#

Minutes = (millis - seconds * 1000) / 60

#

Hour = (millis - minutes * 60000) / 24

stone quest
#

does anyone knows how to fix this? having a hard time with gradle

rustic nova
#

Your main class is missing

#

wait

stone quest
lyric mountain
#

No

rustic nova
#

Yeah it's not that

#

just saw it

#

CacheFlag seems to be missing

lyric mountain
#

Actually, your IDE was supposed to be screaming at you at this point

#

Doesn't it show any error?

#

Like, a big red error

stone quest
#

I use CacheFlag on the main to register the events

stone quest
lyric mountain
#

Not debug

#

The editor itself

stone quest
#

nope no errors

foggy echo
#

how would i make my discord js bot send posts from reddit into discord

#

ive tried using random-reddit library

lyric mountain
#

What is yout jda version?

foggy echo
#

jda?

lyric mountain
#

Not u

foggy echo
#

oh

#

sorry

stone quest
lyric mountain
#

Did u reload ur gradle file?

#

Also, if u try to build it, does it point at the issue?

stone quest
#

when i try to build buy running the jar at the build.gradle it doesnt prompt any errors

stone quest
boreal iron
#

I’m back

stone quest
#

first time using gradle btw

lyric mountain
#

Click gradle tab at the right

#

Then press the round arrow icon

#

My guess is that your modules are configured wrongly

#

Btw, that code won't initialize the bot

#

You need to add awaitReady after build

stone quest
lyric mountain
#

That's really weird because intellij wouldn't even let you run the code

#

Like, it would point at the error

#

At the toolbar, press code -> analyze

#

Then select whole project

stone quest
#

already did, no errors found

#

that is all I have in the main class

lyric mountain
#

File -> restart/invalidate cache

#

Then select invalidate all and restart

stone quest
lyric mountain
#

Success then?

stone quest
#

i wonder if there is anything wrong with my gradle

#

i mean before i could run too

#

but it always fails after compiling

#

it compiles without error but it simply wont run

lyric mountain
#

But it is running

stone quest
lyric mountain
#

Oh

#

Did u install gradle on ur mac?

#

Like, both jdk and gradle

#

Or are you packing into a jar?

stone quest
#

first time I use gradle, just saying again... I had no clue i needed to install gradle to run the .jar xD

rustic nova
#

wait, is that logging style default on jda?

lyric mountain
#

Yep

rustic nova
#

damn

#

don't have that luxury on javacord KEKW

lyric mountain
#

That's log4j actually

#

Slf4j

stone quest
lyric mountain
#

Fucksomething4j

#

Iirc it's SLF4J + LOG4J2

lyric mountain
#

Because it won't include dependencies into the jar

#

You need to build a fatjar

#

Search "shadowjar gradle"

#

Follow the setup and build a jar with it

stone quest
#

okie I"ll give it a try

stone quest
earnest phoenix
#

Uh

lyric mountain
#

How are you getting the path to the env?

stone quest
lyric mountain
#

Also, you don't need .env for java, you can use java's vanilla support for properties file

#

But that's another story

#

Show me how ur defining path to the file

stone quest
#

When I want to get something from the .env I use Config.get("parameter")

#

it calls my class that calls the .env

lyric mountain
#

Go to the folder where the fatjar is

#

Extract it

#

Note where the .env file went

#

You may need to configure a path to it

stone quest
#

yeah .env is not included actually

stone quest
#

when compiling

lyric mountain
#

A bit longer code, but is vanilla

tawny cosmos
#

I just want to say this from the bottom of my heart no disrespect to anybody in the general public haters come a dime a dozen because in layman's terms my approach was correct and the approach of the other incorrect inappropriate disrespected to themselves you don't have to prove anything to me because I never had intentions of approving myself to anyone my approach today is because the approach and an inappropriateness of our community

lyric mountain
#

Env files are just property files that are excluded from git

tawny cosmos
#

You guys might have heard from my story on TV and etc lately I have no family and friends and not too desperate or hard up for a family member or a friend to like me or love me cuz unconditionally I love me always

craggy pine
tawny cosmos
#

I'm not a thief I don't steal I believe in treating a person equal I am open-minded I wondering too many I get things done ain't no such thing or word of trying

lyric mountain
#

@stone quest it's kinda late now, try using that method from the link I sent u, tell me if it works tomorrow

#

Note that you're supposed to have the properties file in resources folder, not project root

craggy pine
#

ty xiuh bonk

oak cliff
#

idfk what he was saying but his whole history is wack

craggy pine
#

ya multiple channels and all

rustic nova
#

was warned multiple times yeah

craggy pine
#

surprised he wasn't yeeted a bit ago

opal plank
#

its bad enough for me to think thats auto generated text

craggy pine
#

Could be some weird self bot shit

opal plank
#

wouldnt doubt tbh

stone quest
clever vector
#

the code is right but i dont get it why it's not work

simple zodiac
#

hey could i get some help with a command im trying to make? I'm using node and im trying to make a command where if someone doesnt have admin, it sends an error.
I've had it so it does like:

if (message.member.hasPermission('ADMINISTRATOR')) {
  code here for the command
}
if (!message.member.hasPermission('ADMINISTRATOR')) {
  send error
}
``` I've seen that the condition in the 2nd if is supposed to send the code if they dont have admin, but when the user doesnt have admin, the code for the first if doesnt run, but the 2nd if doesnt give the code either. any help would be great
opal plank
#

instead of that

#

you should return instead of scope it

simple zodiac
#

It is in node.js

opal plank
#

indeed, but there are dozens of libraries

simple zodiac
#

sorry im really new

opal plank
#

eris, discord.js, rose, detritus

#

either way

#

you know what return does?

simple zodiac
#

at the start of my code i have

const Discord = require('discord.js');
const client = new Discord.Client();
``` so i think yes i am using discord.js
opal plank
#

you are, yes

simple zodiac
#

Yeah ive done coding before just not the bot stuff

opal plank
#

actually

#

perfect, so you do know js

#

so

simple zodiac
#

most of these words dont make sense

#

well

opal plank
#

let me get you a link rq

earnest phoenix
#

how would I fetch all of the members in the guild

simple zodiac
#

i dont really know js that well, i started this bot yesterday lol

earnest phoenix
#

without them being cached?

simple zodiac
#

i know python a lil

opal plank
#

this is an unvaluable tool for developing

#

take a look at this

simple zodiac
opal plank
#

what i just sent

#

debugger on vsc

#

you can add a breakpoint on the line you think something is wrong

simple zodiac
#

sorry wait im not using vscode

opal plank
#

and when the code passes on that line, it stops the bot, giving you all current values

simple zodiac
#

does that matter

opal plank
#

you should switch to vsc

#

it does

simple zodiac
#

oh

opal plank
#

rather than assuming whats going wrong

agile lance
#

vsc is awesome

simple zodiac
#

im using a repl for rn

opal plank
#

you can see real time whats going on

agile lance
simple zodiac
#

is that bad

agile lance
#

security flaws

simple zodiac
#

idk where to start with hosting it on vsc

agile lance
#

Repl has a really really easy way of comprising tolens

#

tokens*

#

Especially if its stored in .env

simple zodiac
#

oh

#

lol

opal plank
#

let me get an example for you

simple zodiac
#

could i use the hostingf stuff with the app / port stuff on vsc?

#

or do either of you have a guide to hosting my bot on vsc

earnest phoenix
#

I need help asap, how would I fetch all members in the discord without them being cached?

opal plank
#

@simple zodiac check gif

#

you can stop code mid way through execution, and check real time values of your variables

simple zodiac
#

could you help me/send a guide (whatever) on how to host the bot using vscode

agile lance
#

Do you have mac or windows?

simple zodiac
#

windows

opal plank
#

exaclty same way you're doing in repl

#

download your files

simple zodiac
#

oh

agile lance
opal plank
#

then node index.js

#

or whatever

agile lance
opal plank
#

in vsc you need to add a debugger

simple zodiac
#

i have vscode alr

opal plank
#

the idea isnt to host the bot btw

agile lance
opal plank
#

its to run another bot that you can test

#

remember what i said

simple zodiac
#

uh what

#

no

opal plank
#

wait for me to finish dude

#

stop cutting out mid sentence

#

anyway

simple zodiac
#

sorry

opal plank
#

like i showed before, when you do a breakpoint, it pauses the code

#

so yuo dont want your users randomly having the bot stop on them

#

hence why you make another bot in the portal