#development

1 messages Β· Page 1144 of 1

solemn latch
paper cliff
#

it's not a vps

delicate shore
#

it is different bot

paper cliff
#

the picture he showed

solemn latch
#

oh, he said he had a vps

#

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

odd lichen
#

I am trying to add a role to a user in discord.js v12. But it says that it cant read property add of undefined.

const guild = reaction.message.guild;
            const rUser = await bot.users.cache.find(c => c.id === user.id)
            let role = await guild.roles.cache.find(r => r.id === "742752878778908882");
            rUser.roles.add(role)
``` anyone got a clue why?
paper cliff
#

it's running through a container

delicate shore
#

yes i do

#

but they only allow one

#

project

paper cliff
#

it's not a vps

solemn latch
#

thats not a vps then

delicate shore
#

:|

solemn latch
#

i thought you meant you had a vps somewhere

paper cliff
#

unless you have the entire control of the system

ionic dawn
#

vps its a full server

solemn latch
#

lool

ionic dawn
#

you can stora whatever you want

solemn latch
#

^

misty sigil
#

vps = virtual private server

delicate shore
#

oh wait

solemn latch
#

could have 10000 projects on a vps

misty sigil
#

basically miniature server

odd lichen
#

wow my questions just got skipped

delicate shore
#

they gave me a server

odd lichen
#

xD

ionic dawn
#

its a second pc

misty sigil
#

could have 10000 projects on a vps
@solemn latch if it was powerful enough x)

solemn latch
#

they gave you a container

paper cliff
#

@odd lichen

delicate shore
#

they just gave this

odd lichen
#

yes

paper cliff
#

fetch the member instead of the user

odd lichen
#

?

paper cliff
#

yes

#

the member

misty sigil
#

you'd be better with a dedi at that point

#

oh hey tim

quartz kindle
#

just make 10000 websites that nobody uses

#

no need for power then

paper cliff
#
const rUser = await guild.users.cache.get(user.id)
misty sigil
#

meh i suppose you're right

odd lichen
#

ah ty

delicate shore
pale vessel
#

cache#get() isn't a promise

#

guild.members you mean?

misty sigil
#

i swear i've seen that panel before

solemn latch
#

generally, you access a vps via ssh

paper cliff
#

ah yes i just copied&paste

#

my bad

#

omg

#

i'm so stupid

#

guild.members.cache.get()

earnest phoenix
#

@misty sigil pterodactyl

ionic dawn
#

default hosting panel

misty sigil
#

knew it

odd lichen
#

alright

earnest phoenix
#

Default what now πŸ˜‚

#

Nothing comes by default

odd lichen
#

ay it works

ionic dawn
#

well

#

that panel its the same from a MC Hosting company

#

so yea, kinda copy

earnest phoenix
#

Yea well you install it

delicate shore
#

how tho
generally, you access a vps via ssh
@solemn latch

earnest phoenix
#

Doesnt come by default at all

ionic dawn
#

Yea i know

paper cliff
#

wait that's weird

ionic dawn
#

what I meant by default its... ik... "THE USUAL SHIT"

paper cliff
#

it's user is literally called "container"

#

i don't think he has access to ssh

misty sigil
#

lmao KEKW

solemn latch
#

yeah, thats what i was meaning

rocky hare
earnest phoenix
#

probably a shared ip between instances too lmfao

ionic dawn
#

i don't think he has access to ssh
@paper cliff Probably not, hosting dnst allow you to connect via SSH, they only provide a FTP/SFTP connection and "start" button

misty sigil
#

is that uh, discord bot maker.

paper cliff
#

hosting dnst?

#

Is the name of the default panel?

ionic dawn
#

dsnt*

#

Doesnt

paper cliff
#

ah sorry i'm freaking dumb

rocky hare
#

is that uh, discord bot maker.
@misty sigil , Yes

ionic dawn
#

I writed bad aswell, dw

misty sigil
#

Ok, so, i have no idea.

ionic dawn
#

@misty sigil didnt you said that "Bot maker" is like wix for bots?

earnest phoenix
#

we dont support bot makers here

ionic dawn
#

somethn like that?

misty sigil
#

Nah.

earnest phoenix
#

since you're not in control of the code

misty sigil
#

Thats botghost

ionic dawn
#

oh hehe

earnest phoenix
#

go complain to the developer of the bot maker

misty sigil
#

but it is

#

much and such the same

paper cliff
#

in fact, you can export your code in Discord Bot Maker

misty sigil
#

so ablobshrug

rocky hare
#

The bot is ready online

misty sigil
#

πŸ‘Œ

ionic dawn
#

Congrats I guess

paper cliff
#

thanks

delicate shore
#

but

paper cliff
#

what

delicate shore
#

@solemn latch i waited it installed everything perfect no error but it is not playing the file

paper cliff
#

resend your code

solemn latch
#

like i said, i havent worked on music bots in a long time. i wont be much use here

delicate shore
#

resend your code
@paper cliff ok

#
if(command === "airhorn"){
const VC = msg.member.voice.channel;
        if (!VC) return msg.channel.send("I'm sorry, but you need to be in a voice channel to play a music!");
    VC.join()
        .then(connection => {
            const dispatcher = connection.play('./home/container/airhorn.mp4');
            dispatcher.on("end", end => {VC.leave()});
        })
        .catch(console.error);
  }```
#

this

paper cliff
#

/home/container/airhorn.mp4

#

remove the trailing dot at the beginning

delicate shore
#

the .?

paper cliff
#

yes

delicate shore
#

ok

#

thnx

#

@paper cliff nope

#

still not working at all

paper cliff
#

but wait

#

why it is a .mp4 first

#

lool

#

it has to be an .mp3 or an another audio format

delicate shore
#

oh wait

#

it is mp3

#

i just wrote mp4

#

accidently

#

ok @paper cliff it worked thanks a ton but one thing it does not leave after songs end

