#development
1 messages · Page 1138 of 1
Bro
client.on("message", msg => { db.fetch(`kufur_${msg.channel.id}`).then(i => { if (i == 'acik') { const kufur = ["oç", "amk", "ananı sikiyim", "ananıskm", "piç", "amk", "amsk", "sikim", "sikiyim", "orospu çocuğu", "piç kurusu", "kahpe", "orospu", "mal", "sik", "yarrak", "am", "amcık", "amık", "yarram", "sikimi ye", "mk", "mq", "aq", "ak", "amq",]; if (kufur.some(word => msg.content.includes(word))) { try { if (!msg.member.hasPermission("BAN_MEMBERS")) { msg.delete(); return msg.reply('Küfür etme lan').then(msg => msg.delete(3000)); } } catch(err) { console.log(err); } } } else if (i == 'kapali') { } if (!i) return; }) });
Where is have
Bug
Wdym
Kufur is the name
Yes
But there is no key to store
What do I need?
Stuff
küfür = swearing
client.on("message", msg => {
db.fetch(`kufur_${msg.channel.id}`).then(i => {
if (i == 'acik') {
const kufur = ["oç", "amk", "ananı sikiyim", "ananıskm", "piç", "amk", "amsk", "sikim", "sikiyim", "orospu çocuğu", "piç kurusu", "kahpe", "orospu", "mal", "sik", "yarrak", "am", "amcık", "amık", "yarram", "sikimi ye", "mk", "mq", "aq", "ak", "amq", ];
if (kufur.some(word => msg.content.includes(word))) {
try {
if (!msg.member.hasPermission("BAN_MEMBERS")) {
msg.delete();
return msg.reply('Küfür etme lan').then(msg => msg.delete(3000));
}
} catch (err) {
console.log(err);
}
}
} else if (i == 'kapali') {}
if (!i) return;
})
});``` heres the actual, non obfuscated code
db.fetch("name.key");
That's how you use it
The key is where you store stuff
The database is where the key stays
Example:
db.set("name",2); //wont work no key
db.set("name.key",452588); //will work
I still do not understand how to fix it
Bruh
A key is where you store a value and a database is where you store the keys
I think you use quick.db
` ` Should I use them instead of ""?
Bruh
Not the problem
The problem is there is no key
A database name and a key is separated by a . in quick.db
db.get("name.key"); //returns the key value
So if there is no key then it will throw the TypeError No key specified
If you still need help then enter plexidev in the join server button
No
Pls write code
Can you write down what I should do?
Wtf
But i won't just give you the stuff and you cooy paste
wont just give you the stuff and you copy oaste
wont
rule 7 
Do i need to explain English now
Man
bruh
I linked a discordjs server
just click the plus icon, select join sercer and type pkexidev
does anyone know how to make discord bots ???
music bot or normal bot
dm me
for info and payment
-needdev @earnest phoenix
@earnest phoenix
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.
srry
just needed in urgent
then
Don't ask here
@earnest phoenix ik a guy who can
dm me
kk
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)```
pls help me with this error
can you show earlier logs?
var user = bot.users.cache.fetch("247741991310327810");
if (user.isQt == false) {
console.log("HOW THE FUCK IS SHIVACO NOT A QT THAT IS HIS ID GETTING FETCHED");
} else {
console.log("toldya shivaco is a qt");
}
if not, none of us can't help, try looking in the shard.js file for errors
cache.get();
@pale vessel so what if i dont want tot put it in the heroku , can i still fix it
var StaffEmbed =
.setTitle('Staff')
.addField('Developer', admin);
at the point of ".setTitle" says "Expression Expected"
please read docs
Where's message embed
Wheres the embed?
please read docs
@pale vessel i?
You never selected the contructor
You need new Discord.MessageEmbed().stuffHere
Usemy link
Eyo. I forgot what link brackets look like. Anyone got an example ?
hyperlink?
alright ty
https://discordjs.guide/popular-topics/embeds
@earnest phoenix I did as it says but when I type the commands from discord the bot doesn't say anything, there are no errors in the console either
so weird shit
for each works fine on linux
but not windows
and confusion level for me is 1000
I could see a dependency not working across OSes, but in general the language should behave the same
yeah, i uninstalled some dependencies due to them asking for weird things like python but they werent actually required to run the bot
so im super confused haha
install the module
theres already a module
Sounds like your module is missing, bud
and don't say English
what language
Also, Did you try googling the issue first?
i did
but nothing
tell me. what language is your bot in
feelsbadman
Who can send me a tutorial in french for use visual studio code pls Thanks

