#development

1 messages Β· Page 1177 of 1

placid iron
#

I don't do much js but do you need to use let or var?

carmine summit
#

Whats i?

opal plank
#

you havent learned js at all, have u?

carmine summit
#

What is i

#

I am learning right now

#

:D

opal plank
#

i is a variable

carmine summit
#

Yeah i know

opal plank
#

you should NOT be coding a bot without js experience

carmine summit
#

But i thing you didnt declare it

opal plank
#

if you know why u ask?

weak rain
#
    at readdirSync (fs.js:955:3)
    at E:\Panda\handlers\command.js:13:26
    at Array.forEach (<anonymous>)
    at module.exports (E:\Panda\handlers\command.js:11:32)
    at E:\Panda\server.js:21:35
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (E:\Panda\server.js:20:13)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32) {
  errno: -4052,
  syscall: 'scandir',
  code: 'ENOTDIR',
  path: './commands/approve.js/'
}

E:\Panda>```
slender thistle
#

oh Erwin

weak rain
#

what should i do

opal plank
#

sup shiv

carmine summit
#

I think you didnt declare "i"

paper phoenix
#

@weak rain - Remove the trailing /?

earnest phoenix
#

sup

carmine summit
#

I might be wrong

#

Idk

#

Just started coding a week ago

earnest phoenix
#

the fu

#

started coding a week ago

#

and got into bot development

delicate shore
carmine summit
#

🀣

delicate shore
#

i pasted my site code

carmine summit
#

Its full of APIs

delicate shore
#

now what should i do

carmine summit
#

So yeah

slender thistle
#

If you want to work with APIs, you will need more knowledge of JSONs, HTTP requests, and how to process them accordingly

weak rain
#

@weak rain - Remove the trailing /?
@paper phoenix from where

carmine summit
#

Dats html

delicate shore
#

yes

slender thistle
#

blindly getting into Discord bot development is STRONGLY unadvised

carmine summit
#

If you want to work with APIs, you will need more knowledge of JSONs, HTTP requests, and how to process them accordingly
@slender thistle i have already made the APIs and it works perfectly

#

No errors

restive furnace
#

"No errors" nice word

slender thistle
#

I assume you're just lacking the general idea of for loops then?

paper phoenix
#

@weak rain - According to the error, you're trying to access ./commands/approve.js/.

weak rain
#

Yeah

carmine summit
#

I assume you're just lacking the general idea of for loops then?
@slender thistle affirmative

slender thistle
#

eh

paper phoenix
#

I doubt approve.js is a folder

slender thistle
#

To be fair, have you tried Google?

carmine summit
#

No?

weak rain
#

@paper phoenix no

slender thistle
#

Why not?

weak rain
#

commands is a folder

carmine summit
#

Im too lazy to read🀣

opal plank
#

if you dont put effort, why should we?

slender thistle
#

If you are not willing to read, how do you expect to learn?

carmine summit
#

Pls

#

How to define i

opal plank
#

@weak rain you're trying to read a file, not a dir

carmine summit
#

By reading

delicate shore
#

what am i doing wrong

slender thistle
#

I'll give you a snippet of code, I'm asking you to break it down in details

#

okay?

carmine summit
#

I wanna read at the same time i dont...

opal plank
slender thistle
#

Well, you're the one who's supposed to make decisions for yourself

delicate shore
#

is this for me?

carmine summit
#
let a = 0;
const array = ['a', 'b'];
for (let i of array) {
a++
}
log(a) //returns 2

@opal plank how may I declare i?

opal plank
#

nah, i dont know what you're even doing @delicate shore

slender thistle
#

i is declared in the for loop

#

in the loop body

opal plank
#

its anything

carmine summit
#

Aight

delicate shore
carmine summit
#

I know now

opal plank
#

it just needs a variable to loop thru

delicate shore
#

following this guide

opal plank
#

<= scrub windows user

carmine summit
#

Why not use "while" instead?

opal plank
#

you could very well do that

#

though i remember you had a big af array

#

hence why i used an array as example

#

cuz im assuming you'll be doing somthing similar

weak rain
#

hey ervin i have a doubt @opal plank

opal plank
#

wusup

weak rain
#

my status gets removed after a certain period of time

slender thistle
#

It's too easy to create an infinite while loop so it's unadvisable for beginners

weak rain
#

until i restart it

carmine summit
#

cuz im assuming you'll be doing somthing similar
Yep

opal plank
#

are you looping statuses by any chance?

carmine summit
#

Yeah

weak rain
#

no

carmine summit
#

Ok no

opal plank
#

show the snippet you using @weak rain

carmine summit
#

Wait no. I changed my mind

weak rain
#

ok

#
client.on("ready",  async (member) => {
  console.log('I m ready to Go')
  client.user.setActivity("Mention Me or tr!help | A all in one bot made by Thunder OP")
  const API = new DanBotHosting.Client("api-key", client);

    let initalPost = await API.autopost();
 
    if (initalPost) {
      console.error(initalPost); 
    }
})
opal plank
#

i can barely type holy shit my hands are freeezing

#

ah thats why

weak rain
#

Lmao

opal plank
#

it requires 2 fields

#

one is a string and the second is type

#

though i could be wrong

#

but i think the second field(object) isnt optional

#

lemme check on the docs rq

#

actually, no they both optional

paper phoenix
#

You can set the bot activity in the client options, BTW

opal plank
#

hmmm

carmine summit
#

Tysm @opal plank

#

It works

opal plank
#

well yeah, that too

#

i cant see why the activity would go away though

#

i dont see it using like client activity where it expires

#

im not even sure theres a char limit either

#

@weak rain try reducing char count, or check if you accidently used another activity()

#

though i doubt either of those are the culprits

weak rain
#

i m back

#

sorry

#

i went

carmine summit
#

my bot is in 6 servers now. with 41 members overall

weak rain
#

my bot is in 6 servers now. with 41 members overall
@carmine summit nice

#

my bot is in a server with 41k mem

carmine summit
#

its bad

opal plank
#

should i flex?

carmine summit
#

only 41k

weak rain
#

hell no @opal plank

opal plank
carmine summit
#

ask @opal plank

weak rain
#

u have more

carmine summit
#

how mach

weak rain
#

and u r pro too @opal plank

carmine summit
#

?

opal plank
#

pro? far from it

carmine summit
#

haw mach

opal plank
#

still improving everyday

carmine summit
#

hawmachhhhhh

opal plank
#

what?

carmine summit
#

i wanna know

#

how many members

weak rain
#

@opal plank can u tell me how should i set random statuses

opal plank
#

lemme tag spoiler then, sec

carmine summit
#

using your bot

opal plank
#

@weak rain setInterval and then do some logic

weak rain
#

i have 160k

#

LMao

#

@opal plank ok

carmine summit
#

LMao

opal plank
weak rain
#
Serving 75 servers.
Channels
Serving 5572 channels.
Server Users
Serving 145167
Ping
110ms
Join Date
Sun Jun 21 2020 16:32:04 GMT+0000 (Coordinated Universal Time)```
#