#
if(command === "airhorn"){
const VC = msg.member.voice.channel;
        if (!VC) return msg.channel.send("I'm sorry, but you need to be in a voice channel to play a music!");
    VC.join()
        .then(connection => {
            const dispatcher = connection.play('/home/container/airhorn.mp4');
            dispatcher.on("end", end => {VC.leave()});
        })
        .catch(console.error);
  }```
#

but i use here dispatcher.on(end)

#

@earnest phoenix some in my server one time

#

and join vc

#

i wanna show u one thin

solemn latch
#

you mean
message.channel

#

?

earnest phoenix
#

!help

slender thistle
#

-botcommands @earnest phoenix

gilded plankBOT
#

@earnest phoenix

Hey! Bots aren't given permissions to send responses in this channel. Please use #commands or #265156322012561408 to run commands. In addition, bots with commonly used prefixes cannot read or send messages in any channel. This is done to prevent spam and bot abuse.

round island
#

so i made a bot that has a feature where it can send 1 out of 12 messages but instead of sending the 1 message out of the 12 messages its sends all the messages

faint prism
#

What is this UI?

cinder patio
#

discordbotmaker I assume

lusty quest
#

better ask in the DBM discord. they can help you. here are not many that use it

round island
#

Yeah im not that good visual studio ill ask the dbm discord

weary goblet
#

Why is not conforming my bot apureval so late

slender thistle
#

-upto

gilded plankBOT
#

The average up-to-date approval times are stated here.

This does not mean it will take the same amount of time someone else's bot took to be reviewed and does not mean your bot is guaranteed to be reviewed within that time frame.

There is no exact time for how long bot approval will take.

There is a queue and you're not first, nor are you last.

slender thistle
weary goblet
#

Oo

lilac gale
#

Hi. I need help with sequelize.

slender thistle
#

-ask2ask

gilded plankBOT
#

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

lilac gale
#

Oof

#

I'm having an issue with sequelize cuz it says it can't find the database. Whoever is going to help me, dm me and I'll give you full code.

earnest phoenix
#

is there any way

misty sigil
#

\n

earnest phoenix
#

to increase the gap b/w base stats and ev

#

oh

#

can i get an example

misty sigil
#

wait i thought you wanted the embed

earnest phoenix
#

nah

misty sigil
#

so thats your bot right?

earnest phoenix
#

yes

forest prairie
#

sexy ditto

earnest phoenix
#

oh

misty sigil
#

what are you trying to do?

earnest phoenix
#

that kinda looks messy

misty sigil
#

oh

cinder patio
#

I don't think a gap is possible, you could try with an empty inline field, but that may push some fields down

misty sigil
#

not afaik

earnest phoenix
#

i want to increase space b/w base-stats field and ev one

#

oh

cinder patio
#

You can either try adding a blank field between them, or add a bunch of spaces at the beginning of every new line in the Ev-yield

forest prairie
earnest phoenix
#

ye

forest prairie
#

are you using discord.js

earnest phoenix
#

.py

forest prairie
#

You can either try adding a blank field between them, or add a bunch of spaces at the beginning of every new line in the Ev-yield
.

#

try that

earnest phoenix
#

i will try that

#

thanks

cinder patio
#

Keep in mind that if the user is viewing it from mobile it may look very bad

wind kayak
sudden geyser
#

it's encrypted

earnest phoenix
#

Keep in mind that if the user is viewing it from mobile it may look very bad
ye tru that

wind kayak
#

1 shard 2500 guilds? Naah lets do 1 shard 2 guilds

sudden geyser
#

I've seen people do that in production.

earnest phoenix
#

How do i make a help command in my discord bot

sudden geyser
#

do you know how to make a command

earnest phoenix
#

of course

#

but the help command i dont know

lilac gale
#

It's simple.

earnest phoenix
#

so..

sudden geyser
#

do you keep the commands stored somewhere, like the name

#

or are you hardcoding each case for the command

lilac gale
#

message.author.send("whatever the command included")

earnest phoenix
#

what do you mean?

sudden geyser
#

aka do you have a command handler

lilac gale
#

How many files do you have for your bot?

#

1?

#

Like how many javascript files.

earnest phoenix
#

yes i have a handler folder in my index.js

lilac gale
#

Ok. Then make a file in that folder

earnest phoenix
#

How many files do you have for your bot?
@lilac gale for now i have: index.js / .env / config.json / and the commands folder

lilac gale
#

Where you do message.author.send("message you want to be dmed.")

earnest phoenix
#

ok

sudden geyser
#

There are multiple ways of making a command handler. It's not just "one way" and asking us for help will likely bring up multiple solutions which may or may not work.

earnest phoenix
#

ok ok

sudden geyser
#

If you keep the commands stored in ram in something like a map/collection, you can use that to get info on commands. If you don't, you'd need to hard-code each case, which is not a good idea.

lilac gale
#

You seem pretty experienced.

#

@sudden geyser I need help with currency system can you check my database see what's wrong?

earnest phoenix
#

i use the https://repl.it/ for developer may bot

honest perch
#

ok

sudden geyser
#

Well what is wrong with it.

#

If something's going wrong, what is the issue exactly.

lilac gale
#

It says that it doesn't recognize the table.

sudden geyser
#

does the table exist in the database

earnest phoenix
#

If something's going wrong, what is the issue exactly.
@sudden geyser nothing, i'm just saying

lilac gale
#

Yes.

#

I think so.

#

How can I check?

sudden geyser
#

That wasn't directed at you Martim

#

One way to check would be to try creating a table with the same name

#

If it exists it'll complain

earnest phoenix
#

???

sudden geyser
#

Again, not directed to you.

earnest phoenix
#

sorry

lilac gale
#

We're talking about my database.

faint prism
#

How many files do you have for your bot?
@lilac gale 33 πŸ™‚

sudden geyser
#

cringe

lilac gale
#

I'm used to ifs.

#

I only use if statements bahahaha. First time I've made more files for this annoying sequelize thing.

#

This table is name guild_users right?

sudden geyser
#

Ah, I haven't used Sequelize in a while. It's your code, you should know what it is/does.

lilac gale
#

Have you made a currency system?

#

Cuz if you have, I'd like to use yours hehe.

honest perch
#

can you not take a proper screenshot

#

and wtf is that editor

#

notepad?

lilac gale
#

Yes.

honest perch
#

are you ok

lilac gale
#

Yes. I'm not mentally ill, I adore notepad.

faint prism
#

😐

sonic lodge
#

don't use notepad, use a more featured code editor like atom, vsc

faint prism
#

Or an IDE in general

honest perch
sonic lodge
#

you have visual studio, you can use that ig

lilac gale
#

Yep you noticed

opal plank
#

screenshots are native to windows btw

lilac gale
#

I'm shocked.

#

screenshots are native to windows btw
@opal plank ik!

opal plank
#

you dont

#

clearly

lilac gale
#

I just don't like VS code.

sonic lodge
#

just use a better code editor

honest perch
#

im pretty sure you are just feeding a troll

opal plank
#

you dont like VSC but like notepad?

lilac gale
#

you dont like VSC but like notepad?
@opal plank it works real slow.

#

And yeah I always get judged for using notepad πŸ‘€.

sonic lodge
#

maybe because you should switch πŸ‘€

earnest phoenix
#

hmm

opal plank
#

what you are doing is equal to trying to cleaning a house with a cotton swab

sudden geyser
#

A code editor is designed to make coding easier. A text editor is designed to do one thing: read and write text in a document.

lilac gale
viral coral
opal plank
#

@lilac gale no not better, take screenshots not picture

earnest phoenix
#

@lilac gale just stick to sublime or Visual CodeπŸ˜‚

opal plank
#

ShareX, Snipping tools, Prt Screen + Ctrl V, Gyazo, Anything

solemn latch
#

πŸ€”

#

battleship will be easier than expected

sudden geyser
#

try making an AI tic tac toe game

solemn latch
#

already got ship placement
c6,g6.
c2,c4

#

attacks

earnest phoenix
#

@viral coral what framework is that?

solemn latch
#

g2

earnest phoenix
#

doesnt make a diff

faint prism
#

\t

earnest phoenix
#

:/

#

/t

#

"{:<20}".format('')+"**"+d[count]+" :** "+str(i['effort'])+"\n"

torn ravine
#

bruh

static lynx
#

bruh

amber fractal
#

@earnest phoenix wat

trim saddle
#

so uh

torn ravine
#

ya

static lynx
#

😁 i got included

amber fractal
#

wrong chat

static lynx
#

omg shitpost go to jail

silver dust
#

oh

#

forgot

torn ravine
#

lol

silver dust
#

sorry

static lynx
#

it’s ok

#

:)

haughty igloo
#

my bot keeps loading commands over and over

torn ravine
#

lol

haughty igloo
#

the bot doesn't work because of this

torn ravine
#

can we see your code

trim saddle
#
if (cmd.cooldown) {
    let times = this.cooldowns.get(cmd.name)
    if (!times) {
        this.cooldowns.set(cmd.name, new Map())
        times = this.cooldowns.get(cmd.name)
    }
    const now = Number(new Date())
    if (times.has(msg.author.id)) {
        const expires = Number(times.get(msg.author.id)) + (cmd.cooldown * 1000)
        if (now > expires) {
            const left = (expires - now) / 1000
            return msg.channel.createMessage(`\`:timer:\` Cooldown | ${cmd.name}\n> You can use this command again in \`${left.toFixed(1)}s (${left * 1000}ms)\``)
        }

    }
    times.set(msg.author.id, new Date())
    setTimeout(() => times.delete(msg.author.id), cmd.cooldown * 1000)
}

