#development
1 messages Β· Page 1144 of 1
it's not a vps
it is different bot
the picture he showed
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?
it's running through a container
it's not a vps
:|
i thought you meant you had a vps somewhere
unless you have the entire control of the system
vps its a full server
lool
you can stora whatever you want
^
vps = virtual private server
oh wait
could have 10000 projects on a vps
basically miniature server
wow my questions just got skipped
they gave me a server
xD
could have 10000 projects on a vps
@solemn latch if it was powerful enough x)
they gave you a container
@odd lichen
they just gave this
yes
fetch the member instead of the user
?
const rUser = await guild.users.cache.get(user.id)
meh i suppose you're right
ah ty
woo this is everything
i swear i've seen that panel before
generally, you access a vps via ssh
@misty sigil pterodactyl
default hosting panel
knew it
alright
ay it works
Yea well you install it
how tho
generally, you access a vps via ssh
@solemn latch
Doesnt come by default at all
Yea i know
wait that's weird
what I meant by default its... ik... "THE USUAL SHIT"
lmao 
yeah, thats what i was meaning
Hi, someone is helping me
When I start the bot it gives me this error
probably a shared ip between instances too lmfao
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
is that uh, discord bot maker.
ah sorry i'm freaking dumb
is that uh, discord bot maker.
@misty sigil , Yes
I writed bad aswell, dw
Ok, so, i have no idea.
@misty sigil didnt you said that "Bot maker" is like wix for bots?
we dont support bot makers here
somethn like that?
Nah.
since you're not in control of the code
Thats botghost
oh 
go complain to the developer of the bot maker
in fact, you can export your code in Discord Bot Maker
so 
The bot is ready online
π
Congrats I guess
thanks
but
what
@solemn latch i waited it installed everything perfect no error but it is not playing the file
resend your code
like i said, i havent worked on music bots in a long time. i wont be much use here
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
the .?
yes
but wait
why it is a .mp4 first
lool
it has to be an .mp3 or an another audio format
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
!help
-botcommands @earnest phoenix
@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.
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
What is this UI?
discordbotmaker I assume
better ask in the DBM discord. they can help you. here are not many that use it
Yeah im not that good visual studio ill ask the dbm discord
Why is not conforming my bot apureval so late
-upto
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.
Oo
Hi. I need help with sequelize.
-ask2ask
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.
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.
\n
wait i thought you wanted the embed
nah
so thats your bot right?
yes
sexy ditto
oh
what are you trying to do?
that kinda looks messy
oh
I don't think a gap is possible, you could try with an empty inline field, but that may push some fields down
not afaik
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
you mean make this space like bigger http://prntscr.com/txveff
ye
are you using discord.js
.py
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
Keep in mind that if the user is viewing it from mobile it may look very bad
it's encrypted
Keep in mind that if the user is viewing it from mobile it may look very bad
ye tru that
1 shard 2500 guilds? Naah lets do 1 shard 2 guilds
I've seen people do that in production.
How do i make a help command in my discord bot
do you know how to make a command
It's simple.
so..
do you keep the commands stored somewhere, like the name
or are you hardcoding each case for the command
message.author.send("whatever the command included")
what do you mean?
aka do you have a command handler
yes i have a handler folder in my index.js
Ok. Then make a file in that folder
How many files do you have for your bot?
@lilac gale for now i have: index.js / .env / config.json / and the commands folder
Where you do message.author.send("message you want to be dmed.")
ok
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.
ok ok
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.
You seem pretty experienced.
@sudden geyser I need help with currency system can you check my database see what's wrong?
i use the https://repl.it/ for developer may bot
Repl.it is a simple yet powerful online IDE, Editor, Compiler, Interpreter, and REPL. Code, compile, run, and host in 50+ programming languages: Clojure, Haskell, Kotlin, QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lua, Pyt...
ok
Well what is wrong with it.
If something's going wrong, what is the issue exactly.
It says that it doesn't recognize the table.
does the table exist in the database
If something's going wrong, what is the issue exactly.
@sudden geyser nothing, i'm just saying
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
???
Again, not directed to you.
sorry
We're talking about my database.
How many files do you have for your bot?
@lilac gale 33 π
cringe
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?
Ah, I haven't used Sequelize in a while. It's your code, you should know what it is/does.
Yes.
are you ok
Yes. I'm not mentally ill, I adore notepad.
π
don't use notepad, use a more featured code editor like atom, vsc
Or an IDE in general
you have visual studio, you can use that ig
Yep you noticed
screenshots are native to windows btw
I just don't like VS code.
just use a better code editor
im pretty sure you are just feeding a troll
you dont like VSC but like notepad?
@opal plank it works real slow.
And yeah I always get judged for using notepad π.
maybe because you should switch π
hmm
what you are doing is equal to trying to cleaning a house with a cotton swab
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.
Better? π‘
Hey, I did this still this js file is not loading(
@lilac gale no not better, take screenshots not picture
@lilac gale just stick to sublime or Visual Codeπ
ShareX, Snipping tools, Prt Screen + Ctrl V, Gyazo, Anything
try making an AI tic tac toe game
@viral coral what framework is that?
g2
\t
bruh
bruh
@earnest phoenix wat
so uh
ya
π i got included
wrong chat
omg shitpost go to jail
lol
sorry
my bot keeps loading commands over and over
lol
the bot doesn't work because of this
can we see your code
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
hold on i am outside i cannot see
Just some semantics, you can do now = Date.now() instead of making a whole new date object and converting it
^
tiny bit faster 
:(
wdym
@trim saddle I NO JS
btw your problem seems to be now > expires
this is ts btw
shouldnt it be now < expires ?
@quartz kindle 
Yeah, you're adding to expires from the time they ran the command
tim fixes the problem in one line
timoverflow?
im just wondering what brain implant he has that lets him have access to all of google at the same time
Lol
https://oliy.is-just-a.dev/f2f4cq_5563.png this is normally how my cooldowns look
you guys are thinking too highly of me, that usually doesnt end well lmao

how can i make it so if you dont have permission it says no permission?
check if they have permissions
V11?
if(dont have permission) say no permission
js v11 :o
I mean discord.js v11
i
you?
@quartz kindle you've worked with eris before right?
djs is assy-ass
eris is underrated and amazing imo
Dies
is a timer reminds
like
&remind 1 sadad
and in 1 min
it will send embed with
sdadadad
is ur remind
in dms
Can anyone code my bot?
client.on('guildCreate', guild => {guild.leave})
@placid rune dm
We'll discuss payment
x)
people really say d.js is better
-needdev
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.
i've only used eris for some tests, never made a bot with it
oh
ah
well i wanted to make a string to member converter
what kind of string? just an id?
username, nickname, id
Use a constructor
use members.fetch
hm.
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;
}
}
u long pog
you want to allow or deny?
How can i have a bot post images like yui dose?
do you want to post canvas?
So do i drag drop ?
(node:4420) UnhandledPromiseRejectionWarning: Error: Shard 0's Client took too long to become ready.
Have error
How to fix?
channel = client.get_channel(id=int(result[0]))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'```
?
im getting this error
(node:4420) UnhandledPromiseRejectionWarning: Error: Shard 0's Client took too long to become ready.
@haughty igloo
Me 2
channel = client.get_channel(id=int(result[0]))
that means result[0] doesnt exist
>>> 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
that means result[0] doesnt exist
@quartz kindle wdym
not you
Help me?
How do I make it so my help commands is embed rather then well, like this:
this is an example
This is discord.py
You could use embed fields or embed description where you append to a string for each command your bot has
How do I solve the blurred problem? I made size: 1024
Ok
.setThumbnail(kisi.displayAvatarURL({size:1024,dynamic:true}))
create a discord.Embed() instance, populate it, send it with context.send(embed=embed) or anything that sends to a channel
from discord import Embed as Discord
import discord as embed```
Ok
no
no?
I was just hoping you didn't actually take my joke snippet seriously
I didn't lmao
aye splendid then 
yeah
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?
then deny it
you wrote allow instead of deny
permissionOverwrites
not
permissionsOverwrites
No
k
no
How do I make my bot's page like Sx4 and Kitrobit? 
Agree with @misty sigil
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
Someone answer my question 
https://top.gg/bot/kitrobit like this?
Yes
a
That's just some fancy CSS
I think they used script tags too tho
but non-cert devs can't do that
@lyric mountain uh so what should i use to host for free
Damn too good 

@fickle dune use your pc, just dont turn if off
@lyric mountain uh so what should i use to host for free
@fickle dune plot twist: nothing in life is free
@lyric mountain uh so what should i use to host for free
@fickle dune yourself
Lol
any """""""""""free""""""""""" hosting is either:
- not intended to be used as hosting
- not actually suitable for hosting
- not actually free
copypaste from #support
its just 8gb ram
you need more quotation marks there
"just 8 gb"
my bot runs on a vps with 2gb of ram
mine on 1 gb
Mine 512mb
along with
- my mongo cluster
- my moderation bot
- my website
i said
I barely reach 200 mb
not bot he said
8gb ram pc @sonic lodge
so you're all set
My other uses 128mb
You've got plenty
so you're all set
so you are all set
a
The app I use is:-
- Used for coding
- Offers hosting by watching ads
- You can only host bots created in that app only
- That app is bdfd

you could host on 1gb
You could host on 512mb probably
DUO
i could auger
we're saying that your computer is much better than many of our bots' private servers
duo is better than uno, so you are all set
so you can use your computer to host your bot
ffs
asdadasda
1 core 1gb
1 core 2gb 
dude, gimme two potatos, some copper wire and a nickel coin and I'll setup a free hosting in 5 minutes
@midnight blaze no i mean i cant keep it on full time
yes u can
intel core duo is overkill for most bots
like, your pc is only slow because it needs to render a lot of stuff
way overkill
@fickle dune delete your bot and create it in bdfd
most bots can run on any potato pc no problem
screen rendering is like 99% processor usage
That's the only way you can get free hosting if you don't want to host it in your pc 
host it in your smart fridge / smart toaser
xd
Lmfao
but now im on a vps
host it in your smart fridge / smart toaser
@quartz kindle sometimes, my genius, it scares me
if your pc turns off mid work then it has:
A - bad coolers
B - viruses, a lot of it
bruh i used to self host for like 30 servers
@earnest phoenix i used to selfhost for 69 servers
0.0
@earnest phoenix give this @fickle dune named man a tutorial on how to do it 
i used to self host on a potato laptop on potato internet back in brazil, bot's ping was anywhere from 2s-20s
lmao
ur is fine but idk my turns off for some reason and i dont wanna fix it as im lazy @earnest phoenix
holy how many pings
@quartz kindle life was hard back then in the past
well if you fix it you get free hosting
lmao
56kb internet
@fickle dune factory reset it there's an option to also keep files you want to keep
i got into discord in 3 months made a bot got nitro got disabled 4 times and bruhhhh
im super disabled
B)
Can I move my cloned Git repository folder without any consequences?
where to?
A parent folder, for example
ofc 
lmao
- find meaning
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.
you'd probably want to review the git changes very closely after that
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?
@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:')```