@opal plank hell no

#

54 guilds and users --------

opal plank
#

well yeah, my bot is mainly used for streamers

#

not too many are small

#

Β―_(ツ)_/Β―

weak rain
#

hm

#

my verification was

#

stopped

opal plank
#

and i also cleared a lot of small servers

weak rain
#

becuase my friend added in

#

fake servers

opal plank
#

i think i removed 30 servers that had less than 10 people

weak rain
#

so i cleared them

opal plank
#

that brought it down to 50

weak rain
#

@opal plank nice

carmine summit
#

i think i removed 30 servers that had less than 10 people
@opal plank how

weak rain
#

i had like 10-15

#

servers

carmine summit
#

guild.leave?

#

xD

weak rain
#

no

#

thats a secret

dense haven
#

πŸ˜‚

weak rain
#

i will get banned if i tell that

#

from discord

#

so lets keep that a secret

carmine summit
#

bruh

misty sigil
#

<guild>.leave() is the actual thing

opal plank
paper phoenix
#

@weak rain:

const client = new Discord.Client( {
  presence: {
    activity: {
      name: 'Zzz',
      type: 'PLAYING'
    },
    status: 'online'
  }
} );
weak rain
#

oh ty @paper phoenix

carmine summit
#

whats n.eval?

weak rain
#

why is eval command

#

dangerous

opal plank
#

thats an ecval

earnest phoenix
#

eval command

weak rain
#

if its public

opal plank
#

cuz you can do anything

weak rain
#

i dont get that

opal plank
#

image me doing this

earnest phoenix
#

eval message.guild.leave();

#

for example

carmine summit
#

WHATS EVAL

opal plank
#

eval import fs from 'fs';
fs.unlink('./')

earnest phoenix
#

@carmine summit GOOGLE

slender thistle
#

Running code in real-time

dense haven
#

eval is magix

carmine summit
#

@carmine summit GOOGLE
@earnest phoenix What is Google?

earnest phoenix
#

ASK UR MOM

opal plank
#
eval import fs from 'fs';
fs.unlink('./')```
this would ruin your day good time
weak rain
#

can eval command hack tokens

slender thistle
#

Basically giving a code to your interpreter to run

winter basalt
earnest phoenix
#

dont ask me what is mom

weak rain
#

can eval command hack tokens

#

and kick users

misty sigil
#

yes

carmine summit
#

Bruh

#

thats OP

misty sigil
#

yes it can

#

no its not

weak rain
#

wtf its danger

misty sigil
#

because any sensible mother fucker restricts it to owner

opal plank
#

as you saw with my example, i can delete my own servers with that

winter basalt
#

it's not if you know what you're doing

earnest phoenix
#

but normaly u dont have perms to acess another bots eval

paper phoenix
#

@weak rain - Eval can grant full access to the device it's hosted on. Access DBs, delete files and folders, etc

opal plank
#

Β―_(ツ)_/Β―

weak rain
#

@weak rain - Eval can grant full access to the device it's hosted on. Access DBs, delete files and folders, etc
@paper phoenix wuh

misty sigil
#

so restrict it to owner only

weak rain
#

it can edit code? @opal plank

misty sigil
#

yea probably

opal plank
#

yeah

earnest phoenix
#

image there is a Eval bot

weak rain
#

lol

earnest phoenix
#

allow us to use eval command

weak rain
#

lolo

pale vessel
#

there is

#

just inside a sandbox

misty sigil
#

if(author id != "your id")return message.channel.send("right u fuckin twat you aren't allowed tae use this command")

earnest phoenix
#

rly

opal plank
#

yeah sanbox is fine

#

i didnt put mine in a sandbox though

paper phoenix
#

@misty sigil - Just use Commando and ownerOnly.

opal plank
#

its not public, clearly

misty sigil
#

commando?

opal plank
#

d.js commando

#

yeah

pale vessel
#

commando πŸ’©

opal plank
#

its a command handler

earnest phoenix
#

wut

opal plank
#

commando

#

is

#

a command handler

earnest phoenix
#

i never heard about it

#

that mean it is shit

#

:))

opal plank
#

i do my own handlers so

paper phoenix
#

I mean, you can reinvent the wheel.

earnest phoenix
#

me 2

#

50% is from yt :))

opal plank
#

wot?

#

i think im ready to move my bots

#

maybe not the youtube one

delicate shore
#

πŸ‡΄ πŸ‡΅

sudden geyser
#

commando is bleh

opal plank
#

repos updated βœ…
database data βœ…
database clone βœ…
configs βœ…
dependencies package βœ…

#

ready to move

weak rain
#
  presence: {
    activity: {
      name: "Thunder",
      type: 'PLAYING'
    },
    status: 'Mention Me or tr!help | A all in one bot made by Thunder OP'
  }
})```Where should i add this its giving errors f
sudden geyser
#

In your source code where it's appropriate. What error are you getting

opal plank
#

isnt it in 'name'?

carmine summit
#

um @opal plank the code you sent works but i have to change it to console.log(i)

opal plank
#

rather than status?

paper phoenix
#

@weak rain - Add the presence object to your current client options.