code bad, cooldowns never actually trigger

haughty igloo
#

Bri

#

Bro

static lynx
#

hold on i am outside i cannot see

amber fractal
#

Just some semantics, you can do now = Date.now() instead of making a whole new date object and converting it

torn ravine
#

^

amber fractal
#

tiny bit faster mmLol

trim saddle
#

i can't add dates to numbers

#

and i can't add dates to dates

earnest phoenix
#

:(

quartz kindle
#

wdym

amber fractal
#

Why would you need to?

#

You're adding milliseconds

#

number + number

static lynx
#

@trim saddle I NO JS

quartz kindle
#

btw your problem seems to be now > expires

trim saddle
#

this is ts btw

quartz kindle
#

shouldnt it be now < expires ?

trim saddle
#

@quartz kindle OMEGALUL

amber fractal
#

Yeah, you're adding to expires from the time they ran the command

trim saddle
#

tim fixes the problem in one line

torn ravine
#

tim

#

is just stack overflow in human form

fickle hawk
#

timoverflow?

solemn latch
#

im just wondering what brain implant he has that lets him have access to all of google at the same time

quartz kindle
#

Lol

amber fractal
quartz kindle
#

you guys are thinking too highly of me, that usually doesnt end well lmao

solemn latch
drifting wedge
#

how can i make it so if you dont have permission it says no permission?

quartz kindle
#

check if they have permissions

earnest phoenix
#

V11?

solemn latch
#

if(dont have permission) say no permission

digital ibex
#

js v11 :o

earnest phoenix
#

I mean discord.js v11

static lynx
#

i

earnest phoenix
#

you?

pure lion
#

Hey I'm making a botlist for those of you who don't know

#

Okay cool bye

trim saddle
#

@quartz kindle you've worked with eris before right?

pure lion
#

He's worked with djs

#

A lot

trim saddle
#

djs is assy-ass

digital ibex
#

he doesnt really like it :angry:

#

yeah

pure lion
#

:angy:

#

Djs light best lib

digital ibex
#

eris is underrated and amazing imo

fickle dune
#

i made

#

a bot which

pure lion
#

Dies

fickle dune
#

is a timer reminds

#

like

#

&remind 1 sadad

#

and in 1 min

#

it will send embed with

#

sdadadad

#

is ur remind

#

in dms

placid rune
#

Can anyone code my bot?

pure lion
#

client.on('guildCreate', guild => {guild.leave})

#

@placid rune dm

#

We'll discuss payment

#

x)

trim saddle
#

people really say d.js is better

slender thistle
#

-needdev

gilded plankBOT
#

DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.

quartz kindle
#

i've only used eris for some tests, never made a bot with it

trim saddle
#

oh

torn ravine
#

ah

trim saddle
#

well i wanted to make a string to member converter

quartz kindle
#

what kind of string? just an id?

trim saddle
#

username, nickname, id

faint prism
#

Use a constructor

quartz kindle
#

use members.fetch

trim saddle
#

hm.

quartz kindle
#

or rather

#

guild.fetchMembers()

torn ravine
#

guild.fetchMembers('id')

#

you should get id from the arguement

faint prism
#

In a different language all I do is:

class Member
{
  ulong Id;
  string Username;
  string Nick;

  Member(ulong id, string username, string nick)
  {
    Id = id;
    Username = username;
    Nick = nick;
  }
}
digital ibex
#

u long pog

quartz kindle
#

thats just creating an arbitrary object

#

no relation with discord

digital ibex
#

im long not u

#

:pog:

#

ok i guess no one found that funny i go over πŸ‘‰ for a bit

quartz kindle
#

you want to allow or deny?

earnest phoenix
#

How can i have a bot post images like yui dose?

pure lion
#

Show

#

How

#

How does this "yui" bot post images

earnest phoenix
#

Ill show u

pure lion
#

That's an embed

#

It's literally .setImage(image)

midnight blaze
#

do you want to post canvas?

earnest phoenix
#

So do i drag drop ?

midnight blaze
#

you can either use canvas to create images or link images in your embed

#

wut

earnest phoenix
#

Ok

#

Nvm

#

Thx

haughty igloo
#

(node:4420) UnhandledPromiseRejectionWarning: Error: Shard 0's Client took too long to become ready.

#

Have error

#

How to fix?

drifting wedge
#
    channel = client.get_channel(id=int(result[0]))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'```
haughty igloo
#