how to check if a piece of code is completed succesfully?
e
ex: ```
client.user.send('b')
there is no tutorial alone for visual studio, you mean, you need a tutorial in a programming language, with visual studio as their ide
case 'help':
const HelpEmbed = new MessageEmbed()
.setTitle('Commands')
.addField('mc!help', '- Show this list.')
.addField('mc!server %ip%', '- Show information about that server.')
.addField('mc!changelog', ' - Show the update/fix of version.')
channel.send(HelpEmbed)
break
the bot does not send any of this and does not give errors in the console
where am i wrong?
.send is a promise.
.then() will only run if it resolved correctly
ok thanks
@grave smelt channel.send is wrong
message.channel.send(HelpEmbed) ?
that would make more sense
I search how I install visual studio and how use this
nothing changes
by learning a programming language
@grave smelt is your command under a message event listener?
you have to give more information
@grave smelt is your command under a message event listener?
@midnight blaze yes
then it should work, then you have somewhere else a problem
message.channel.send() is good for now
what about the case, how do you make sure that "help" is the right case. how do you detect it? With a collector?
or with args?
args
console.log your args, maybe it is not "help", maybe you include something else
otherwise it should work now
how can i do?
yes
console.log is so basic, I cant even
How can i host multiple sites in one VPS? i have one site hosted right now (on port 80) and in GoDaddy i have A record pointing to the ip address of the vps, so how i can host another one if i cant set multiple sites on one port?
Nginx or apache let's you create virtual hosts
It will choose which site to go to depending on the url used.
You have any video to guide me? from youtube or idk
Depends on what you specifically are doing.
Nginx and apache have diffrent feature sets.
I have 2.bots who have dashboard
right now im hosting one bot and its work
i want to host another one with dashboard
but i cant point the other one to port 80 since he is in use
Then, probably nginx would be easiest
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks
can someone help me
You haven't defined Discord
Nginx and apache really don't like windows.
I mean, they run, but they really are not fans of it iirc
umm
Maybe this guide tho.
https://vexxhost.com/resources/tutorials/nginx-windows-how-to-install/
ok thanks
how to define Discord
learn js
Looks like a typo to me
Discord and discord are not the same
Capitalization matters
it is a typo 😉
Discord Bot Maker is a powerful bot development tool for the #1 text and voice chat service for gamers: Discord. With this tool, you and your teammates can take your social experience to the next level!ExplanationOne of the most prominent features provided by Discord is the of...
$9.99
1259
no
no
no
if anyone needs thissoftware dm me
no
nitro is better than that thing
kk
lmao wtf is that
@slim forum read your code
if anyone needs thissoftware dm me
@earnest phoenix But it costs. What are you implying?
if someone makes me a bot using that then i am happy to give it to them for free
its not duh
it's yucky to use discord bot maker
it'll ruin my pride lmao
@slender thistle Distributing pirated software?
nah i bought it
let me try
Funny thing is, why would you want to pirate bot maker when you can literally do the same thing with code 
for free lmao
exactly
i didnt pirate it
Funny thing is, why would you want to pirate bot maker when you can literally do the same thing with code :GWnatesnowSmart:
@rustic nova buy makes more sense
Distributing software for "free" is pirating
@earnest phoenix just because you bought it. Does not mean you can distribute it
i am not distributing
but you
i am giving the person who will make a bot for me

give it to them for free
thats
unless you're talking about gifting it them through steam
but i reckon nobody wants this sacred piece of software on your library
it is
@earnest phoenix read #502193464054644737 if you want to start coding. We won't code for you. If you wan't someone to code a bot for you: https://fiverr.com or https://freelancer.com
nah the bot maker is easy
howfokthecpprender?
https://hasteb.in/ivefoqug.cpp
i am giving the person who will make a bot for me
gimme money
no its totally hard
if you want a bot pay me and then make a bot
i want a bot but im not paying you
do you accept robux
lel
Rubles?
gimme help with cpp
Maybe this guide tho.
https://vexxhost.com/resources/tutorials/nginx-windows-how-to-install/
@solemn latch
https://prnt.sc/tx5kwf
but there is no URL
so how to download it
Not sure, probably will have to Google it.
Like I said, nginx isn't really made for windows. So I've never done it
howfokthecpprender?
https://hasteb.in/ivefoqug.cpp
e
oh ok
umm
i am a tester
nice
so glitch is having issues
my bot is crashing due to it
every other day it says module discord.js not found
okie
and use pnpm instead of npm
oook
yeh
i know
i am shifting to a
VPS
bruh
@earnest phoenix it said not found
command not
:bruh:
Anyone knows to fix this?
canvas.getContext is literally not a function
Yea
Are you sure canvas is an instance of the Canvas class?
@fringe axle can you console.log(canvas)
@solemn latch did you want to run Nginx on windows?
Nah someone else did
anyways use docker. takes 30 seconds to setup and if you know how to mount volumes you can easy make changes
How can I send a message to a specific channel ID?
I have 4 websites, I always have just drag and dropped stuff
The whole config folder
🤷 guess I've been nginxing wrong
now i need to wait
You mean me?
Yeah
i mean for running Nginx on Windows. you just launch a Container with Linux in it. you dont need to fickle around with inoffical guides
Ohh
And how can I do it that it will send the message in this channel?
Like I do !sendMessage 272764566411149314 Hi in #commands and he will send "Hi" here
your code will send the message into the channel where the command was used
gonna try again to make a bot, how do i add a module
But how can I do it like I said.
to use different channels define a variable containing the channel object
Client.channels.cache.get(id)
Iirc
^
And then he will send the message in here?
(It's for custom welcome/leave channel by the way.)
but this requires that the channel is cached. if not cached uses client.channels.fetch(id)
how do i mske my bot online and add a module?
@left nacelle read in #502193464054644737
cuz i thoufht i had a module already in
@fringe axle define a variable that contains the channel object or chain them
Add a module to what
@fringe axle define a variable that contains the channel object or chain them
@lusty quest I'm new to discord.js v12
to my bot
But I use quick.db
Client.channels.cache.get(id).send(text)
this as example will send a message into the channel
if you want to use the channel for more stuff in your code define a variable that holds the channel object. then you can do channelvar.send(text)
client.on('guildMemberAdd', member => {
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
const channel = db.get(`wchannel_${message.guild.id}`)
Client.channels.cache.get(channel).send(text)
let text = message.channel.send(`Welcome ${member} to ${message.guild.name}!`)
});
Will work?
try it and see
but looks good
Nice!
(if your db holds the correct id)
I only need a command to set the channel ID
wait
you have an error
Client.channels.cache.get(channel).send(text)
-> send should contain your message
not just text text was a placeholder
also why 2 DB querys?
i did all my stuff from tjis guy
Coding your own Discord bot isn't hard at all! with a couple of simple lines you can get a bot up and running on your server. Stay tuned for the next upcoming videos. Make sure to comment below any suggestions you may have about the next tutorial.
How to make custom commands:...
but my bot doesnt work even after following everything
👀
everyrhing is correct
he uses Discord.js V11 you probably installed V12
what
Youtube tutorials are often out of date
Discord.js is the module you use as a wrapper for the Discord API
can someone send me some stuff i can copy amd paste
read rule 7A again
Copy and pasting code is bad
7a?
read it
@earnest phoenix I did as it says but when I type the commands from discord the bot doesn't say anything, there are no errors in the console either
@grave smelt what code did you type?
@grave smelt what code did you type?
@earnest phoenix I fix it, I don't remember how now though
i doubt
but can i see your code?
I have welcome and goodbye with custom channel in quick db but wanna make in mongo db
MongoDB is nice
const StaffEmbed = new MessageEmbed()
.setTitle('Staff')
.addField('Developer', admin)
message.channel.send(StaffEmbed)
break ```
> but can i see your code?
@earnest phoenix
just
@grave smelt
```
put it in ```
@lusty quest hm, hes set's the channel but not sending any message in it.
Oh
Error
you're AGAIN remaking the embed everytime
@grave smelt
What about me?
idk how to do mongo
I do
how?
@grave smelt
```
@faint prism
but i'm sure it is
███████╗███████╗
██╔════╝╚════██║
█████╗░░░░███╔═╝
██╔══╝░░██╔══╝░░
███████╗███████╗
╚══════╝╚══════╝
you literally type ```
then the text
then another ```
I like Mongo. used Mysql Before but mongo does some stuff better
@lusty quest can you help me then?
what is your issue?
you're AGAIN remaking the embed everytime
@earnest phoenix no problem
I use a mongodb lib and read the docs to use?
bruh
I have welcome and goodbye with custom channel in quick db but wanna make in mongo db
that is a problem
js?
Yeah
that is a problem
@earnest phoenix why?
umm
is there a way to check if only the position of a channel changed in the channelUpdate event
- how you got this star badge?
either install mongodb (offical) or Mongoose (easyer for beginners)
you're making the same thing again every time which is just wasting resources
either install mongodb (offical) or Mongoose (easyer for beginners)
@lusty quest did
I used mongoose
@lusty quest
Cause I am new
good
But how to change in mongo
client.on('guildMemberAdd', async member => {
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
const channel = db.get(`wchannel_${message.guild.id}`)
Client.channels.cache.get(wchannel).send(text)
let text = `Welcome ${member} to ${message.guild.name}`
});
I have command in quick db
Your using text before defining it
you need to pass your client @fringe axle
Means?
Vale your quick.db db.fetch has a missing required argument
No
yes
you're making the same thing again every time which is just wasting resources
@earnest phoenix I don't know how else to do. one way or another I always have to rewrite the content of the embed. in my opinion this is the best idea to also maintain an "order".
@earnest phoenix did you tryed to read the mongoose docs?
It's my index.js
😅
its usually the first thing you do
google isnt even helping
@fringe axle your bot will crash every single time someone sends a message because there is no key specified in db.fetch
client.on('guildMemberAdd', async member => {
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
const channel = db.get(`wchannel_${message.guild.id}`)
let text = `Welcome ${member} to ${message.guild.name}`
Client.channels.cache.get(wchannel).send(text)
});
Means?
allow me to explain
Means exactly what he said
bruh
@earnest phoenix boost a Server with Nitro
just put it outside your command handler
@earnest phoenix but each command has a different embed, what's the difference between putting the staffEmbed outside?
that is with expressjs or smth
@earnest phoenix but each command has a different embed, what's the difference between putting the staffEmbed outside?
@grave smelt that you don't define it again everytime and waste resources
Ohk
Not with Nitro boost?
@fringe axle rn your bot is crashing because of some other problem
not one with quick.db
How can I fix this error?
show the listener thingy code
@earnest phoenix it is a Nitro Boost
are all of these the ones needed?
???
show the listener thingy code
@earnest phoenix there is none...
It doesn't looks like Nitro boost one
@grave smelt that you don't define it again everytime and waste resources
@earnest phoenix but each command had a different embed so every time I have to do another one
wtf
All worked before
That's different
also Possible its bcs im a Early Adopter of Nitro Boosts
Ohk
Nice
@earnest phoenix but each command had a different embed so every time I have to do another one
@grave smelt of course.... why the hell won't you need to make a new embed every time you want to send a different embed for a different command
i sort my file like this:
is there a way to check if only the position of a channel changed in the channelUpdate event
@fringe axle That's a simple JS error, you simple dont define message
@fringe axle Show your index.js line 89
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
ok message isnt defined
did you somewhere defined message?
Good question, no.
how do i get discord. js
npm i discord.js
code913 is typing...
@grave smelt You should sort your files similar to mine
main
|_index.js
|_setup stuff
|_functions
|_expressjs stuff
|_embeds
|_random number generators yes i need em
|_command handler
|_assets
|_images
|_oggs
|_website
|_index.html
|_redirect.html
done
@fringe axle you need to specify a key
@lusty quest what I have to do? :O
should it work now
define message
I can help em
How?
or use a different way to get the id
Is anyone cpp
did you know basic js?
Or no
did you got a message handler?
No
did you use the on Message event?
I read that
client.on('guildMemberAdd', async member => {
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
const channel = db.get(`wchannel_${message.guild.id}`)
let text = `Welcome ${member} to ${message.guild.name}`
Client.channels.cache.get(wchannel).send(text)
});
Btw I have mongo db set up
@fringe axle
db.fetch(`databaseName.keyName`); //returns the value of keyName from the databaseName
db.fetch(`databaseName`); //throws error because there is no key
Still this.
@grave smelt You should sort your files similar to
mh I take a cue
so it will throw nan error
That's still not the problem.
@lusty quest my mongo db's setup is done
Working in other code.
but itwill cayse errors
bro
Now I think I need to make a folder named models right?
why the fuck are you sending the command handler if it is a problem with the listener thingy
and there IS a problem inside the command handler too
Listener error is fixed
because there is no key in db.fetch
This is the error
@earnest phoenix cool. yes is best practise
@earnest phoenix no he dont defined message
Weird, working.
@fringe axle you defined
memberinstead ofmessaeg
@earnest phoenix I need member too :O
@lusty quest I need to make folder right ?
@earnest phoenix you dont need to but it looks cleaner
Hm so can I make?
@fringe axle replace member with message before the => thingy
Cause I want everything arranged
Okay
you'll define member INSIDE the {}
What to make in models file @lusty quest
because member is a property of message and you literally named message as member 
did you read the pages of the docs in how to define a model?
Hm
its simple you make your folder for the models and put in there your schema files
and in the files where you want to do a query you require the schema file you want to query
No error and no response in the channel that I set as welcome channel.
Oh
Now member is not defined @earnest phoenix
Rip

Define member then
client.on('guildMemberAdd', async member => {
let wchannel = await db.fetch(`wchannel_${member.guild.id}`);
```this is how it looks like right?
client.on('guildMemberAdd', async message => {
let wchannel = await db.fetch(`wchannel_${message.guild.id}`);
const channel = db.get(`wchannel_${message.guild.id}`)
let text = `Welcome ${member} to ${message.guild.name}`
Client.channels.cache.get(wchannel).send(text)
});
Like this
did you see the difference?
No
and the member object also includes the guild
Because if message is not defined then the error message is not defined is coming
i bet with you for 1 Month Nitro you dont need Message
And what I need then?
change message to member
client.on('guildMemberAdd', async member => {
let wchannel = await db.fetch(`wchannel_${member.guild.id}`);
const channel = db.get(`wchannel_${member.guild.id}`)
let text = `Welcome ${member} to ${member.guild.name}`
Client.channels.cache.get(wchannel).send(text)
});
like this
why would you need a message object
mongoose.model('ModelName', mySchema),
lol
Just need to edit right?
@earnest phoenix this is the last line in your code
const mongoose = require('mongoose');
const guildSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
guildID: {type: String,unique: true,index: true},
premium: {type: Number, default: 0},
prefix: String
});
module.exports = mongoose.model('Guild', guildSchema);
```this is my model for a bot i use (guild config)
error?
He just spams "Ready" 
not my error
that's a fluke in your code elsewhere
Now it is yours
not my error
It is
because you're too dumb to understand what i was screaming 2020 times
not my error
@lusty quest it's in line 92
did you use Client or client?
you copypasted superbrain's code and you didn't adjust the variables accordingly
stop being a toxic dumbass
yep
did you use Client or client?
@lusty quest wait
not gonna help anymore
stop being a toxic dumbass
@earnest phoenix you mean me?
yes
Mongo
why
quick is nice but mongo offers you better scaling
const db = require("quick.db");
const Discord = require("discord.js");
module.exports = async (client, member) => {
let chx = db.get(`welchannel_${member.guild.id}`);
if (chx === null) {
return;
}
let embed = new Discord.MessageEmbed()
.setTitle("WELCOME")
.setDescription(
`Welcome to our server ${member.user.tag}. Hope you enjoy here an don't forget to read rules`
)
.setColor("#FF2D00")
.setTimestamp()
.setImage(member.user.displayAvatarURL({ dynamic: true }));
client.channels.cache.get(chx).send(embed);
};```
do research on sqlite vs mongo performances
please use https://hastebin.com
since quick.db is just a wrapper around sqlite
this is in my guild member add event
sorry
ok
sqlite will seem faster
and you want to get the channel from the DB
seem
its probably faster bcs it runs local
but its a direct db
its not a server type db
but its annoying AF to scale across mutiple machines
you litterally cant
not well
look into postgresql
you probably can with some stupid workarounds
a database on my own machine
a powerful sql server
if you want scalability
what about me xD
did you got your schema defined?
what I should do
im checking your code mate
checking your stuff
Actually I gave you code of my guild member add event
wait you wanna update from quick.db to mongodb?
yeah
welp i cant help witht hat
const data = await <Schema>.findOne({ <key>:<value> });
ask the qts here
this is how you can query for stuff
Quality Testers
errro?
AUger the guy whose pfp is the reason i can't sleep
then you got somewhere else a error
please
read the docs
send the full code
and stop demanding
what to do with this code const data = await <Schema>.findOne({ <key>:<value> });
or debug your code, you said you wrote it, you can surely debug it, Vale
yup
🧠
data will contain the stuff your MongoDB returns
ohk
replace <schema> and the key stuff with your stuff
ok
Nitro please 
@fringe axle is your channel cached?
what about value
It is
@fringe axle : sends only 1% of the full code
Also @fringe axle : asks us to help
literally debug OH MY GOD
please
inspect your variables
log them
then remove .send and pack it into a console.log
then send the log in here
Nah, I'll try to fix it myself. Superbrain is nice but cry and code...
dude
@earnest phoenix how did you define your key? i would use guildid:yourguildid
imma just ignore vale
we're pushing you to do it yourself because you're capable of doing it, you just don't want to do it
yep
and because you didn't listen to the quick.db error i said 2020 times
which gives an error
i would suggest the DB doesnt return anything bcs it has no key defined -> cant find the channel to send a message
no dont
?
you need to create the Document in your database first
i would use the guild Create event to create a config file for every guild the bot joins
No
@earnest phoenix just let him do his thing no need to ping him a million times
But I'm trying it
And it's getting better
It's not a quick.db error.
guildMemberAdd @earnest phoenix
@earnest phoenix yea you need to define a document in the database first
otherwise you wont have data to fetch
It's working for an other code.
this is what it looks like
And I don't set a Key
then
we how the all delete roles
v12
what I do now?
@earnest phoenix did you know how to save a document?
And I don't set a Key
woah i guess keys dont exist no need to listen to my explanations with all due respect just block me
in?
ok
const newGuild = {
guildID: guild.id,
prefix: "!"
};
``` define your Model (fill in data)
add it in?
this is inside your bot
i still suggest adding it inside the guild Create event
no not models
this is a Query
if a guild adds the bot -> new Document for the Guild is created
if you define the fields in your Schema and the Model yes
ok so I would prefer guild member add
now plz guide me
a min
I am back
first I need to import mongoose right ? @lusty quest
require it
yeah
also require your schema
ok
so im using quick.db and i have an array, and i want to delete a specific element of the array. how can i do that? i tried js let db = client.db.get('reminders') delete db[r] where r is the array content, but it doesnt work. any idea what can i do?
did you know how to require files?
I believe splice is the only way without cloning the array, Lumap
hm
const Schema = mongoose.Schema;
did you know how to require files?
?
Also, if you want to use delete, you'll have to do db[IndexOfItemYouWantToDelete], and also it won't resize the array, the item at that index will be undefined I believe
const {Guild} = require('/path/to/your/model')
so I need to do that right?
yes
- I need to link it to which file
you do it this way
Also, if you want to use
delete, you'll have to dodb[IndexOfItemYouWantToDelete], and also it won't resize the array, the item at that index will beundefinedI believe
@cinder patio hmmmmmmmmmmmmmmmmmmm
**lo[1] is undefined though
I mean which file is should write in brackets
like /models/guild.js as example
oh
I didnt made any file in models folder
I am adding code now in events/guildMemberAdd.js
where did you saved the schema then?
how should i define the bot i wanna send his avatar in an embed
its a bad idea to work on features that require a working Database before the database is even working
my schema is in mongoose.js
const mongoose = require('mongoose')
const schema = new mongoose.Schema({
gid: String,
gName: String,
prefix: String,
ownerID: String,
ownerTag: String,
memberCount: String,
mid: String,
warns: String
})
module.exports = mongoose.model('villain', schema)
this was supposed to land in the models folder inside a file
how should i define the bot in my embed i wanna send his avatar
please just store IDs, names and tags are changed frequently. resolve IDs to names using your bot
where did you defined your mongoDB connection?
;-;
paste the model into your models folder and require this file than in your Events file
@jolly wave client.user.displayAvatarURL
thx
const mongoose = require('mongoose')
const schema = new mongoose.Schema({
gid: String,
gName: String,
prefix: String,
ownerID: String,
ownerTag: String,
memberCount: String,
mid: String,
warns: String
})
module.exports = mongoose.model('villain', schema)
this is models folder
but what should be name of file
this is a file inside the folder right?
depends on what you want. i usually name it the same way the Model is named
it might check for a collection named "villains"
you have to specify it explicitly as a third parameter
listen
I have schema in file named mongoose.js
connection in events/ready.js
and a file named guildmember add which had my welcome code of quick db
you need to learn to walk before you can run
😅
I cant even run still 
first get your Database working before you make some more stuff that requires the DB to work
isnt it working fine?
idk does your Bot creates a new Config if it gets into a new Guild?
(you dont need this if the bot will stay in one guild)
but its just to make sure the files you depend on in the future exist
you probably saved it manually right?
?
why did you make a new Document every time?
I dont make
so you check every time someone in a guild runs a command that the config exist if not create one?
I dont make in manually
i talk about your code
i just want to make sure you wont do something stupid
You dont really need to make a config until a non default setting is set.
bcs this could break your neck if you have like 10k guilds and every second 6k users use a command
it just creates a Config every time your bot starts and a guild dont have a config works but can cause issues
swapnilyt:swapnilyt@main.b8qz9.azure.mongodb.net
now
i havent looked at my mongo system for a while
but
Last time a checked
swapnilyt:swapnilyt is your user name and password no?
no
did you want to connect to local host?
I am dumb af
so
ohh this guy
you fucking moron
@earnest phoenix yes
🤔
you fucking moron
@modest maple who?
you
did you defined it?
@earnest phoenix regenerate your password and use a new user
your fucking database is openly available to connect
lool
I litterally just connected to your db
also only allow connections from your PC and your server
🤦♂️
seen a guy get ransomwared for doing that
his database, with private user data had no password