opal plank
#

i didnt send you code to copy

weak rain
#

SyntaxError: Identifier 'client' has already been declared

opal plank
#

its called an example

carmine summit
#

how is it an example if its wrong

opal plank
#

you dont declare it again

carmine summit
#

yeah

opal plank
#

example aint wrong fam

dense haven
#

can someone help me with how to set up webhooks (i tried to do it myself and im too confused rn and its better if i restart)

carmine summit
#

i dont declare again

opal plank
#

not u

#

thunder

carmine summit
#

it works when I change the a to an i

weak rain
#

well i thought

#

that will be ok

opal plank
#

you log a not i

carmine summit
#

but when its a the log said numbers

opal plank
#

i is an scoped variable

#

well yeah

#

thats whats suppose to do

carmine summit
#

can you please stop hitting me with newspaper

opal plank
#

no

weak rain
#

give me that server

#

which has that

opal plank
#

you copying snippets rather than learning from them

weak rain
#

emoji

#

its cool

opal plank
#

sec

carmine summit
#

:bonkcat:

opal plank
#

there, download and add to your server

weak rain
#

no

#

gimme that server link

#

i want more of this type

opal plank
carmine summit
#

i have gotten enough brain damage

weak rain
#

that looks cool

#

@opal plank hey help me

#

pls

dense haven
#

brain damage

#

πŸ™„

opal plank
#

@weak rain its /catgirl

#

we got vanity

weak rain
#

oh big people Lmao

dense haven
#

u can just click the emote and get the server

#

πŸ‘€

opal plank
#

not if its private

#

also only canary

pale vessel
#

it's in stable

dense haven
#

a private server with vanity url

#

makes sense

opal plank
#

is it?

dense haven
#

πŸ‘

carmine summit
opal plank
#

oh yeah its on stable

#

scam? more like trying to help you

carmine summit
#

im just curious if its risky

restive furnace
#

no its not

opal plank
#

doing a database?

dense haven
#

πŸ‘€

opal plank
#

yeah, 110% risky

#

more than nitro scams

dense haven
#

yo scan this qr and u can get nitro

#

πŸ€¦β€β™‚οΈ

carmine summit
#

yo scan this qr and u can get nitro
@dense haven gimme qr

dense haven
#

there we go

weak rain
#

@dense haven gimme qr
@carmine summit ur idp will be taken

opal plank
#

'FREE NITRO! just give me your credit card numbers and the 4 digits in that back to join the giveaway"'

paper phoenix
#

JSON file
Sounds like every JS YT tutorial video. Lol

weak rain
#

and u will try after some time

carmine summit
#

wait up

opal plank
#

only use JSON for configs

weak rain
#

'FREE NITRO! just give me your credit card numbers and the 4 digits in that back to join the giveaway"'
@opal plank lol

opal plank
#

and constants

weak rain
#

only use JSON for configs
@opal plank my friend is using json for warns

opal plank
#

yeah thas about it

weak rain
#

lol

carmine summit
#

373375127822182 the 4 digits is 5334

opal plank
#

tell him he lost his coding privileges @weak rain

weak rain
#

their u go @carmine summit

#

@opal plank lol

dense haven
#

can someone help me with how to set up webhooks (i tried to do it myself and im too confused rn and its better if i restart)

#

πŸ™

opal plank
dense haven
#

yea

opal plank
#

js?

dense haven
#

yea eris

opal plank
#

shouldnt matetr tha lib

#

just language

dense haven
#

yea

#

oh

opal plank
dense haven
#

yea

opal plank
#

got your port 3000 open?

dense haven
#

yep

opal plank
#

or whatevre port you going to use

dense haven
#

yea

carmine summit
#

when you just realize you doing testing stuffs in your stable bot then there is error then you cannot fix it in time: Uptime go brrrrrr

opal plank
#

lemme grab the api doc, sec

delicate shore
#

Hey

opal plank
#

you got your domain ?

#

or ip?

dense haven
#

spent all my day till i realised that port needs to be whitelisted

weak rain
#

@dense haven tu parzival ko janta

#

XD

dense haven
#

ip

winter basalt
#

loving the 'yea' on every question

delicate shore
#

Hello πŸ‘‹ eberyone

dense haven
#

@dense haven tu parzival ko janta
@weak rain ha

opal plank
#

good, aight

dense haven
#

na

#

maybe

weak rain
#

nice vai @dense haven

delicate shore
#

Everyone

dense haven
#

pata nhi

carmine summit
#

Hello πŸ‘‹ eberyone
@delicate shore hallo πŸ‘‹

weak rain
#

tere friends m h @dense haven

opal plank
#

you can blatently copy this btw, should work fine cuz its in the docs @dense haven

weak rain
#

Lmfao

dense haven
#

mila hoga khu

weak rain
#

hm

opal plank
#
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

#

change port to 300(or whatevr you want)

#

and AUTH is passwor

#

which you set in your bot page on top.gg

#

thats it

dense haven
#

you can blatently copy this btw, should work fine cuz its in the docs @dense haven
@opal plank it says that i will have to use webhooks if ot goes above 1000 votes
i don't wanna leave that for then

earnest phoenix
#

i wanna add my friend as a collaborater to my npm package but i couldn't find anything on the docs related to it. I tried npm owner add thedoom kinda-useless and it said it added it as a maintainer of the package (which he already is). halp

weak rain
#

u can use

opal plank
#

wait what?

weak rain
#

vote bot also

opal plank
#

i havent heard anything about that vote thing

dense haven
#

uh

weak rain
#

i saw in one server

opal plank
#

are you fetching list by any chance?

#

of all people who voted?

weak rain
#

they had a bot which notifys voting

dense haven
#

nope

#

im not

weak rain
#

nd it was public lmfao

dense haven
#

im trying to figure out what im supposed to do

opal plank
#

well yeah, thats what you using

#

thats the snippet i gave u up there

#

webhook

weak rain
#

@dense haven u code on mobile?

dense haven
#

ok

weak rain
dense haven
#

@dense haven u code on mobile?
@weak rain nah i got tired of going through all my codes