?

drifting wedge
#

im getting this error

haughty igloo
#

(node:4420) UnhandledPromiseRejectionWarning: Error: Shard 0's Client took too long to become ready.
@haughty igloo

#

Me 2

drifting wedge
#

channel = client.get_channel(id=int(result[0]))

quartz kindle
#

that means result[0] doesnt exist

slender thistle
#
>>> int(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
#

You are trying to convert None into an integer, which doesn't work

haughty igloo
#

that means result[0] doesnt exist
@quartz kindle wdym

slender thistle
#

not you

haughty igloo
#

Help me?

leaden rover
#

How do I make it so my help commands is embed rather then well, like this:
this is an example
This is discord.py

slender thistle
#

You could use embed fields or embed description where you append to a string for each command your bot has

earnest phoenix
leaden rover
#

Ok

earnest phoenix
#

.setThumbnail(kisi.displayAvatarURL({size:1024,dynamic:true}))

sudden geyser
#

create a discord.Embed() instance, populate it, send it with context.send(embed=embed) or anything that sends to a channel

slender thistle
#
from discord import Embed as Discord
import discord as embed```
leaden rover
#

Ok

slender thistle
#

no

leaden rover
#

no?

slender thistle
#

I was just hoping you didn't actually take my joke snippet seriously

leaden rover
#

I didn't lmao

slender thistle
#

aye splendid then KEKW

leaden rover
#

yeah

drifting wedge
#

how can i make it so users can like set the embed color?

#

i would put it in a db

#

with the guild id

#

but how would i push it to the db id and pull it?

quartz kindle
#

then deny it

#

you wrote allow instead of deny

#

permissionOverwrites

#

not
permissionsOverwrites

fickle dune
#

can someone

#

host my bot

#

4 some reason heroku dosent wrok

earnest phoenix
#

No

fickle dune
#

k

misty sigil
#

no

elder plume
#

How do I make my bot's page like Sx4 and Kitrobit? GWcmeisterPeepoE

misty sigil
#

you're literally asking for free server space

#

from people who pay for their servers

elder plume
#

Agree with @misty sigil

lyric mountain
#

4 some reason heroku dosent wrok
@fickle dune heroku is slowly killing hosted bots just like glitch

#

both glitch and heroku aren't intended to host bots

elder plume
#

Someone answer my question GWcmeisterPeepoE

misty sigil
#
elder plume
#

Yes

fickle dune
#

a

misty sigil
#

That's just some fancy CSS

#

I think they used script tags too tho

#

but non-cert devs can't do that

fickle dune
#

@lyric mountain uh so what should i use to host for free

elder plume
#

Damn too good GWcmeisterPeepoE

misty sigil
midnight blaze
#

@fickle dune use your pc, just dont turn if off

lyric mountain
#

@lyric mountain uh so what should i use to host for free
@fickle dune plot twist: nothing in life is free

faint prism
#

@lyric mountain uh so what should i use to host for free
@fickle dune yourself

fickle dune
#

a no

#

my pc died

elder plume
#

Lol

misty sigil
#

any """""""""""free""""""""""" hosting is either:

  1. not intended to be used as hosting
  2. not actually suitable for hosting
  3. not actually free
fickle dune
#

its just 8gb ram

lyric mountain
#

you need more quotation marks there

sonic lodge
#

"just 8 gb"

misty sigil
#

my bot runs on a vps with 2gb of ram

sonic lodge
#

mine on 1 gb

fickle dune
#

8gb ram

#

pc

faint prism
#

Mine 512mb

fickle dune
#

not

#

bot

misty sigil
#

along with

  1. my mongo cluster
  2. my moderation bot
  3. my website
fickle dune
#

i said

lyric mountain
#

I barely reach 200 mb

midnight blaze
#

not bot he said

fickle dune
#

8gb ram pc @sonic lodge

sonic lodge
#

so you're all set

faint prism
#

My other uses 128mb

fickle dune
#

i have

#

i have 8gb ram pc

#

not 8gb ram bot

faint prism
#

You've got plenty

sonic lodge
#

so you're all set

misty sigil
#

so do i

#

you can host on 2gb

midnight blaze
#

so you are all set

fickle dune
#

a

elder plume
#

The app I use is:-

  1. Used for coding
  2. Offers hosting by watching ads
  3. You can only host bots created in that app only
  4. That app is bdfd KEKW
misty sigil
#

you could host on 1gb

fickle dune
#

ik but intel core duo

#

intel core duo

faint prism
#

You could host on 512mb probably

fickle dune
#

DUO

misty sigil
#

i could auger

sonic lodge
#

we're saying that your computer is much better than many of our bots' private servers

midnight blaze
#

duo is better than uno, so you are all set

sonic lodge
#

so you can use your computer to host your bot

misty sigil
#

ffs

fickle dune
#

asdadasda

misty sigil
#

my vps has 1 core.

#

ONE CORE.

quartz kindle
#

1 core 1gb

misty sigil
#

1 core 2gb mmulu

lyric mountain
#

dude, gimme two potatos, some copper wire and a nickel coin and I'll setup a free hosting in 5 minutes

fickle dune
#

@midnight blaze no i mean i cant keep it on full time

misty sigil
#

yes u can

fickle dune
#

my pc blast

#

Ok

lyric mountain
#

intel core duo is overkill for most bots

#

like, your pc is only slow because it needs to render a lot of stuff

misty sigil
#

way overkill

elder plume
#

@fickle dune delete your bot and create it in bdfd

quartz kindle
#

most bots can run on any potato pc no problem

misty sigil
#

my bot right

#

aye ^

lyric mountain
#

screen rendering is like 99% processor usage

fickle dune
#

ik but for some resaon my is 8 yrs old and turns off in mid of work

#

lol

elder plume
#

That's the only way you can get free hosting if you don't want to host it in your pc KEKW

fickle dune
#

thats why finidin a way

#

asd

quartz kindle
#

host it in your smart fridge / smart toaser

midnight blaze
#

xd

earnest phoenix
#

bruh i used to self host for like 30 servers

#

and my pc was fine

elder plume
#

Lmfao

earnest phoenix
#

but now im on a vps

misty sigil
#

host it in your smart fridge / smart toaser
@quartz kindle sometimes, my genius, it scares me

lyric mountain
#

if your pc turns off mid work then it has:
A - bad coolers
B - viruses, a lot of it

misty sigil
#

bruh i used to self host for like 30 servers
@earnest phoenix i used to selfhost for 69 servers mmulu

earnest phoenix
#

0.0

elder plume
#

@earnest phoenix give this @fickle dune named man a tutorial on how to do it KEKW

quartz kindle
#

i used to self host on a potato laptop on potato internet back in brazil, bot's ping was anywhere from 2s-20s

misty sigil
#

lmao

fickle dune
#

ur is fine but idk my turns off for some reason and i dont wanna fix it as im lazy @earnest phoenix

earnest phoenix
#

holy how many pings

misty sigil
midnight blaze
#

@quartz kindle life was hard back then in the past

sonic lodge
#

well if you fix it you get free hosting

quartz kindle
#

lmao

midnight blaze
#

56kb internet

earnest phoenix
#

@fickle dune factory reset it there's an option to also keep files you want to keep

fickle dune
#

i got into discord in 3 months made a bot got nitro got disabled 4 times and bruhhhh

#

im super disabled

#

B)

slender thistle
#

Can I move my cloned Git repository folder without any consequences?

earnest phoenix
#

where to?

slender thistle
#

A parent folder, for example

paper cliff
#

Yes

#

Sure

#

Make sure you include the .git subdirectory

slender thistle
#

ofc KEKW

earnest phoenix
#

lmao

fickle dune
#

download waitWhat ytho weirdsip zoomeyes - find meaning

earnest phoenix
#

okay so i currently have a command that gives the desired role you typed in but you have to manually type it => .role @horror#0003 Test but i want to mention the role instead of manually typing it.

faint prism
#

you'd probably want to review the git changes very closely after that

earnest phoenix
slender thistle
#

How are you getting the role?

#

you'd probably want to review the git changes very closely after that
@faint prism anything specific I'm looking for?

earnest phoenix
#
@client.command()
@commands.has_permissions(manage_roles=True)
async def role(ctx, user: discord.Member, role):
    userrole = discord.utils.get(ctx.guild.roles, name=f'{role}')
    await user.add_roles(userrole)
    await ctx.message.add_reaction(':white_check_mark:')```
slender thistle
faint prism
#

I assume you'll see a lot of [Deleted] and [Added]

slender thistle
#

discord.Role as type annotation will allow you to use mention, name, and ID

#

oh, those. Those... are not exactly important, are they?

earnest phoenix
#

so like this

faint prism
#

I mean, they basically mean the full path for the file changed if you see a [Deleted] and [Added] back to back

earnest phoenix
#

async def role(ctx, user: discord.Member, role: discord.Role):

slender thistle
#

mhm

silk quail
#

I want a bot developer for my server

earnest phoenix
#

What is a def

silk quail
#

Can anybody

#

Pls

earnest phoenix
#

I want a bot developer for my server
@silk quail me

#

Hire me

silk quail
#

Really

sonic lodge
#

def defines a function in python

silk quail
#

Yes pls

#

It help me alot

#

Dm ??

earnest phoenix
#

Ok

silk quail
#

@earnest phoenix

#

Ok

slender thistle
#

-needdev

gilded plankBOT
#

DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.

earnest phoenix
#

Ok

#

Also his dms are off anyways

glossy elk
#
2020-08-11 12:52:54.607  INFO 6600 --- [  XNIO-1 task-1] l.server.io.HandshakeInterceptorImpl     : Incoming connection from /127.0.0.1:54796
2020-08-11 12:52:54.788  INFO 6600 --- [  XNIO-1 task-1] lavalink.server.io.SocketServer          : Connection successfully established from /127.0.0.1:54796
2020-08-11 12:52:54.813  INFO 6600 --- [   XNIO-1 I/O-4] lavalink.server.io.SocketServer          : {"op":"configureResuming","key":"aaa","timeout":60}```
#

i try to connect

#

to lavalink

#

it connects then times out

opaque eagle
#

Hey guys, for some reason I get a connection refused error when connecting to RabbitMQ

#

But the dashboard is up and running

earnest phoenix
#
if len(user.roles) > 1:
        role_string = ' '.join([r.mention for r in user.roles][1:])
        embed.add_field(name='__Roles__ [{}]:'.format(len(user.roles)-1), value=role_string, inline=False)
    elif len(user.roles) <= 0:
        embed.add_field(name='__Roles__ [0]:', value='None', inline=False)``` why when i have [0] roles it doesnt add the field thats ats  Roles [0]?
manic osprey
#

Hi

opaque eagle
#

2020/08/11 17:57:50.430996 failed to connect to broker, retrying in 320 seconds: dial tcp 127.0.0.1:5672: connect: connection refused

#

I've disabled my firewall and everything

manic osprey
#

@opaque eagle it is fake or malicous host

slender thistle
#

because there will always be at least one role, that's the default role

opaque eagle
#

it's my local host

#

it's on my computer

manic osprey
#

Khm

earnest phoenix
#

because there will always be at least one role, that's the default role
@slender thistle so if theres no role how do i make it say 0

slender thistle
#

len(user.roles) == 1

glossy elk
#
2020-08-11 12:52:54.607  INFO 6600 --- [  XNIO-1 task-1] l.server.io.HandshakeInterceptorImpl     : Incoming connection from /127.0.0.1:54796
2020-08-11 12:52:54.788  INFO 6600 --- [  XNIO-1 task-1] lavalink.server.io.SocketServer          : Connection successfully established from /127.0.0.1:54796
2020-08-11 12:52:54.813  INFO 6600 --- [   XNIO-1 I/O-4] lavalink.server.io.SocketServer          : {"op":"configureResuming","key":"aaa","timeout":60}``` i try to connect
to lavalink
it connects then times out
opaque eagle
#

the @everyone role is considered the first role

glossy elk
#

i-

#

can-

opaque eagle
#

If I need to expose a port from a docker container to my main machine (let's say there was a web app), i'd use the -p flag. but what if i want to do the opposite? i want my docker container to access a host port (let's say i have a postgres instance on my host machine and i want to access it inside the container)

robust moth
#

How can I stop Message collector manually

sudden geyser
#

What library

robust moth
#

Js

#

Can I use it ??
collector.stop()

finite bough
#

yes

sudden geyser
#

Not a library, but yes.

finite bough
#

collector.stop() will stop the collector

#

i think it works in d.js and eris

sudden geyser
#

Eris doesn't have helper classes like that.

#

You'd need to write it manually.

finite bough
#

oh

#

F

#

custom lib user here lmao

earnest phoenix
#

yay my 2nd pubic discord bot has been approved πŸ˜€

#

Can you run a for loop on a collection

quartz kindle
#

yes

earnest phoenix
#

any idea why its doing this?

slender thistle
#

*, reason

then use reason

earnest phoenix
#

just substring it out

#

Every single id has a fixed length

#

You can literally just count up from .ban @hardy void and substring out the length

slender thistle
#

or don't reinvent the wheel and do what d.py allows you to do

earnest phoenix
#

lol

#

Oh wait

#

Got it

slender thistle
#
@commands.command()
async def say(ctx, *, mystring):
    await ctx.send(mystring)```
earnest phoenix
#

Split the text with the seperator as , and set a limit of 2 items and just take the second item as the reason

#

tfw

woven sundial
#
exports.run = (client, message, args) => {
  var Discord = require("discord.js");
  const fs = require("fs");
const fileName = "./config.json";
const file = require(fileName);
const xp = require("./xp3.json");
const code = Math.floor(Math.random() * 9999999) + 1111111
if(!message.member.roles.cache.has("742310111535562762"))return message.reply("Vous n'avez pas la permission de faire cela.")
const hastebin = require('hastebin.js');

var stringified = JSON.stringify(xp);
var parsedObj = JSON.parse(stringified);
 
console.log(parsedObj);
const haste = new hastebin({ /* url: 'hastebin.com */ });
const link = haste.post(parsedObj.then(link =>{ console.log(link)
  let embed = new Discord.MessageEmbed()
        .setTitle("BackUp crΓ©e")
        .setURL(link)
        .setDescription("Code BackUp : #"+code)
        .setColor("GREEN")
        .setTimestamp()
client.channels.cache.get("742785224609497108").send(embed)
message.channel.send("Backup crée avec succès")
  });

  }```

content of my hastebin file : https://icero.is-reading-man.ga/EdvA3te.png
How can I get the content of my xp3.json on my hastebin link ? πŸ˜•
earnest phoenix
#

python

slender thistle
#

i-

#

literally just said don't reinvent the wheel and even provided a code snippet to back my point

earnest phoenix
#

lol

quartz kindle
#

@woven sundial dont parse it

#

xp is already a parsed version anyway, you dont need to parse it again. but you have to sent the stringified version, not the parsed one
and the link line makes no sense, looks completely broken

midnight blaze
#

quick question, trying to get the badges of users. I know I have to access flags.

console.log(Object.values(message.member.user.flags))

I transformed the object into an array and I get a number.
How exactly should I know transform this number into something that tells me, which kind of badges someone has?

#

for my own account I get this: [ 131328 ]

#

or do I have to do it in a different way?

surreal sage
#

How to catch a response on request.post

#

(request is a npm module)

earnest phoenix
#

Isn't request deprecated

surreal sage
#

yeah it is

#

what parameters in the .then

quartz kindle
midnight blaze
#

oh, ofc..thanks

earnest phoenix
#

Caps

#

AAAAAAAAAA THE DOCS ARE YELLLING

quartz kindle
#

its basically constants

#

constants are usually defined in all caps

earnest phoenix
#

Is discord.js case sensitive

quartz kindle
surreal sage
#

so?

quartz kindle
#

it doesnt support promises out of the box

#

there is no .then

surreal sage
#

do i have to install a module orso?

quartz kindle
#

the request module uses callbacks

#

not promises

surreal sage
#

npm i request-promise ?

quartz kindle
#

if you want to convert it to promises, do what the image above says

earnest phoenix
#

why not just link it

#

an image is kinda hard to read

surreal sage
#

its fine

earnest phoenix
#

especially jpeg (for me probs)

quartz kindle
#

or just use a different library, one that is not deprecated preferably

pure lion
#

how do i set custom headers from express?

earnest phoenix
#

Is discord.js case sensitive
halp
lol

quartz kindle
pure lion
#

wbat about custom headers?

earnest phoenix
#

What's Full Stack

pure lion
#

all of backend and frontend

#

e.g databases, apps, webpages, server stuff etc

earnest phoenix
#

Is javascript and/or discord.js case sensitive

jovial frost
#

yes

earnest phoenix
#

F

pure lion
#

okay i want to somehow store userinfo from oauth but not have the stinky poopoo &code url param so how would i put things to storage somehow? localstorage doesnt work *sad*

earnest phoenix
#

Cache it on their device

pure lion
#

localstorage doesnt work

earnest phoenix
#

F

cinder patio
#

how could it possibly not work?

pure lion
#

i want to do it from the back

#

so it not work

cinder patio
#

Uuh why do you want to store it in the first place? I don't think it's meant to be used for a long period of time

#

Also, if you really wanna store it, you can put it in a cookie

pure lion
#

i just want to store user+discrim and avatars and stuff

#

okay cool

#

res.cookie(key, value)?

earnest phoenix
#

Can i join you i'm developer of mee6 bot

opal plank
earnest phoenix
cinder patio
#

sure Dice, but like I said the code is not meant to be saved for a long period of time

earnest phoenix
#

i don't lie

pure lion
#

im not saving the code

opal plank
pure lion
#

i just want to store user+discrim and avatars and stuff

cinder patio
#

You should store that in a database on your backend

#

A user can change a cookie or a localstorage entry anytime

pure lion
#

omg

#

what i mean is

#

the user can visit other routes but still have their ID and shit

earnest phoenix
#

you store that info in the backend

#

than serve it to frontend

pure lion
#

im getting it from oauth2

earnest phoenix
#

you aren't doing it clientside, are you?

pure lion
#

weh

surreal sage
#

How to post properly without getting a code 0 (auth denied) js await request.post('https://presence.roblox.com/v1/presence/users', { form: { 'userIds': [ 378221368 ] }, headers: { 'content-type': 'text/json' } }).catch(err => { console.log(err) })

earnest phoenix
#

you probably need a token

opal plank
#

read the docs probably

#

^^

#

theres usually authentication headers for those things

cinder patio
#

Dice, you should create something like a session id, which you can set as a cookie, and use it to retrieve the user data from your database

surreal sage
#

@earnest phoenix this is just a open api hting

#

its from roblox

pure lion
#

i guess on oauth completion i could create a new doccument

surreal sage
#

btw to who ru talking

#

me?

earnest phoenix
#

i don't think that the api would allow you to openly POST without some sort of authentication

opal plank
#

^^

#

read the docs on whatever api u using

#

theres usually authentication headers for those things

surreal sage
#

no that aint the prob

#

wdym

#

wdym auth headers

opal plank
#

read the docs

earnest phoenix
#

yikes

opal plank
#

on that api

surreal sage
#

im using request-promise

pure lion
#

buuuuuuuut how would i handle session IDs? i can generate one with uuid but how store + access

opal plank
#

on the endpoint you touching

surreal sage
#

@opal plank no

opal plank
#

no shit

surreal sage
#

thats not the prob

#

i do not

#

know

#

how

#

to

#

use a post on request-promise

opal plank
#

READ

#

the

#

DOCS

pure lion
#

PLEASE

earnest phoenix
#

that is the problem, you yourself said you're getting auth denied

#

and you have no auth headers

#

using simple logic

#

you're getting auth denied because you have no auth headers

opal plank
#

read the docs before hoping in, im willing to bet theres an authentication header on the request

quick ridge
cinder patio
#

if you are using mongoDB, simply add a document like {...the data you got from the oauth, sessionId: "sessionidHere"} and when you want to use the user's info, check if they have a sessionId cookie, and if they do, fetch the data from the database, otherwise ask them to authorize @pure lion

pure lion
#

would it be wise to store sessionID under a user model?

cinder patio
#

I mean... it's up to you I guess, I would have a separate database just for sessionIds

earnest phoenix
#

you should probably look for a framework that has these capabilites built in, encrypting cookies and all because i bet you that you're going to slip up and open up a security concern

pure lion
#

ah s h i t

#

more work

#

yay

#

learning is fun

cinder patio
#

make sure to use the state parameter as well

earnest phoenix
#

^

pure lion
#

i am

earnest phoenix
#

i dont know what language or web framework you're using but i personally used asp.net core for this

pure lion
#

am using express

#

*cries*

earnest phoenix
#

extremely easy to work with and you easily integrate top notch security

surreal sage
#

The first argument must be of type string or an instance of Buffer. Received an instance of Object help thank you

pure lion
#

i could hash the session IDs?

#

The first argument must be of type string or an instance of Buffer. Received an instance of Object help thank you
url.parse?

surreal sage
#

what

earnest phoenix
#

read your error

#

you have eyes

surreal sage
#

i do

#

do you

earnest phoenix
#

yes

surreal sage
#

well uhh

cinder patio
#

Also, make sure the sessionId cookie has the "HttpOnly" and "Secure" options. Other than that, I'm not sure where you can fuck up. Make sure sessionIDs are unqiue

surreal sage
#

im..

#

not that good in english

earnest phoenix
#

the error can't get more clear than what it is

pure lion
#

Also, make sure the sessionId cookie has the "HttpOnly" and "Secure" options. Other than that, I'm not sure where you can fuck up. Make sure sessionIDs are unqiue
*has https*

#

will use uuid

quartz kindle
#

do you know what is a string and what is a buffer and what is an object?

pure lion
#

to generate session IDs

surreal sage
#

first string/number in a array has to be a string?

digital ibex
#

uuid can hash?

pure lion
#

a buffer looks like this:
<bytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytes>

cinder patio
#

HttpOnly means that client-side scripts won't be able to access the cookies

quartz kindle
#

first argument must be a string or a buffer, and you gave it an object

pure lion
#

uuid can hash?
i have another thingy that can but i cant remember the name

quartz kindle
#

the first argument of a function

pure lion
#

HttpOnly means that client-side scripts won't be able to access the cookies
oh got it

earnest phoenix
#

I need help finding the cause of this:

quartz kindle
#

idk what function you're using

earnest phoenix
#

TypeError: Cannot read property 'array' of undefined
at eval (eval at execute (/root/bot/commands/eval.js:11:37), <anonymous>:1:15)
at Object.execute (/root/bot/commands/eval.js:11:37)
at Client.client.on (/root/bot/index.js:28:38)
at Client.emit (events.js:198:13)
at MessageCreateAction.handle (/root/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/root/bot/node_modules/ws/lib/event-target.js:120:16)

cyan quarry
#

hey, where can i ask for help to my bot?

earnest phoenix
#

When doing: \eval client.guilds.array().join("\n")

#

you're right here, leandro

pure lion
#

okay please dont use root user

earnest phoenix
#

It works for everyone else's bot

digital ibex
#

dice if u arent already, use argon2, rly fast i use it

pure lion
#

what is argon2

cyan quarry
#

you're right here, leandro
@earnest phoenix oh ok, do you know how to make warn commands in JS?

faint prism
#

did you mean to do client.guilds.join("\n")

earnest phoenix
#

your question is too abstract

digital ibex
earnest phoenix
#

be more specific

#

Possibly

pure lion
#

oh ok, do you know how to make warn commands in JS?
database and a lot of sticky tape

earnest phoenix
#

It works on other people's bots

quartz kindle
#

argon2 is an encryption algorithm designed for passwords

earnest phoenix
#

you can't ask "how to make x y z" because there's a fuckton of ways to implement it

faint prism
#

Possibly
@earnest phoenix because array is a collection of objects

earnest phoenix
#

I can't even change the bots online status using eval

#

listen

#

to it

#

fuck off

quartz kindle
earnest phoenix
#

ok

cyan quarry
#

be more specific
@earnest phoenix so let me start, in the server we have loritta and mee6 but they have some "spaces" were people can violate the rules
and i want to fix these spaces with other bot

digital ibex
#

argon2 isnt for encryptions

#

its for hashing

earnest phoenix
#

chill

faint prism
cinder patio
#

I don't think session IDs should be hashed, I think using uuid is just fine

earnest phoenix
#

did you mean to do client.guilds.join("\n")
@faint prism

TypeError: Cannot read property 'join' of undefined
at eval (eval at execute (/root/bot/commands/eval.js:11:37), <anonymous>πŸ‘15)
at Object.execute (/root/bot/commands/eval.js:11:37)
at Client.client.on (/root/bot/index.js:28:38)
at Client.emit (events.js:198:13)
at MessageCreateAction.handle (/root/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/root/bot/node_modules/ws/lib/event-target.js:120:16)

#

inspect your variables

faint prism
#

is guilds an array of something? idk tbh

earnest phoenix
#

see what type client is

#

guilds is undefined and that's why it is throwing the error

surreal sage
#

im exactly doing the same on my javacsript but nop

earnest phoenix
#

it works because it's in anapp request

#

lol

#

it's on their own website

surreal sage
#

authentication with or like

#

@earnest phoenix wdym auth

#

auth with what

pure lion
#
const UserSession = new mongoose.Schema(
    {
        userID: {
            type: String,
            unique: true,
            index: true
        },
        sessionID: {
            type: String,
            unique: true,
            index: true
        }
    }
)

dont want to fuck up, is this a good boye?

cinder patio
#

yup, looks good

pure lion
#

ok cool im gonna figure out the encrypt boi

cyan quarry
#

so, i was reading the codes and i found this,
was there an error here that I didn't find? ( i am sorry about my English)

knotty steeple
#

why do people use mongoose schemas lmao

surreal sage
#

ikr

amber fractal
#

data validation

knotty steeple
#

l0l

#

i don't understand why people do .catch(O_o => {})

#

either

#

can't u just leave the catch empty

cyan quarry
#

what can i use? it's my second bot

#

ok

earnest phoenix
#

because the copypaste from a tutorial

faint prism
#

i don't understand why people do .catch(O_o => {})
@knotty steeple .catch(throw)

knotty steeple
#

yea i know what a catch does but like

quartz kindle
#

the emptyest catch you can do is probably .catch(_ => {}) or .catch(() => {})

surreal sage
#

@earnest phoenix wdym auth

knotty steeple
#

i'd do the first

earnest phoenix
#

an auth header

#

have you never worked with a REST api

surreal sage
#

nop

earnest phoenix
#

fun

pure lion
#

why do people use mongoose schemas lmao
is nice

knotty steeple
#

authorization header

earnest phoenix
#

i'm not going to spend time explaining rest, there's plenty of resources for that online

faint prism
#

@surreal sage Look up auth header bearer token
(Which they typically use for auth)

knotty steeple
#

so, i was reading the codes and i found this,
was there an error here that I didn't find? ( i am sorry about my English)
@cyan quarry anyway can u actually send the error

surreal sage
#

@surreal sage Look up auth header bearer token
(Which they typically use for auth)
@faint prism wdym auth header

#

and fill in with what

amber fractal
#

@quartz kindle ```js
let _ = () => {}

<Promise>.catch(_)

faint prism
#

It's something you include in the header for an iNtErNeT request

surreal sage
#

yes..

grim pine
#

e

earnest phoenix
#

Hey so, using my friends bots eval using the same input I used for my bot, I received: ERROR
TypeError: client.guilds.join is not a function

quartz kindle
#

:^)

earnest phoenix
#

Hrm

#

i told you

#

already

#

to inspect your variables

surreal sage
#

I dont know anything abt rest api's

earnest phoenix
#

stop trying to guess what's the cause of the error and instead debug and find it

faint prism
#

@earnest phoenix This channel isn't good for your blood pressure lol

earnest phoenix
#

you could've done this and fixed it already

grim pine
#

I have a question...

so if i am trying to make a bot....

How do i script him?
(I am first time doing it)

earnest phoenix
#

you need to know a programming language

#

and some basic programming knowledge

grim pine
#

I mean... Edit the script...

earnest phoenix
#

if you don't have that, you're better off paying someone else to make it or doing it with a bot maker app

#

what

grim pine
#

Like...

#

How do i make the script and where.. Because he have no script...

sonic lodge
#

you use a text editor

earnest phoenix
#

oh jesus

sonic lodge
#

😐

earnest phoenix
warm cloud
#

thank you danny very cool

earnest phoenix
#

too bad danny isn't in here

paper cliff
#

np :)

