cause i have this on and its still not exporting the member data https://i.imgur.com/0g8jrDE.png
#development
1 messages · Page 1378 of 1
like an extension
I would think the nodejs dev team would handle that
actually exactly like an extension
how do you make extensions
ill look it up
@solemn latch could u help me with my time issue
lmk what you come up with. I currently dont think its possible
u said in a min
Cthulhu, I don't think you understand. Intents.default() does not enable presence or member data. You won't get it unless you enable it through your source code, not the toggleable buttons on the dashboard.
For example, discord.Intents(members=True) would enable member data.
msg.author.send(`\n> Byte Memory Usage: ${process.memoryUsage().heapUsed}\n> Bot Uptime:\n> Seconds: [${Math.floor(bot.uptime/1000)}]\n> Minutes: [${Math.floor(bot.uptime/1000/60)}]\n> Hours: [${Math.floor(bot.uptime/1000/60/60)}]\n> Days: [${Math.floor(bot.uptime/1000/60/60/24)}]`);```
alright so i got this
and I want the values to reset
after they reach the max
so seconds 60, minutes 60, hours 24, and days can go on
@earnest phoenix how bad? cause i have no choice but to do that until i finish rewriting my bot
@earnest phoenix use the modulo operator
const MutedRole = msg.guild.roles.catch.get(MutedRole => MutedRole.Name === "Muted"); (node:7588) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
what scale are you planning on using it on @grizzled raven
wdym? i'm just gonna have 2 clusters meaning 2 connections
@sudden geyser how would i use it
Anyone know what I am doing wrong?
no no like, at what scale, how many guilds / queries a second (or a minute)
Like, bot.uptime / 1000 / 60 % 60 would make it wrap around so it never goes above 60
If I have 53 and do 53 % 5, it wraps back to 3.
yeah i'm screwed
not just clamp
and that's what the modulo operator will do? I don't understand
sqlite starts choking at around 150 guilds normally using the bot on exponential growth
i think i'll just keep my bot offline for a few weeks
@sudden geyser ok ill look into it
might just give up i don't even know tbh
i realized a long time ago that public bot development is not worth it lol
maybe only for the experience
i'm happy with what im making, although it's one of my first ever coding projects, hence why it's a mess
const MutedRole = msg.guild.roles.catch.get(MutedRole => MutedRole.Name === "Muted");(node:7588) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
@livid lichen there's no property called.catchonRoleManager: https://discord.js.org/#/docs/main/stable/class/RoleManager
To go along with that, .get (which will likely be used on a Collection) does not take a function. You're most likely looking for .find
To add even more fuel to the flames, .Name is not a property on a Role
granted, if you're out of education and are looking for a job, a big bot can be your entry to one
Mistakes? You mean happy little accidents :bob_ross_emoji_doesnt_exist_here:
i know a guy who mentioned statistics of his large bot on his CV and that got him the job 
Abi guys solve the problem of the botuptime the right to slow orders
@livid lichen there's no property called
.catchonRoleManager: https://discord.js.org/#/docs/main/stable/class/RoleManagerTo go along with that,
.get(which will likely be used on aCollection) does not take a function. You're most likely looking for.findTo add even more fuel to the flames,
.Nameis not a property on aRole
@sudden geyser I used.findbut it caused an error once again. Would you like me to say the error?
did you fix the first one
Yeah, thanks.
How would I get text from a text box and show it in live time in like a body tag html
then swapping .get for .find should also work
Hı
TypeError: msg.guild.roles.find is not a function @sudden geyser.
You didn't fix the first issue. You just removed it.
.catch is not a property, and a manager does not hold the collection of data. On the docs, the .cache property has the actual data (a collection of roles).
@sudden geyser So I should include .catch in the roles part?
msg.author.send(`**${'\\*'.repeat(75)}**\n> Byte Memory Usage: ${process.memoryUsage().heapUsed}\n> Bot Uptime:\n> Seconds: [${Math.floor(bot.uptime/1000) % Math.floor(bot.uptime/1000)}]\n> Minutes: [${Math.floor(bot.uptime/1000/60) % Math.floor(bot.uptime/1000/60)}]\n> Hours: [${Math.floor(bot.uptime/1000/60/60)}]\n> Days: [${Math.floor(bot.uptime/1000/60/60/24)}]**${'\\*'.repeat(75)}**`);
No, I said you should change it.
No, I said you should change it.
@sudden geyser What should I change it to though?
@sudden geyser ur method didnt work
@livid lichen like I said,
.catchis not a property, and a manager does not hold the collection of data. On the docs, the.cacheproperty has the actual data (a collection of roles).
So, you should change it to .cache
@earnest phoenix because you didn't use it correctly. bot.uptime / 1000 % 60 would (hopefully) work in this situation.
Oh my. How stupid can I get for thinking .catch and .cache is the same thing. I thank you, but I am left with one final question; Should I put .cache before or after .roles?
.roles is an instance of RoleManager, and .cache only exists on managers. So, no, you'd put .cache after .roles
It's easier to understand the order and how to access your properties and call your methods when you learn the principals of object-oriented programming.
Understood. I highly appreciate your help @sudden geyser.
God wondering does anyone know how to fix arbitrary file overwrite for fstream and unzip packages, they're both fully up to date
I am making a music vid. if u wanna porticipate pls DM me (u need roblox) more info later
not really development related but okay
why is user.send returning "The user aborted a request" error for me?
multiple reasons
bad internet
being the most likley of them
or the script halting
for whatever reason
it happens locally and on a vps with 10 gig up down
iirc its when something takes more than 15 seconds to finish
dont quote me on that though, i forgot the actual numbers
God wondering does anyone know how to fix arbitrary file overwrite for fstream and unzip packages, they're both fully up to date
HTTPError [AbortError]: The user aborted a request.
at RequestHandler.execute (/home/PreMiD/Discord-Bot/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
code: 500,
method: 'post',
path: '/channels/745960754875727883/messages'
}
...
5xx errors aren't your fault and you can't do anything about them, they're server side errors
Well.... discord can't just stop our bot from being able to send dms
they can lol
more into that here if you want https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes
Discord Developer Portal
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
ok yes they can, but why LOL
ok i feel like it's discord having a stroke because did yall see the delay on that embed
sweats in mass dm
when is discord not having a stroke
nice one
@quartz kindle i have the answer for that
Yes, PreMiD bot mass dms!111!!!!11!
having a stroke and dead from a stroke
Full downage
Having Stroke
im fairly certain downage is a thing, even though it should be outage
maybe its the code because it doesnt work on our test bot too haha
What does a 502 Bad Gateway error usually come from in code
you misconfigured your http server
TypeError: Cannot read property 'roles' of undefinedif (UserToMute.Member.roles.has(MutedRole.id)){
Didn't work.
is your UserToMute a user object
const UserToMute = msg.guild.member(msg.mentions.users.first()) || msg.guild.members.cache.get(Arguments[0]);
My oh my. I have -10 brain cells :/
it happens to the best of us
Lol
@earnest phoenix Different error. TypeError: UserToMute.roles.has is not a function.
i'm guessing you're using djs v12
yup
Frick
welp
Bot.muted[UserToMute.id] = {
guild: msg.guild.id,
time: Date.now() + parseInt(Arguments[1]) * 100
};
TypeError: Cannot set property '687735736384225288' of undefined
Bot.muted is undefined
Oh.
what happens if you hit the endpoint manually
Ummm
Let's see
const app = express().use(bodyParser.json()); // creates http server
app.listen(8080, () => console.log('Listening'));
const fs = require('fs');
let jsonData = require('./list.json');
console.log(jsonData.id1); //{warnings: 1}
let id2 = {
"warnings":1
};
let data = JSON.stringify(id2);
fs.writeFileSync('list.json', data);
console.log(jsonData.id1); //{warnings: 1}
console.log(jsonData.id2); //undefined```
im trying to learn how to do data stores
but id2 is "undefined" when called
why is that?
jsonData is a variable containing list.json
then you overwrite list.json with data
this doesnt affect the jsonData variable
plz
then what do i use
i mean
anything but json
let him experiment
sqlite, nedb, kev
it is prone to corruption
It corrupts
Why shouldn’t I use a JSON file as a database?
A JSON file is not suitable for use as a database for several reasons.
Firstly, you will incur a major performance hit as you need to read from and write to the file on each query and modification. This brings a major performance impact especially when the amount of data increases.
Second, you cannot concurrently write to a JSON file - only one write can be performed at a time. This is part of what causes the performance impact, but perhaps more importantly may introduce unexpected results and even file corruption.
JSON files are also human readable and easily accessible by end users. This means that your database and application will be vulnerable to attacks, especially as database reads are rarely checked for malicious code (Which usually happens on write).
What should I use instead?
An actual database, to put it bluntly. SQL, NoSQL, whatever takes your fancy. Some SQL databases are SQLite, PostgreSQL and MariaDB, while NoSQL databases include things like MongoDB, RethinkDB, ArangoDB and many more. If you want the easy way out, check out Enmap.
What can I use a JSON file for?
JSON files are best used to store static data, in other words data that doesn’t need to change often or programmatically. In practice, this means configuration and other application data that needs to be defined by a human - which is what JSON excels at.
jsondb jsonisnotdb jsonisnotadb dbjson nojson
@quartz kindle Please sir, why is my database corrupted, I use txt files
it doesnt corrupt out of nowhere, it just doesnt have all the protections that regular databases have
yea
so it requires a lot of extra care to do it right
const app = express().use(bodyParser.json());
app.listen(8080, () => console.log('Listening'));
Anyone know?
hmmm
is port 8080 open
Is it on the same machine
No
and not in some weird-ass docker setup?
using ngrok
Basically creates a domain and then sends whatever it gets to the localhost port you give it
no I'm asking if ngrok is running on the same machine as the express server.
And neither of them are in any sort of VM or docker or anything?
does it log listening in the console?
Yes
var con = mysql.createConnection({
host: "localhost",
user: "yourusername",
password: "yourpassword",
database: "mydb"
});```
i dont understand how you use these parameters
like
is it just whatever i want
or does it want my ip
or something
const mysql = require("mysql");
const pool = mysql.createPool({
host: 'localhost',
user: 'root',
password: 'yourpassword',
database: 'yourdatabase',
charset: 'utf8mb4'
})
module.exports = pool
Make a external file
and make a pool instead
mysql is a fully featured database server, you need to install and run mysql separately. that code is only for connecting to a mysql server
@earnest phoenix
Then just call that file with a constant and go from there
@umbral zealot Whatcha thinking?
so then how do i make a mysql server
Does ngrok.exe have to run in the same file directory as the bot?
my question is
where is this log here
Because that particular log indicates the express server is started.
I changed it from listening to that.
hmm
Ok let's try something, can you try running wget http://localhost:8080/ on your vps?
me?
then it's not running on that machine.
and how do i edit that pool
sqllite is easy to learn
@earnest phoenix if you want the dead-simple solution, https://enmap.evie.dev/ is what you want
something that u do in js itself
Enmap is bae, it's what you want.
is it reliable
Alright we gon try this evie
Disclaimer: I wrote it, I'm biased, but 1.3 million downloads don't lie.
Moving ngrok to my bot directory
No I don't think this is a directory problem
Only thing it can be
I think the server is either not running on that port or it's shutting down right away
ngrok is in my bin of the VPS and the bot is in the root
Is there a listener for when it shuts down
yeah but this isn't to do with ngrok
you literally just did a localhost ping and it fails
Nothing is running on that machine on port 8080
I'm not sure, I've never had an express server needing to dhut down
Something to do with the vps because when I do it locally on my pc it works fine
@earnest phoenix yo read https://enmap.evie.dev/install#pre-requisites Very carefully
you missed the entire first part of this.
npm i -g --add-python-to-path --vs2015 --production windows-build-tools
im not using python
im using js
you are
im using js
just... follow the damn instructions
python is necessary to build the better-sqlite3 binaries.
but what do i put there?
im not using python
Literally. READ. THE. INSTRUCTIONS
You do not understand how making these works
why is it so goddamn hard.
Not every js lib is made in JS
They are made in python, ts, js, c# and a lot of others
bruh this is hard to understand ill just learn sql
python is necessary to build the better-sqlite3 binaries.
This one uses python
atleast sql can be downloaded in 1 line and i dont need to install 10000 things
mysql will require you to install and configure a mysql server.
ok then ill do sql lite
SQLite will require you to build the binaries. With python and the C++ build tools
databases are work
then ill just use json
if json is unreliable then why is it literally built into discord.js
Then you'll lose data, like a moron. Fine, have fun with it, I'm not going to help you load the shotgun you're going to shoot yourself in the foot with.
It's not.
a decent json storage is more complex than any proper database.
@umbral zealot HOW DO I RESTORE MY JSON DATABASE IT CORRUPTED!!!
discord.js does not save data in json files
Oh my god
first, that's not discord.js, that's nodejs doing it
You do know that package json files are not discord js?
package files are not dynamic storage.
even better

second, it's not a database, it's literally a package configuration file
Dude please learn exactly what you are talking about before you attempt to argue with the ones who know what they are doing
they dont handle thousands of changes an hour
Alright dude, you're clearly stubborn and arrogant and know better, I bow down to your Dunning Krueger god, Have Fun.
Not like I've been working with javascript for 20 years.
static json files are not the same as dynamically editing them
ur not 30+
Wanna know what is in it?
Info about discord.js and its dependencies
and nor are you
I'm almost 40 years old, I've been doing javascript longer than you've been alive, and I'm telling you do not use json as a database
Don't be a little pest and listen when the adults tell you to do something.
ok so if someone said "i jumped in a volcano and lived" i cant argue with that
because i havent done it myself
got it
It takes all of 5 minutes to run the commands required to use sqlite.
You are literally given the exact step by step instructions to make it work
It's not hard, at this point you don't even need to think about it you just need to follow instructions.
ok ill run that
you literaly just follow, to the letter
Your working on installing a database while we are the ones making the databases and creating the stuff that makes the stuff you use work.
We are the ones who keep guides up to date and make sure there are no errors in them
No need to try and argue with us
bruh u didnt make enmap
I did.
no u didnt
yes you did
We are the ones who keep guides up to date and make sure there are no errors in them
@blissful coral
I am literally, the author of enmap
Never said I made enmap
you said we
I am making another database rn
which explicitly implies it
What they said is that we are the ones with the knowledge, you're not, and you should really learn to listen to people that are more knowledgeable.
Jesus why do people argue with us when we know what we are talking about evie
I don't get it sometimes
especially when they're actually asking for help and we're working hard to help them
it's infuriating.
I rarely lose my cool these days, but Tylers... man, they're the exception.
Man I ain't sus, aight? 😂
Also, evie I figured out the problem for some reason when I put it into the bin it was not actually turning into a command so it was making me do it through a file in the root that wasn't the bot file which was making it not run on the bot for some reason and was not recognizing it
I do not know why it did that at all I am gonna reach out to ngrok and galaxygate about it
ok ill try to download the thing
Prob should go with a dockerfile tbh
"put it in the bin"... 
its kinda nice knowing the people who make libs.
recycle bin
am i the only one who doesnt use docker even though i know how to use it?
why do you need ngrok tho? trying to hide your ip?
I never understand why it doesn't work and I never understand why it starts working
i dont know how to docker
@quartz kindle until I get a domain
I am currently testing so haven't set any of that up yet
ye but you can just use your ip
just use localhost
hiding ip 101
xD
@sly wing report to a mod, not here
i think they got kicked
nope, they simply left
@umbral zealot i can only find c++ for visual studio 2017
Alright now that I switch to my IP IT WORKS
not vsc
oh they back
Holy
whos back
Guys...
Whos gonna tell him...
wasnt talking about you
i thought u said u gave up
go bother another js beginner trying to learn how to do a database
you're bugging me
dude can you just chill the f out?
You should know though that installing a lib isnt installing something to vsc tho
from everything ive seen in chat you've been nothing but toxic this whole time
you don't need to find anything you just need to run the commands as indicated
Visual Studio C++ Build Tools
^
his installation literally says visual studio
im gay
c++
@sly wing Nice
@earnest phoenix you just need build tools
Yes, it needs the build tools and python which are installed globally with the commands indicated.
from everything ive seen in chat you've been nothing but toxic this whole time
@opal plank im being toxic because i started out just asking how to make a data base then they started being an asshole by being ignorant to the fact im new to js and i probably dont know how to do a database
literally
Doesn't mean you get toxic.
it gave me errors
ok so what errors is it giving you
what errors
Then show the error stack
if something gives you errors, it doesnt mean you should give up, it means you should solve the errors lol
replying toxicity with toxicity doesnt lead anywhere, be the better person and be courteous pls @earnest phoenix
@earnest phoenix
Like the site says
powershell vs admin shell
The difference is obvious, one doesn't work the other does
or powershell
Yes. Command Prompt or PowerShell
they're both terminals
Please read what it says fully and trust me, it will work.
those are 2 different things and they do the same in the end for this purpose
Kind of how they work
doesnt matter which one you use, as long as its in administrator mode
^^
If it doesn't have admin it is useless in this case
though im a powershell supremacist too

At this point I even use the Terminal app
i just use shift+rightclick open cmd here
putty
terminus
or openssh
ive been duing lua for 2 years and it is nothing like js so alot of these concepts i am 100% new too
Been lookin for a better option
ever tried luvit? @earnest phoenix
i did
I just connect to my VPS directly from vscode lol
node.js is very similar to luvit
I should try that ngl
i would rather learn from js
Never tried it
@umbral zealot this
@opal plank this when saving/uploading files
@umbral zealot does this mean it finished or its still downloading
read the end of it...
bruh using remote vsc ssh is a bliss
just wait until it ends and goes back to the normal prompt
it may take a few minutes
usually u get a stack end message when the download is done @blissful coral
Yeah you right
never again will i have to edit local configs with fucking Nano again in that crap @quartz kindle
who uses nano
i have wet dreams just thinking about not having to use nano anymore
LMAO
does notepad corrupt
??
txt files
.txt??
yes

apparently json does
notepad is an editor
only if you use it wrong
Are you attempting to use .txt as a database
json is the actual file
maybe
how do I connect to ubuntu vps
yeah not really a good idea
No, the point of JSON's corruption is when you do a lot of reading and writing, it's got nothing to do with editing it once
@hushed axle A SSH client
i'd highly recommend using an ACTUAL database
please
Can you show me how 
not a txt or json file
this download is slowing down my houses wifi everyone is mad at me lol
my bot used to have a json database until like 1500 servers
It's also not limited to JSON files - it can happen with any file that you try to read and write a lot to.
unless you doing it for experience, dont fuck with that crap
It my first time using the ubuntu
Just install PuTTy @hushed axle
it aint that simple
putty is just the client
you need to register ssh keys in the host too
which requires a fair bit of linux knownledge
How
trust me, ask your provider
trust me, im an engineer
teaching someone how to setup ssh keys is NOT an easy task
trust me, I am smart
yeah not really a good idea
@blissful coral SSH

specially with 0 knowledge beforehand
I buy in Vultr
Whoops wrong quote
lulw
many vps providers have options to setup SSH keys in their control panels
you need to generate a token and then add it locally
my wifi download is 10 mbps would a rasberry pi 3 hog the internet?
depends on what it does
my wifi is 10 mbps would a rasberry pi 3 hog the internet?
@earnest phoenix depends on what you're doing with it
Depends on the bot
im simply downloading copious amounts of ...
anyone know why when i try to publish a npm package it returns
npm ERR! code E403
npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/loomdatasimulator - Forbidden
no one laughed at my joke, feels bad
it was chillin when discord had a message problem
I don't get it
@tired nimbus is your package perhaps in a namespace like @thing/packagename ?
i had to hover over it and check the file name @opal plank lmfao
what is that pic auger?
hen tie
^^
Oooh
yes I already navigated to the directory
no its not
lol
that tbh
and you've run npm login to get your proper npm username and password setup?
yes
Anyone want to play among us
you have to wait until it says ALL DONE
I've seen it take over 25 minutes
i need more redists
so yeah be patient
oh it could be because I used my alt email
missing 2011
@earnest phoenix take that time to read the rest of the enmap docs, it'll be helpful real soon 🙂
is there even a 2011 redist?
no idea
yes now it has installed thank you
@umbral zealot ever tried replacing discord.js collections with enmaps? xD
That would be possible only if I added back a couple features that I've removed
like sort() and first()
Actualy it wouldn't, tim, if I just added those features back lol
@umbral zealot so did u write the bot in c++ or python
no i mean
Not bot
@earnest phoenix no, I didn't write in either of those. I'm using better-sqlite which was
how do I put my password in the putty it doesn't let me write on it
enmap doesn't use the build tools, it just uses something that does.
lul
:teridynono: how do I put my password in the putty it doesn't let me write on it
@hushed axle lmao
sorry it my first time using this 😦
djs collections hold classes with specific prototypes, one would need to detect the class that it holds, and parse it correctly so it only saves the actual data to disk, and rebuilds the class when getting the data from the disk
wait what are you being serious
:teridynono: how do I put my password in the putty it doesn't let me write on it
@hushed axle you only put password on the putty agent
who :/ ? me?
yes
yes 😦
dont put password on putty
SSH clients dont show the password when you type it, but it does work
just add the key on puttyagent
@quartz kindle what about just overwriting the import since d.js collections are now a separate library?
what tim said
ezpz
@umbral zealot i mean, replacing djs's internal caches
so when you do client.guilds.cache.get(id) it gets from disk, nor from memory
yeah I know, but d.js internal caches are @discordjs/collection so replacing them would be fairly easy
yes, but they hold classes
so does enmap
you need to parse them and rebuild them
Enmap has a serializer/deserializer feature
I've saved "discord.js classes" like that, by simply serializing it as an ID
somebbody can help me
const embed = new Discord.MessageEmbed()
.setTitle(`Hi`)
message.channel.send(embed)```
that only??
I’m making a warnings system, a data base wold be appropriate right?
so when I open the putty I but the IP addres right?
Doesn't need to, since all you need is to serialize as data => data.id and deserialize as data => client.<thing>.cache.get(data)
how i make a embed
@agile shuttle how??
not sure we're not the same page here lmao
or at least im not following
yes
@agile shuttle here: https://anidiots.guide/first-bot/using-embeds-in-messages
bro yall need to understand not everyone will learn and understand something the same way you do
Just sayin
@earnest phoenix https://enmap.evie.dev/complete-examples/moderation-action-logs here.
We give you what to learn and what we know
If you need more info look it up on MDN
@quartz kindle what I mean by this is that this is my config for my client settings, in which I can store roles and users and all that jazz: https://text.evie.codes/hucuvuvemu.js
We don't speak beginner
@blissful coral that’s the problem. You think someone who’s just learning embeds is going to understand you’re way of talking?
It's perfectly viable to replace a discord.js collection
I mean it was pretty simple
I give him the const to use
which is embed
as a example
I then show him to start a constructor with new
@earnest phoenix dude you've already shown you're a hard, toxic client to please, don't start trying to whine about how we help others, it's not useful to your cause.
and then tell him to use the Discord lib and call the MessageEmbed constructor
Please do not tell us how to help other people
We aren't new to helping we know the best ways to help others
And it isn't by feeding them every single damn thing
We have no manager, Karen, so we don't have to please you or anyone. We do our best to help. So just shush and let us do what we can.
goddamn tylers.
I don’t normally get this “toxic” as u call it. It’s just that you need to learn I’m new, and you shouldn’t be mocking my ideas because of it, it makes me annoyed
You and ten thousand other "new" developers
You're not the first tyler we've had to deal with, you won't be the last.
You and the other 100s that are into coding due to covid or other reasons
Not true
or other reasons
lol Covid has nothign to do with it, plenty of teens wanting to just learn JS or just shoveling code because they "just want a bot"
Way before COVID
and no
It’s because I would like to learn JavaScript
So I figured why not learn it an interactive way
one thing i think you have to understand is its really frustrating to try and teach concepts when people dont know the words for the concepts needed to know these other concepts.
And you are learning it for other reasons then
By making a bot
all code is interactive.
@earnest phoenix point is buddy, you're coming through as very arrogant and entitled. You might have to re-adjust your behaviour when trying to receive help from others
You learn by doing
Also I suggest taking the time to learn all the basic concepts of js because we are using those along with our js knowledge to help you
You’re the one mocking my methods because I don’t know any better, if anyone you’re acting entitled
😦 can anyone help me how to connect to putty I am so confuse what to do
I didn't mock your methods, I told you using JSON was wrong
You might feel like he's being mocking but he's tryign to help you and you're not making it easy
we're all humans and falliable, and when you piss people off, they are probably going to get pissed, y'know, as humans do.
which is mocking, you’re laughing at an idea I had
Which we're allowed to.
Yes, but don’t be like “lol why u so toxic” when you’ve been doing this the entire time
@hushed axle it would probably be best to ask your VPS provider for instructions on how to connect to their service.
They give me a link
I read it and I still can not connect
@earnest phoenix the reason we called you toxic is that you went full dunning-kruger and went "But this uses JSON so it must be good!
" when we were trying to explain something, and it made us annoyed and a little bit angry. Again, we are human beings, not machines, and we're not paid to do this, so you don't get to tell us how to act or how to deal with you.
that was sarcasm, I was trying to be annoying to show how y’all have been acting
Why would you try to be annoying
That doesn't really motivate us to help you at all
Except we hadn't been acting like you had. We were giving you information that you needed to hear.
You're in the wrong, deal with it.
Yeah I think i learned that after you sent like 30 paragraphs about how json databases are for idiots
Adjust your behaviour and learn from it rather than try to police our actions and thoughts.
It was information
it never once used the word "idiots"
implied
no, you implied that all on your own.
That's your own personal issue, not ours.
Maybe u didn’t but I know Vibin did
i mean, tim has used json databases 🤷♂️
No I actually didn't
He didn't.
is this argument even worth it 🤔
Honestly
Bruh you just deleted it didn’t you
Just stop
honestly getting to the point you should take it to dms or drop it
Alright fine let's ask a mod to check server logs then
This isn't even development anymore
Just stop
@umbral zealot
What
What?
lol
Then you'll lose data, like a moron. Fine, have fun with it, I'm not going to help you load the shotgun you're going to shoot yourself in the foot with.
@umbral zealot
there we go
Like I said, I got angry when you started acting like a pre-teen entitled blob of toxic goo, so yeah, I said that