opal plank
#

just make sure you change the variables to fit what you're doing

dense haven
#

yea yea

weak rain
#

wait u had dev badge? @dense haven

dense haven
#

yea i left his team

weak rain
#

mr cyber squad p role bhi tha

opal plank
#

thats for this btw

#

which is what i mentioned

dense haven
#

i will never need that

dense haven
#

thx πŸ˜‚

opal plank
#

then you should be 100% fine

weak rain
#

ip link

#

Lmfao

opal plank
#

||just dont 300IQ like me and forget to put https:// infront of the domain @slender thistle ||

#

i dont, im using ptb

weak rain
#

BonkDoge @opal plank

dense haven
#

sry my head is really tired coz i didn't sleep yesterday (i was trying to look for a memory leak coz cpu usage peaks till my vps provider mailed that they were having issues) πŸ˜‚

opal plank
#

ptb from my experience is the most stable without being annoying

weak rain
#

ok

#

ip links are danger

#

they can steal ur ip and fuck u

dense haven
weak rain
dense haven
#

can they?

weak rain
#

Yeah

opal plank
#

canary be like:
hey, here's an update
5 mins later: hey, heres the same update from before, but we reverted the chnges
5 mins later: erm, we changed our minds, we put it back

dense haven
#

πŸ˜‚

#

v7

opal plank
#

i like the new stuff on canary but ffs they update too often

#

ptb is my cozy middle ground

delicate shore
#

i read this somewhere node_modules is like, like a car: you don't know what's inside it but all you know is that it works
I don't remember where

weak rain
#

is using codes given by npm official staff is copying?

earnest phoenix
#

i wanna add my friend as a collaborater to my npm package but i couldn't find anything on the docs related to it. I tried npm owner add thedoom kinda-useless and it said it added it as a maintainer of the package (which he already is). halp

dense haven
#

official staff?

weak rain
#

i mean

#

package author

delicate shore
#

⭐

earnest phoenix
#

removed star

midnight brook
#

is anyone having any probs with genius api

weak rain
#

i read this somewhere node_modules is like, like a car: you don't know what's inside it but all you know is that it works
I don't remember where
@delicate shore thats cool

earnest phoenix
#

lol

weak rain
#

my new bot lol

dense haven
#

πŸ‘πŸ»

#

thats how u do it

earnest phoenix
#

also does npm fetch collaboraters from the git repository in package.json or do you manually add em or both

dense haven
#

make sure to catch up on the yt tutorials

opal plank
dense haven
#

πŸš™

opal plank
#

yt tutorials?

#

what

dense haven
#

πŸ˜‚

earnest phoenix
#

halp

#

lol

dense haven
#

they work perfectly till you realise the bot will not always be locally hosted and stay in ur test server

weak rain
#

people : u can fuck someone and say sorry i did for fun
Parents : a_bonkacat

earnest phoenix
#

r is four letters away from o on the keyboard how the fuck did i type it accidentally

dense haven
#

^ thats rape

weak rain
#

leave that

#

Lmfao

earnest phoenix
#

please

#

someone halp

#

lol

weak rain
#

lol @earnest phoenix

earnest phoenix
#

lel

#

lool

weak rain
#

thats suspicious

earnest phoenix
#

LOLCODE
...is an actual language wtf

slender thistle
#

Yup, and it's fun

opal plank
#

chef is better

weak rain
earnest phoenix
#

halp pls

weak rain
#

@earnest phoenix why is this package for

opal plank
#

@earnest phoenix i can help you

earnest phoenix
#

lmfao

slender thistle
#

in bytes

opal plank
#

we start by deleting it, then we can move on

slender thistle
#

.read() it

earnest phoenix
#

so request.read()?

slender thistle
#

or, well, something like .read

earnest phoenix
#

the fuck

opal plank
#

are u using raw html with like, 20 lines?

#

cuz it sure looks like it

earnest phoenix
#

nope

opal plank
#

we got a Woo 2.0

#

css is your fren'

earnest phoenix
#

made a 40 lines css file

#

and i use it on every page

slender thistle
#

@earnest phoenix See axios' method to parse request body

weak rain
#

anyone heard c++ ?

opal plank
#

wait hold up

#

theres more?

weak rain
#

anyone heard c++ ?

opal plank
#

its spreading, kill it with fire

earnest phoenix
#

@earnest phoenix why is this package for
@weak rain the name says "useless" it is literally useless but might come handy so i named it kinda-useless

#

its spreading, kill it with fire
@opal plank you mean my package

ionic dawn
#

Hi CBWaveboy

weak rain
#

@weak rain the name says "useless" it is literally useless but might come handy so i named it kinda-useless
@earnest phoenix lol

earnest phoenix
#

got 1000+ downloads in a week

ionic dawn
#

Jesus

earnest phoenix
#

Larsh

opal plank
#

Ooof

earnest phoenix
#

Karsh

#

@slender thistle

dense haven
#

me now spams codes with ```css, js etc

13 yr old me ```css wow cool colours

weak rain
#

wtf

dense haven
#

Karsh
@earnest phoenix yea?

opal plank
#

luckily luca got this

earnest phoenix
#

He's spamming

slender thistle
dense haven
#

who?

opal plank
#

@earnest phoenix tell me this website, i'll leave a -5 star review, clearly it isnt working

dense haven
#

why am i asking who

earnest phoenix
#

wait, since they are changing the name of the badge, will the VERIFIED_DEVELOPER flag change too or nah

dense haven
#

what am i supposed to do if someone is spamming

#

πŸ˜‚

earnest phoenix
#

lol

#

@earnest phoenix tell me this website, i'll leave a -5 star review, clearly it isnt working
@opal plank ?????

opal plank
#

what do u need help with tho, all jokes aside

weak rain
#

Lmao

restive furnace
#

anyone heard c++ ?
@weak rain yes why? + im using it

weak rain
#

@earnest phoenix no

#

@weak rain yes why? + im using it
@restive furnace oh ok here is my meme then

#

its poor nevermind

opal plank
#

get the joke now?

earnest phoenix
#

lmfao

slender thistle
#