earnest phoenix
#

we have a walmart version of it

paper cliff
#

a walmart version?

earnest phoenix
#

@gilded plank

paper cliff
#

ok

#

o lol

quartz kindle
#

@surreal sage from what i can understand, you need to login to the api first

surreal sage
#

how tf am i gonna do that

#

just the same but with a other body?

pure lion
#

i dont want to be stupid so do i store the unhashed sessionIDs on the db?

paper cliff
#

sessionIDs?

pure lion
#

ignore context

quartz kindle
#

you can store them in a database yes

#

doesnt express have a sessions plugin tho?

pure lion
#

and then compare them to the hashed ones?

#

:o does it?

knotty steeple
#

passport

amber fractal
#

I doubt passport has something for roblox

#

oh wait wtf are we talking about I have old context

knotty steeple
#

we are talking about session id stuff

amber fractal
#

which is for the wrong person lmao

pure lion
#

are cookies accessible throughout the entire domain/site/iforgottheterminoligy

misty sigil
#

yes afaik

dire obsidian
#

why is there a AFK command, what is that for, what is his purpose?

knotty steeple
#

idk what passport is for lmao

surreal sage
#

The first argument must be of type string or an instance of Buffer. Received an instance of Object what was this again

#

request-promise

quartz kindle
#

first argument