what's the issue
Want some popcorn, Veld?
2v1 scrub fight or something
Nothing just trying to explain to this guy that we're trying to help him and he's not being a good customer
Conversation was pretty done until he started telling us how to help someone else I guess
their definition of helping is mocking every bad practice
Ad misericordium or some shit
oh look at the fancy big words.
thesaurus war GO
We started off trying to help you but clearly, you don't like that. Alright.
yeah and you got all offensive because I didn’t understand sql
It's alright let 's just block and move on
Because you couldn't download a package
lol
After we told you exactly what to do
problem solved. he doesn't want our type of help
Exactly
@umbral zealot yeah thats not what i meant
Conversation over
I asked for help with downloading it and u were like “lol ur so dumb stupid!!!11”
Conversation over
@blissful coral
@quartz kindle then I'm curious because I'm pretty sure replacing djs with enmap along with a very simple serializer/deserializer would be just fine
A argument is still a conversation. conversation is 2 people conversing on a topic
Which we were doing
Have a good day/night
and I’m the toxic one apparently
I might actually just prove it to be sure of what I'm saying 😂
and I’m the toxic one apparently
@earnest phoenix indeed
what i mean is, completely replacing djs caches with a database. the advantage of better-sqlite3 being synchronous, one can completely replace djs's in-memory caches with a fully disk cache, meaning all your 200k cached members are stored in a better-sqlite3 instead of a colleciton in memory, and then designing a seamless interface to interact with it, likely using js proxies for example, that intercept djs managers and make them get the data from disk and rebuild it on the fly
yeah I know, that's why enmap would do fine because it's a wrapper on sqlite but it's like 90% identical to discord.js collections
didn’t need to end on that smart ass response
Or rather it has 90% of the discord.js collection methods, and they're easily re-added.
Outof curiosity what would be the benefit of doing something like that?
no need to request users/members/stuff
Well, with the new Intents update, not everyone gets to fetch every member
so they mentioned keeping a local cache
Of course there's cache invalidation but you can definitely just fetch with certain conditions or something
¯_(ツ)_/¯
@umbral zealot does ur thing need 2015 c++ build tools?
wait
he blocked me i think
can someone else ask
I would bet the npm page says
windows-build-tools contains everything you need to install it
I have a question.
Can my bot be verified without getting 75 servers??
its part of the package, you dont need it tho
@spark oracle no.
Using windows 7
his thing downloaded
with no errors
so i would guess i already have it installed ?
Now keep following the instructions on the page
which is CLOSE THAT WINDOW
and any open prompt you may have
how to i have a local cache
and open a NORMAL command prompt in your project folder
do
yes, the next command, the npm i enmap command - like the page says
yeah ik, i just didnt know if i installed it on my user or on the bot's cd itself
that took like 10 seconds what
Enmap is smol
Something take's 10 seconds when it is small
something takes 30 minutes when it is big
ok so if im understanding this correctly
if i want to add something into the database, such as a user id and a warnings integer, i would do warningsEnmap.set(User.Id,2) // this user has 2 warnings
Is that from the guide
You'd understand this correctly if you took the time to read the docs I painstakingly wrote over the course of the last 3 years
kthx
him: no