wait, since they are changing the name of the badge, will the VERIFIED_DEVELOPER flag change too or nah
@earnest phoenix Bitfield value will probably be the same

restive furnace
slender thistle
#

or they might change it

dense haven
#

are we supposed to do this here

#

just read the channel topic

opal plank
#

@earnest phoenix i still dont know what u need help with tho

earnest phoenix
#

adding a guy as a collaborater to a package

opal plank
#

hmm

#

npm or yarn?

dense haven
opal plank
#

well, there ya go ^^

dense haven
#

being on phone still feels better than being on pc

earnest phoenix
#

it is a public package

restive furnace
#

i like ebing on pc

weak rain
#

my dc hanged

#

the fuck

#

now i restarted

drifting wedge
#

Can I have like a python file and js file?

slender thistle
#

what would it contain?

slender thistle
#

Mix of JS and Python code?

drifting wedge
#

Like I saw a cool vid in js

#

And my bot is python

slender thistle
#

Then, no. It's either JS or Python

dense haven
#

just implement it on python

drifting wedge
#

Can I like import a JS file?

opal plank
#

technically could run an api

slender thistle
#

No

drifting wedge
#

Ok

opal plank
#

i dont think thats what you want though

slender thistle
#

JS is a different programming language so you'd have to convert the code yourself

drifting wedge
#

Is mongo hard tho?

weak rain
#

is downloading random packages dangerous?

dense haven
#

and if u keep getting excited with yt vids i would suggest to switch to js

slender thistle
#

not really

dense haven
#

πŸ˜‚

drifting wedge
#

Ok cool lol

opal plank
#

you could run them separately and use IPC or an API to talk to eachother

slender thistle
#

It's more of an experience kind of thing

#

I run my bots with discord.py and pymongo combined just fine

opal plank
#

i wanna try cassandra someday

weak rain
drifting wedge
#

I run my bots with discord.py and pymongo combined just fine
@slender thistle is it hard?

weak rain
drifting wedge
#

Cuz like I will have a ton of use for it

slender thistle
#

For me personally, no. It's time consuming, but not that hard

drifting wedge
#

Like it’s gonna me fully customizable

#

So it’ll be a little hard

restive furnace
#

no

#

if u can program correctly

weak rain
#

I am a Noob cool_panda

opal plank
#

time for food and then port the youtube bot to Ts

dense haven
#

the new ts api?

opal plank
#

nah, just Ts

dense haven
#

oo

opal plank
#

its written in js, and i gott port it to strict

dense haven
#

hm have fun πŸ˜‚

restive furnace
#

typescript

opal plank
#

typusscruptus, indeed

#

debating if its even worth it tbh

#

theres like, 4 people using the youtube cuz it isnt publicly available yet

#

shit is standing on two thin stick legs rn

earnest phoenix
#

How do i add the number of items i have bought in this code:

let purchase = args.join(" ");
        if (!purchase) return message.channel.send('Please provide an item to buy')
        let items = await db.fetch(message.author.id, { items: [] });
        let price = await db.fetch(`money_${message.guild.id}_${message.author.id}`)
        let amount = await db.fetch(`money_${message.guild.id}_${message.author.id}`)



        if (purchase === 'ThunderboltVII') {
            if (price < 3500) return message.channel.send('You do not have enough money to buy this item. Please try another one');
            db.subtract(`money_${message.guild.id}_${message.author.id}`, 500);
            db.push(message.author.id, "Car");
            message.channel.send(`Successfully bought ${items}`)
        }
        if (purchase === 'scarf') {
            if (price < 300) return message.channel.send('You do not have enough money to buy this item. Please try another one');
            db.subtract(`money_${message.guild.id}_${message.author.id}`, 250);
            db.push(message.author.id, "scarf");
            message.channel.send('Successfully bought')
        }
    }
}
dense haven
#

like
buy scarf 10

#

?

earnest phoenix
#

yeah

trim lark
#

i prefer mongoengine over pymongo

dense haven
#

well you will have to test for another parameter so do amount = args.shift() and then do purchase = args.join(" ")

opal plank
#

oor

#

and even cheesier way

dense haven
#

πŸ‘€

opal plank
#

if you dont have numbers in your args

#

you can do parseFloat()

earnest phoenix
#

Or parseInt()

opal plank
#

if none of your items have numbers in them, of course

dense haven
#

Uh

opal plank
#

parseInt() cant take from that i dont think

dense haven
#

Scarf_quality1

opal plank
#

only parseFloat()

earnest phoenix
#

No

dense haven
#

😀

earnest phoenix
#

Both can turn it into a number

#

Wait if i put this

    let amount = await db.fetch(`money_${message.guild.id}_${message.author.id}`)

it's not right?

dense haven
#

πŸ˜•

opal plank
#

nope

dense haven
#

thats how much money the user has

opal plank
dense haven
#

i think

earnest phoenix
#

oh right

opal plank
#

parse int doesnt ignore non numbers

earnest phoenix
#

It says it's not a number

opal plank
#

yeah, thats what im saying

earnest phoenix
#

Right

opal plank
#

actually

#

no

#

parseFloat wont work either

#

there was a cheeky way without regex

#

to take only numbers from a string

earnest phoenix
#

Yea

opal plank
#

i forgot the method tho

earnest phoenix
#

e

opal plank
#

it has to start with a number, i was half right

#

it does ignore after it

#

but there was another way to grab it

#

can always loop args and check isNaN() too

earnest phoenix
#

Yea i was trying to say both works only on strings starting with numbers

#

npm or yarn?
npm

#

the package is public

dense haven
#

u guys have cool eval commands

opal plank
#

sankyu

earnest phoenix
#

@earnest phoenix you mean like
<item> <amount>?

opal plank
#

my eval output is also parsed

earnest phoenix
#

@earnest phoenix you mean like
<item> <amount>?
@earnest phoenix Yeah

#

Then item can be thr first argument

#

And Amount the second

dense haven
#

my eval output is also parsed
@opal plank um can u share πŸ‘‰πŸ‘ˆ

earnest phoenix
#