#

for example someFunction(bla)

#

bla is the first argument

#

your bla is an object

#

and your someFunction does not accept objects

surreal sage
#
await request.post('https://presence.roblox.com/v1/presence/users', {
        body: {
            'userIds': [
                378221368
            ]
        },
        headers: {
            'content-type': 'application/json'
        }
    })``` as a post
quartz kindle
#

only strings or buffers

surreal sage
#

the error doesnt give a loc of the err

quartz kindle
#

would help if you showed the full error

#

according to an issue in the request github

#

the body field should be stringified

surreal sage
#
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer. Received an instance of Object
    at write_ (_http_outgoing.js:653:11)
    at ClientRequest.write (_http_outgoing.js:621:15)
    at Request.write (F:\RobloTracks\node_modules\request\request.js:1494:27)
    at end (F:\RobloTracks\node_modules\request\request.js:549:18)
    at Immediate._onImmediate (F:\RobloTracks\node_modules\request\request.js:578:7)
    at processImmediate (internal/timers.js:456:21) {
  code: 'ERR_INVALID_ARG_TYPE'
}```
quartz kindle
#

body: JSON.stringify({...})

#

instead of body: {...}

earnest phoenix
#

@earnest phoenix More like a K-Mart version

surreal sage
#

oki

#

works thx