I assume you'll see a lot of [Deleted] and [Added]
discord.Role as type annotation will allow you to use mention, name, and ID
oh, those. Those... are not exactly important, are they?
so like this
I mean, they basically mean the full path for the file changed if you see a [Deleted] and [Added] back to back
async def role(ctx, user: discord.Member, role: discord.Role):
mhm
I want a bot developer for my server
What is a def
Really
def defines a function in python
Ok
-needdev
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.
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
Hey guys, for some reason I get a connection refused error when connecting to RabbitMQ
But the dashboard is up and running
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]?
Hi
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
@opaque eagle it is fake or malicous host
because there will always be at least one role, that's the default role
Khm
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
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
the @everyone role is considered the first role
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)
How can I stop Message collector manually
What library
yes
Not a library, but yes.
yay my 2nd pubic discord bot has been approved π
Can you run a for loop on a collection
yes
*, reason
then use reason
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
@commands.command()
async def say(ctx, *, mystring):
await ctx.send(mystring)```
Split the text with the seperator as , and set a limit of 2 items and just take the second item as the reason
tfw
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 ? π
python
i-
literally just said don't reinvent the wheel and even provided a code snippet to back my point
lol
@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
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?
Isn't request deprecated
@midnight blaze
oh, ofc..thanks
Is discord.js case sensitive
@surreal sage
so?
do i have to install a module orso?
npm i request-promise ?
if you want to convert it to promises, do what the image above says
its fine
especially jpeg (for me probs)
or just use a different library, one that is not deprecated preferably
how do i set custom headers from express?
Is discord.js case sensitive
halp
lol
@pure lion
wbat about custom headers?
What's Full Stack
Is javascript and/or discord.js case sensitive
yes
F
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*
Cache it on their device
localstorage doesnt work
F
how could it possibly not work?
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
i just want to store user+discrim and avatars and stuff
okay cool
res.cookie(key, value)?
Can i join you i'm developer of mee6 bot


sure Dice, but like I said the code is not meant to be saved for a long period of time
i don't lie
im not saving the code

i just want to store user+discrim and avatars and stuff
You should store that in a database on your backend
A user can change a cookie or a localstorage entry anytime
im getting it from oauth2
you aren't doing it clientside, are you?
weh
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) })
you probably need a token
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
i guess on oauth completion i could create a new doccument
i don't think that the api would allow you to openly POST without some sort of authentication
^^
read the docs on whatever api u using
theres usually authentication headers for those things
read the docs
yikes
on that api
im using request-promise
buuuuuuuut how would i handle session IDs? i can generate one with uuid but how store + access
on the endpoint you touching
@opal plank no
no shit
PLEASE
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
@surreal sage https://presence.roblox.com/docs
read the docs before hoping in, im willing to bet theres an authentication header on the request
how can i send avatar same size like upper bot
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
would it be wise to store sessionID under a user model?
I mean... it's up to you I guess, I would have a separate database just for sessionIds
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
make sure to use the state parameter as well
^
i am
i dont know what language or web framework you're using but i personally used asp.net core for this
extremely easy to work with and you easily integrate top notch security
The first argument must be of type string or an instance of Buffer. Received an instance of Object help thank you
i could hash the session IDs?
The first argument must be of type string or an instance of Buffer. Received an instance of Objecthelp thank you
url.parse?
what
yes
well uhh
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
the error can't get more clear than what it is
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
do you know what is a string and what is a buffer and what is an object?
to generate session IDs
first string/number in a array has to be a string?
uuid can hash?
a buffer looks like this:
<bytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytesbytes>
HttpOnly means that client-side scripts won't be able to access the cookies
first argument must be a string or a buffer, and you gave it an object
uuid can hash?
i have another thingy that can but i cant remember the name
the first argument of a function
HttpOnly means that client-side scripts won't be able to access the cookies
oh got it
I need help finding the cause of this:
idk what function you're using
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)
hey, where can i ask for help to my bot?
okay please dont use root user
It works for everyone else's bot
dice if u arent already, use argon2, rly fast i use it
what is argon2
you're right here, leandro
@earnest phoenix oh ok, do you know how to make warn commands in JS?
did you mean to do client.guilds.join("\n")
your question is too abstract
oh ok, do you know how to make warn commands in JS?
database and a lot of sticky tape
It works on other people's bots
argon2 is an encryption algorithm designed for passwords
you can't ask "how to make x y z" because there's a fuckton of ways to implement it
Possibly
@earnest phoenix because array is a collection of objects
ok
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
chill
I don't think session IDs should be hashed, I think using uuid is just fine
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
is guilds an array of something? idk tbh
see what type client is
guilds is undefined and that's why it is throwing the error
@earnest phoenix Go to https://presence.roblox.com/docs#!/Presence/post_v1_presence_users and enter { "userIds": [ 378221368 ] } then you will see the response body working
im exactly doing the same on my javacsript but nop
it works because it's in anapp request
lol
it's on their own website
even the docs tell you that you need authentication
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?
yup, looks good
ok cool im gonna figure out the encrypt boi
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)
why do people use mongoose schemas lmao
ikr
data validation
l0l
i don't understand why people do .catch(O_o => {})
either
can't u just leave the catch empty
because the copypaste from a tutorial
i don't understand why people do
.catch(O_o => {})
@knotty steeple.catch(throw)
yea i know what a catch does but like
the emptyest catch you can do is probably .catch(_ => {}) or .catch(() => {})
@earnest phoenix wdym auth
i'd do the first
nop
fun
why do people use mongoose schemas lmao
is nice
authorization header
i'm not going to spend time explaining rest, there's plenty of resources for that online
@surreal sage Look up auth header bearer token
(Which they typically use for auth)
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 Look up auth header bearer token
(Which they typically use for auth)
@faint prism wdym auth header
and fill in with what
It's something you include in the header for an iNtErNeT request
yes..
e
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
:^)
I dont know anything abt rest api's
stop trying to guess what's the cause of the error and instead debug and find it
@earnest phoenix This channel isn't good for your blood pressure lol
you could've done this and fixed it already
I have a question...
so if i am trying to make a bot....
How do i script him?
(I am first time doing it)
I mean... Edit the script...
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
you use a text editor
oh jesus
π
thank you danny very cool
too bad danny isn't in here
np :)
we have a walmart version of it
a walmart version?
@gilded plank
i dont want to be stupid so do i store the unhashed sessionIDs on the db?
sessionIDs?
ignore context
passport
I doubt passport has something for roblox
oh wait wtf are we talking about I have old context
we are talking about session id stuff
yes, but passport is for oauth strategies right? https://discordapp.com/channels/264445053596991498/272764566411149314/742830959908487279 I was using this as context
which is for the wrong person lmao
are cookies accessible throughout the entire domain/site/iforgottheterminoligy
yes afaik
why is there a AFK command, what is that for, what is his purpose?
idk what passport is for lmao
The first argument must be of type string or an instance of Buffer. Received an instance of Object what was this again
request-promise
first argument
for example someFunction(bla)
bla is the first argument
your bla is an object
and your someFunction does not accept objects
await request.post('https://presence.roblox.com/v1/presence/users', {
body: {
'userIds': [
378221368
]
},
headers: {
'content-type': 'application/json'
}
})``` as a post
only strings or buffers
the error doesnt give a loc of the err
would help if you showed the full error
according to an issue in the request github
the body field should be stringified
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'
}```
@earnest phoenix More like a K-Mart version
how can i tell the amount of servers my bot is in using a command? discord.py
how in discord.js get all reactions name in array from reaction collector by collected
Does await wait for a Promise to return smth then only it will move on to the rest of the code
yes
i finally made a bot yay
yay
u got one?
yeah, working on making a battleship game rn
oohh cool goodluck
well, taking a break from it, because a dumb issue i spent an hour on
well, hope you have success
good job @rare gale
oh god i cant get my head around cookies for some reason
you should eat cookies, not put your head around them
ok brb
anyway, whats the issue?
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?
@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
this is why you are qt
:(
you can see them in the http request
db encryption it is