is it just impossible to add collaboraters to public npm packages

dense haven
#

uh

opal plank
#

let price;
for (let a of args) {
if(!isNaN(parseInt(a))) price = parseInt(a)
}

#

that'd work too

earnest phoenix
#

my eval output is also parsed
@opal plank Parsed?

opal plank
#

unordered args

earnest phoenix
#

Wot

opal plank
#

yeah

earnest phoenix
#

So where do i put the for loop

#

in your code

#

...

opal plank
earnest phoenix
#

lol

opal plank
#

aight, gotta go grab a bite of something

dense haven
#

does this help

earnest phoenix
#

ok

dense haven
#

ok?

golden condor
#

There is an npm docs page on it

earnest phoenix
#

no (for the docs)

dense haven
#

i expected a yes or no

#

thats better

earnest phoenix
#

yes

#

I know how to set the icon and stuff, just detecting it perfectly is the hard part

#

GLITCH

#

WHAT

#

THE

#

QUF

#

It's for temporary hosting

#

I'll be moving to a vps, chose glitch just to test

real loom
#

Well

earnest phoenix
#

liar

real loom
#

You should make it responsize

earnest phoenix
#

The wot

real loom
#

Like people with mini laptop screens should see the navbar icon

#

Its needs to be chosen my res of screen

#

Not device

#

That's what i think is the best

#

You can do it with a bit of javascript

earnest phoenix
#

Hmm might work tho, i know how to

#

I literally used a regex to check it that's longer than my life span

#

Jesus Christ

#

@earnest phoenix what does it matter do u if he’s using glitch or not

#

glitch sucks

#

And?

dense haven
#

um

earnest phoenix
#

they take forever to start projects

real loom
#

Whats the point

earnest phoenix
#

So?

dense haven
#

clientStatus

#

^

earnest phoenix
#

@earnest phoenix just stop..

#

which means if the app goes down we'll need to wait 1000 hours to get it back up and see the websute

#

idk

real loom
#

Its his site

earnest phoenix
#

I dont see anyone caring or asking about that

real loom
#

He is making it and testing it

earnest phoenix
#

Bruh cut it out, i just hosted it on glitch for a test, this is not the final version of the website that's why

real loom
#

Yes

dense haven
#

@earnest phoenix clientStatus is a thing for me idk about you

real loom
#

Your not even supposed to go on the site now LOL

earnest phoenix
#

Uhh it's a website? @dense haven

dense haven
#

oo

#

well told you

#

idk about urs

earnest phoenix
#

don't use glitch even for testing

real loom
#

ughh

#

Then what

earnest phoenix
#

yep

#

50+ languages

#

lots of cool stuff

real loom
#

Well yes

#

but its not private unless u pay

earnest phoenix
#

not as much restrictions as glitch

real loom
#

Bruh

#

Just stop

earnest phoenix
#

<Time to fucking buy a vps for 5$ and host it on it just to test and if it fails where have the money has gone>

sudden geyser
#

Where's the restricted difference between repl.it and glitch

real loom
#

in the void

earnest phoenix
#

@earnest phoenix thanks for the input, but you are getting very offtopic so just stop

#

in the void???

#

Actually, you said repl.it, but i like to remind you, that repl is worse than glitch

real loom
#

it isn't

#

But its not private

#

So it is

#

idk

earnest phoenix
#

Bruh i code on mobile, and you know how hard it's to code on repl than glitch

#

or we could stop

real loom
#

True

#

or we coule stop
@earnest phoenix We told u like about 100 times

sudden geyser
#

Why on earth would you code on mobile

real loom
#

But yes i agree

earnest phoenix
#

cuz

real loom
#

We should stop

earnest phoenix
#

mobile is kool

#

lol

#

I started Coding on mobile, i coded my entire bot and website on mobile

#

Big Brain time

#

me also sometimes codes on mobile

real loom
#

same

#

When im not on pc

earnest phoenix
#

Why on earth would you code on mobile
@sudden geyser <You realize not everybody has a pc right>

sudden geyser
#

Do you really not have at least a laptop or desktop

dire obsidian
#

Discord bot designer....

earnest phoenix
#

No

dire obsidian
#

Meh

slender thistle
#

Actually, you said repl.it, but i like to remind you, that repl is worse than glitch
@earnest phoenix worse in what terms

#

and why is Glitch bad generally

dire obsidian
#

Glitch is bad.

slender thistle
#

Explain why

dire obsidian
#

You got me

sudden geyser
#

You're just stating without explaining Asterki

slender thistle
#

"x is bad because I said so" isn't a valid point

heavy anchor
#

Anybody know a perfect way of detecting if the user is browsing through a mobile browser to set the menu icon to appear on mobile and not on pc?
@earnest phoenix I did that with CSS for the text size I think it can be done for the image I just didn’t try yet

dire obsidian
#

Nah, glitch is good for rl smol bots

slender thistle
#

It's not intended to be used for Discord bots

earnest phoenix
#

I didn't say glitch is bad, and repl is worse because as i code on mobile, when i tried repl, it was deleting whatever i type in, not possible to code on it, stop defending repl

slender thistle
#

Oh, fuck. I forgot to mention whoever said "Glitch is bad'

sudden geyser
#

That is because developing on mobile is 99% unideal most of the time

real loom
#

don't forget repl is newer then glitch

slender thistle
#

don't use glitch even for testing
ah, it was code913

real loom
#

Just report the bug, and then they will probs try fix it. Or just stay at glitch why does it care that much?

earnest phoenix
#

On repl?

#

About the coding issue?

real loom
#

Yes

earnest phoenix
#

@slender thistle code913 always takes things offtopic smh

real loom
#

When u use a high cap letter the letter before deletes on mobile

earnest phoenix
#

Nah they won't fix it, who tf cares about mobile developers these days Sadge

#

We work harder but this is what we get

slender thistle
#

Have you tried actually doing it

real loom
#

....

slender thistle
#

instead of being this hopeless

earnest phoenix
#

@earnest phoenix you actually develop on mobile?

#

Like actual code

#

Yes

#

Oh shit you must be the god of programming