earnest phoenix
#

how can i tell the amount of servers my bot is in using a command? discord.py

jovial frost
#

how in discord.js get all reactions name in array from reaction collector by collected

earnest phoenix
#

Does await wait for a Promise to return smth then only it will move on to the rest of the code

sonic lodge
#

yes

rare gale
#

i finally made a bot yay

solemn latch
#

yay

rare gale
#

u got one?

solemn latch
#

yeah, working on making a battleship game rn

rare gale
#

oohh cool goodluck

solemn latch
#

well, taking a break from it, because a dumb issue i spent an hour on

rare gale
#

well, hope you have success

misty sigil
#

good job @rare gale

pure lion
#

oh god i cant get my head around cookies for some reason

solemn latch
#

you should eat cookies, not put your head around them

pure lion
#

ok brb

solemn latch
#

anyway, whats the issue?

pure lion
#

well

#

should i encrypt client side or db side?

#

do cookies remain throughout the entire site?

#

can i make it so the cookie deletes itself when the user leaves the site?

sinful belfry
#

@pure lion cookies are just text files which are sent to the server with every request you make on that website

#

and yes, you can make the cookies expire after a certain period of time

pure lion
#

this is why you are qt

sinful belfry
#

:(

pure lion
#

<:)

#

wait so how can the server access cookies?

sinful belfry
#

you can see them in the http request

pure lion
#

if httpOnly is enabled can i get the content of the cookies

#

o h

cinder patio
#

You don't really need to encrypt cookies

#

there's no point

pure lion
#

db encryption it is