what should I put for this :< I write my password right and then they appear this
it doesn't appear anything :<
It does, that's.. your terminal.
it's just like the command prompt, but it's on another machine completely
It doesn't appear a giant screen saying poof I am here!
😦 wait what I confuse
you know what the command prompt is, right?
like the thing you go into to run your bot
yes :<
So this is the same thing
but... on your VPS
I mean, not exactly, but it's the same concept
This is where you'll do pretty much everything related to your hosting.
it's your lifeline to the service you're getting
wait what 
We've gotten you through your first question, "how do I connect" . you're connected now.
in my own computer?
The SSH that you are using is connecting you remotely to your server.
That SSH is a command prompt
So you are then running commands on that machine from your machine
it not like window server right 😦
I download the filezilla it say connect to server lost
is there a rate limit on how fast a bot can delete channels?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
is there a rate limit on how fast a bot can delete channels?
@vocal sluice rate limits are dynamic, so no matter what number I give you, there's no guarantee it'll change sooner or later. I recommend you set it to something reasonable in your use case.
would a reasonable number say like 1 or 2 channels a second?
One message removed from a suspended account.
One message removed from a suspended account.
How do I do a perm check in an if statement in Python?
A permission check for what though? A user? A role? A user's permission in a channel?
See Member.guild_permissions: https://discordpy.readthedocs.io/en/latest/api.html#discord.Member.guild_permissions
See
Member.guild_permissions: https://discordpy.readthedocs.io/en/latest/api.html#discord.Member.guild_permissions
@sudden geyser So, that would beif Member.guild_permissions == True:?
No.
Member should be an instance of the Member class. If you have a context object, you could do ctx.author to get the member (it's a User or Member instance so make sure you check with isinstance(...)).
guild_permissions is a class. I sent you the link because the documentation explains how to use the class. There are properties on the class to check for if some property equals another.
I still don’t get how that would be an if statement
In its raw form, it's not. You use the class data (in this case, checking permissions) and can use it like one.
For example: py if isinstance(ctx.author, discord.Member) and ctx.author.guild_permissions.kick_members: pass
Ah, ok
How can you obfusicate? discord.js
it's not specifically discord.js
will any js obfusicator work?
ye
ok
is there a way to defusicate
that would defeat the whole point of obfusication
yeah idk
how do developers typically find out what their code is when its obfusicated?
backup file?
anyone here use discord.py
bc i need help with a reaction role command i made
basically it works well and all
but when the bot restarts it doesnt work anymore and doesnt give u the role when u react
heres my code:
@client.event
async def on_raw_reaction_add(payload):
for role, msg, emoji in client.reaction_roles:
if msg.id == payload.message_id and emoji == payload.emoji.name:
await payload.member.add_roles(role)
@client.command()
async def set_reaction(ctx, role: discord.Role=None, msg: discord.Message=None, emoji=None):
if role != None and msg != None and emoji != None:
await msg.add_reaction(emoji)
client.reaction_roles.append((role, msg, emoji))
else:
await ctx.send("Invalid arguements.")```
Because your reaction roles get lost as a result of solely relying on cache
One message removed from a suspended account.
One message removed from a suspended account.
There's no persistent data storage that you are performing, which would be using a database
One message removed from a suspended account.
is that necessary for discord bot code
can bot source be accessed from a client without being distributed by someone else?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Your code doesn't get exposed from mere connections to the Discord API and/or operating
One message removed from a suspended account.
One message removed from a suspended account.
for instance a bot message that only appears for 1 client
One message removed from a suspended account.
like
One message removed from a suspended account.