dire obsidian
#

^

earnest phoenix
#

But what would be the point of reporting this bug since i'll never use it

restive furnace
#

I can't imagine coding in phone - i am used to big screens

earnest phoenix
#

As i host on a vps

slender thistle
#

You could potentially help someone who would be unable to properly file a report

earnest phoenix
#

I mean at least true but idk if i should tho

slender thistle
#

I can't imagine coding in phone - i am used to big screens
@restive furnace it's generally a pain in the ass, especially with C-like syntax languages

celest schooner
#

making iOS apps is cancer

#

you can’t even dev them on Windows lol

real loom
#

Uhmmm

slender thistle
#

dev, as in test?

celest schooner
#

yea

slender thistle
#

yeah that's painful but

#

it does make sense, doesn't it

celest schooner
#

Well unless you use like a vm or something

#

I think Apple disallows that but

#

Β―_(ツ)_/Β―

restive furnace
#

@restive furnace it's generally a pain in the ass, especially with C-like syntax languages
yeah

earnest phoenix
#
module.exports = function format(content, guildName, botId) {
    if (content.includes("{user}")) {
        content.replace("{user}", `<@!${botId}>`)
    }
    if (content.includes("{user_name}")) {
        content.replace("{user_name}", `Bot Cool`)
    }
    if (content.includes("{server}")) {
        content.replace("{server}", guildName)
    }
    return content;
}
#

@restive furnace it's generally a pain in the ass, especially with C-like syntax languages
@slender thistle The thing is, as i code on mobile, sometimes it becomes so hard that i just give up on some projects, but not easily tho, Coding on a small screen/unable to copy a lot of things that you need/No tabs

#

why it didnt get replaced

#