^ thousands of people visited his site daily
😭
had like 20k users in the db
👏 change 👏 your 👏 fucking 👏 db 👏 creds 👏 now 👏
actually scary stuff
Wrong password or username Lo4rd
- changed password
@earnest phoenix go to network Access and add the IP of your Server
i deleted my bot status thing. any one remember what is it?
how would we remember
- changed password
@earnest phoenix Dude was your login creds in that connection string actually what it was...?
use git plox
GJ try not to leak it next time
if you want to run the bot on your pc add the IP from your PC (make it temporary)
What do you think "authentication failed" means?
ron, we wont remember your code
lol
use git if you want something to remember your code history
this channel makes me lose more faith in humanity with every day that passes
@earnest phoenix We're here to help people not shit on them because they are new, let's keep this channel more positive and keen on helping people understand rather than saying that you're losing brain cells
😔 People need to learn to actually read about their db before jumping into it
^ if your new to databases, do a few hours of research
Like actually taking precautions to not just leak your uncensored db url
What prevents you from actually helping them get used to databases
we cant help them censored their passwords
@earnest phoenix We're here to help people not shit on them because they are new, let's keep this channel more positive and keen on helping people understand rather than saying that you're losing brain cells
@coral trellis
being new is not an excuse for not wanting to use your cognitive skills to resolve a logic problem, it's something you do on a daily basis but ok lol
I liked the idea someone suggested for two development channels for beginner help and advanced help
what would be the point
the problem is, a lot of new developers consider themselves experinced
No way
99% of this channel are people that have no decent programming experience
i doubt that the "lesser smart ones" would acknowledge the difference between the two channels
Unless there's an obvious definition of "advanced", people will come to the advanced help channel expecting help for basic stuff like invalid syntax.
^
^
Hm
It's just a pointless separation.
This channel is too help people
Question, how do I trigger the bot joining / leaving a guild?
like the event @fallow steppe ?
Where can I learn assembly?
guildCreate / guildRemove in d.js @fallow steppe
@pure lion in hell
@fallow steppe which lang/lib
d.js
fr tho if you wanna learn it books
@modest maple I want to learn it in this plane of reality
<Client>.emit("event name", parameters)
Ok got it
Where can I learn assembly?
@pure lion Syscalls, instruction pointers, stack push and pop
@pure lion Syscalls, instruction pointers, stack push and pop
@faint prism tanQ