:((

slender thistle
#

I think it's not about the small screen, but rather the limitations you are forced to put up with

sudden geyser
#

I think Apple disallows that but
@celest schooner it doesn't allow it yeah, but my experience making iOS apps hasn't been that bad

earnest phoenix
#

There's limitations but you can break them in some way

#

But Coding on mobile in general is just pain

slender thistle
#

It's still inconvenient in the end, is it not?

earnest phoenix
#

Idk

restive furnace
#

u can just get keyboard for phones too

celest schooner
#

yeah you can’t just slap Bulma on it and call it a day

#

u can just get keyboard for phones too
@restive furnace I don’t know why’d you do it for a phone

#

Tablet makes sense

earnest phoenix
#

u can just get keyboard for phones too
@restive furnace Ah yes lemme get a telescope to see the smol screen too

still merlin
#

I'm getting the error

C:\Users\Jon\Desktop\SpiderBot Project\index.js:1057
      await message.channel.messages.fetch({ limit: amount }).then(messages => {
      ^^^^^
SyntaxError: await is only valid in async function``` making a d.js bot, Even though I think ive made a valid async function
code
```js
await message.channel.messages.fetch({ limit: amount }).then(messages => {
        message.channel.bulkDelete(amount)
      })```
sudden geyser
#

You're sort of missing out. Do you have access to all the dev tools you'd usually get from a desktop IDE compared to devleoping on mobile

celest schooner
#

on a phone there’s barely any space

earnest phoenix
#

why it didnt get replaced
help me . . .

#

anyone ?

sudden geyser
#

Amarzi show more of your code upwards

earnest phoenix
#

pls

#

@still merlin Async the function it's preceded from

restive furnace
#

buy a keyboard, mouse and another screen for phone, ez mini pc

sudden geyser
#

You're not in an async function from where your function scope is

celest schooner
#

just buy a desktop

still merlin
#

Oh, Thanks

celest schooner
#

my phone costs more then my gaming pc

earnest phoenix
#

just buy a desktop
@celest schooner Just 4Heed

sudden geyser
#

how much though

restive furnace
#

1200e

#

jk

earnest phoenix
#
module.exports = function format(content, guildName, botId) {
    if (content.includes("{user}")) {
        content.replace("{user}", `<@!${botId}>`)
    }
    if (content.includes("{user_name}")) {
        content.replace("{user_name}", `Bot Cool`)
    }
    if (content.includes("{server}")) {
        content.replace("{server}", guildName)
    }
    return content;
}

why this return same content

celest schooner
#

It’s $800 for the computer

#

It was somewhere around 1k retail price for the phone

#

My parents got a deal tho

#

From sprint

earnest phoenix
#

@earnest phoenix Why check for them and not just split them right away?

#

:0

#

so i dont need if() anymore

#

right ?

#
let contentToReturn = content.split("{user}").join(`<@!${botId}>`).split("{user_name}").join(`Bot Cool`).split("{server}").join(guildName);

return contentToReturn;```
#

:0

#

ohhhh

sudden geyser
#

@earnest phoenix it's returning the same content because .replace(..., ...) returns a new string

#

You'd need to use a variable (or use content) and assign it the new value

ashen shard
#

hello everyone
i checked the docs but i couldn't find any properties to let my discord bot copy the link of a post
can you help me with this?

earnest phoenix
#

It doesn't return the new string because replace doesn't modify the original string

#

Variables could help but split join does it

sudden geyser
#

I don't know so much about that split and join chain as it doesn't look good performance wise or just from a readability perspective.

earnest phoenix
#

@ashen shard link of a post?

sudden geyser
#

What library are you using Muco

earnest phoenix
#

I don't know so much about that split and join chain as it doesn't look good performance wise or just from a readability perspective.
@sudden geyser <Faster than 3 replaces with 3 if statements>

ashen shard
#

i'm using discord.js

sudden geyser
#

You don't even need the ifs: js return myString .replace("{flowers}", "1") .replace("{are}", "2") .replace("{blooming}", "3")

earnest phoenix
#

Yea i know

ashen shard
#

@earnest phoenix yeah, the one after you enable dev options

#

it works on videos and images

earnest phoenix
#

@ashen shard You mean id of a message or their url?

ashen shard
#

well my main purpose is to paste the image/vid to another server so i'm guessing url @earnest phoenix

earnest phoenix
#

Yes

#
<Message>.url```
#

@sudden geyser but if there is not flowers

#

: /

#

That's all

ashen shard
#

was that all

#

thanks lol

sudden geyser
#

The day I vanish is the day sunflowers go extinct.

ashen shard
#

so i can make x = msg.url

#

and then send x

sudden geyser
#

And if you're talking about if nothing matches.

earnest phoenix
#

Yes

ashen shard
#

thank you @earnest phoenix

earnest phoenix
#

Np

sudden geyser
#

It'll just return a copy of the string with no modification.

ashen shard
#

are you talking to me @sudden geyser ?

sudden geyser
#

no

ashen shard
#

okay

#

bye

leaden rover
earnest phoenix
#

Hmm im still unsure how to do the amount

wintry elk
#

hello

wary flame
leaden rover
spare gale
#

guys

#

need help

#

how to link node.js script with web site?

wary flame
#

Use a web server like express

spare gale
#

nonono

#

i need to send data from site to node.js client

#

site=>node.js plugin=>node.js bot

#

i can connect python, but idk, i need it?

wary flame
#

Use a web server like express, for example if you want to send a user input number to your bot, set up a express web server with a basic route and in your website add the number to header

#

Of the post request

spare gale
#

hmm

slender thistle
#

Why would you need Python in this case?

sharp thicket
#

So im making a nuke command and im confused as how do i make the command wait after it sends the embed to clone then delete the channel

spare gale
#

python socket module

sharp thicket
#

can i use .setTimeout(3000)

slender thistle
spare gale
#

Use a web server like express, for example if you want to send a user input number to your bot, set up a express web server with a basic route and in your website add the number to header
hmm, start node.js server to listen POST packets? ill try

slender thistle
#

but there many be more ws packages than that

spare gale
#

node.js should have socket.io
in node sockets - web server
in python - listener on port

wary flame
#

node.js should have socket.io
Yes, but why would you, setting up a simple REST server is easier

sharp thicket
#

So im making a nuke command and im confused as how do i make the command wait after it sends the embed to clone then delete the channel
@sharp thicket anyone please

slender thistle
#

a nuke command?

sharp thicket
#

a command that clones the channel then deletes it so it purges all messages

spare gale
#

and last

wary flame
#

If you use discordjs, ```javascript
await Discord.Util.waitFor(ms time)


Something like that not 100% sure if that is what they called it
sharp thicket
#

.setTimeout(3000) ??

#

would that work ?

spare gale
#

anyone knows method better async.series to create task queue? (for dinamic loading plugins need wait for loading bots)

wary flame
#

.setTimeout(3000) ??
@sharp thicket no

#

That is for executing a specified function after specified time in milliseconds

#

setTimeout(function, miliseconds)

leaden rover
earnest phoenix
#

Hello, does anyone know where I can put my bot to be 24/7?

spare gale
#

a command that clones the channel then deletes it so it purges all messages

#

hmm

wary flame
leaden rover
#

ok

spare gale
#

Hello, does anyone know where I can put my bot to be 24/7?
hosting? :/

earnest phoenix
#

yea

wary flame
#

Hello, does anyone know where I can put my bot to be 24/7?
@earnest phoenix pay for a vps

spare gale
#

yea
vps
dont turn off your PC :d

earnest phoenix
#

xd

#

good thanks I guess xd

spare gale
sudden geyser
#

Just use node's built in inspect(..., ...) function in the util module.

#

Gets the same job done and is typically all you need.

modest dagger
#

Hey I wrote that code to alert server owners on raids. For some reason, it doesn't recognize the fact that the user already exists on thelist. Help?

if(client.raidusers[exe.entries.array()[0].executor.id] >= 0) {
      client.raidusers[exe.entries.array()[0].executor.id] = client.raidusers[exe.entries.array()[0].executor.id]+1
      console.log("added 1 to the ban count of: "+exe.entries.array()[0].executor.id+` now it's ${client.raidusers[exe.entries.array()[0].executor.id]}`)
    } else {
      client.raidusers[exe.entries.array()[0].executor.id] = 0
      console.log("added user to raiding list")
    }
    if(client.raidusers[exe.entries.array()[0].executor.id == 10]) {
      const raidEmbed = new Discord.MessageEmbed()
      .setTitle("Your server may be raided")
      .setDescription(`
      Raiding user: ${client.users.cache.get(exe.entries.array()[0].executor.id)}
      
      Make sure to check if everything is ok with your server because it might be raided right now.
      `)
      .setTimestamp()
      guild.owner.user.send({embed: raidEmbed})
    }```
earnest phoenix
#

Some one pls help

#

I can't add widget

#

It just don't want to show

drowsy skiff
#
message.channel.send('Ping is being calculated...').then(msg => {
    msg.edit('Ping: ' + Math.round((msg.createdTimestamp - message.createdTimestamp) - message.client.ws.ping))``` can someone help with my ping command
#

It sometimes sends 477

misty sigil
#

this server dies sometimes

#

its normal

drowsy skiff
#

lol

earnest phoenix
#

and also you were pinging your bot like every second

drowsy skiff
earnest phoenix
#

why do u do that?

drowsy skiff
#

I fixed it

radiant patio
#

how can I make that my bot will send a message to a specific channel when he gets online?

zenith terrace
#

Language?

misty sigil
#

Library?

zenith terrace
#

Shush

opal plank
#

Experience with programing?

zenith terrace
#

Of course you'd say that

opal plank
#

Β―_(ツ)_/Β―

#

past couple day there were an awful amount of people asking some REALLY basic stuff

#

like how to declare variables levels of basic

misty sigil
#

yea so how do i declare variables

opal plank
#

just write a .txt and require it bro ASMarisaWink

misty sigil
#

ty

zenith terrace
#

yea so how do I make bot send message in specific channel mmLul

opal plank
#

im gonna make a copy pasta rq

#

might come in handy

zenith terrace
#

Still waiting for person to reply back CokeSip

misty sigil
#

get the channel from cache
client.channels.cache.get("channel id")
then send to it
channel.send("Message")

zenith terrace
#

No u

misty sigil
#

ill do it for you

zenith terrace
#

Ok