#development
1 messages · Page 1132 of 1
that looks ugly as shit
var radio = require("./radio.json");
var rstat = radio[command]
var inChannel = false;
if (command === "radio") {
msg.channel.send( "__**Available radio stations:**__", function () {
for(var fxes in radio) {
var info = "**!" + fxes + "**";
var usage = radio[fxes].usage;
var name = radio[fxes].name;
if (name) {
info += "\n\t" + name;
}
var url = radio[fxes].url;
if (url) {
info += "\n\t" + url;
}
msg.channel.send(info); // message.author
}
});
}
if (rstat && inChannel) {
if (bot.voiceConnection.playing) {
bot.voiceConnection.stopPlaying();
}
bot.voiceConnection.playFile(rstat.url);
}
```
does anyone know how to make it so when catching an error it doesn't put anything in the console?
/shut down
heres my coded btw
don't... print the error
const obj = await fetch(`https://api.mojang.com/users/profiles/minecraft/${args[0]}`).then(x => x.json()).catch(() => {message.reply('This is an invalid name!') return})
Bruh
it does that but then it shuts down
Put a try catch
this is what my bot sys
good idea
me?
misterdepth
op
what problem do you have PGamerX
ill help if the problem ain't dumb 
what is the code
var radio = require("./radio.json");
var rstat = radio[command]
var inChannel = false;
if (command === "radio") {
msg.channel.send( "__**Available radio stations:**__", function () { // message.author
for(var fxes in radio) {
var info = "**!" + fxes + "**";
var usage = radio[fxes].usage;
var name = radio[fxes].name;
if (name) {
info += "\n\t" + name;
}
var url = radio[fxes].url;
if (url) {
info += "\n\t" + url;
}
msg.channel.send(info); // message.author
}
});
}
if (rstat && inChannel) {
if (bot.voiceConnection.playing) {
bot.voiceConnection.stopPlaying();
}
bot.voiceConnection.playFile(rstat.url);
}
```
NOTE I found this on tuotorial
and changed it a bit
NOTE I found this on tuotorial
@delicate shore then the tutorial is wrong
trying a few things
Let's of outdated tutorials on YouTube
What are you trying to make also
so now what should i do
@delicate shore make it yourself
radio comambnd
@delicate shore what does it do
@karmic compass
I'd suggest forking over the $3 for a VPS or just not bothering at all
Or just run it locally
;-
but more professional use bots with warn systems and databases then like
you probably can't
It says "No. Not even Heroku." because the free tier is shit
i hate heroku
Use an old android phone and trn it into a vps
it’s not good
i mean for me its been reliable so far
im just using it rn bc
i cant get anything else atm but
i'll look into digitalocean tho
an android isnt a VPS, it would just be a server at that point
True
@karmic compass im here but in and out
Yeah would be cool actually
solving some stuff in other servers + some irl stuff showing up
yeah i thought so
so its working now?
i put most of my code in a try function, and yeah
because i did a catch, it terminated bc of the catch, but then i did try and catch, but it terminated because of global variables, and now most of the code is in the try function and ITS WORKINGGG
insert undertale showtime music here
niice
Wait what are u try catching?
Cuz try catch is pretty inefficient
As it tries the code first znd if theres no errors or issues it runs it
Effectively running the code twice making it 2 times slower
It doesn't run it twice
it runs it once, and if it fails, it runs the catch statement
Oh it was explained to me differently
btw this you erwin?
its fine, the important part is that its working now
*i still hate that it doesnt have my aviator glasses though
*
let me look at something
Lemme see there might be a way to do it
I’d think u need to add like a parameter or something
Idk how it works
But it should be possible
layers have always been an issue with displaying minecraft chars
message.guild.members.fetch().then(async guildMembers => {
var members = guildMembers.filter(member => member.displayName !== sanitizer(member.displayName));
var failedMembers = [];
members.forEach(member => {
let newNick = sanitizer(member.displayName);
console.log(newNick)
member.setNickname(newNick).catch(err => failedMembers.push(member.user.tag));
});
the nickname isn't being changed, even though the new nickname is different.
Or if ur already specifying things in the url add &overlay
There are also no errors for some reason
even though there are supposed to be 1

Ok this wont solve ur solution but please use let instead of var and I’d also suggest pushing user id’s instead of tags as users can change there tag but not their id’s
What does member log?
In the for loop
foreach loop*
- lets are not going to not work with what I am doing.
- It's a one-time usage for the tags.
and these are the logs
So hype to switch from my DB being a Json Serialization List<UserRecords> to a proper DB
so this should work then
those are the typable versions of them
postgres ftw @faint prism
Aprixia those are names u need the member object to change the nickname
I have the member object
Should work yes @karmic compass
Well, I can make postgres context with that interface. The issue was my interface sucked previously and wasn't desgined well
Thek why does member log a string?
Like literally, 4 of the original amount was changed
And not an object
debugging
how t postgres 101. spam tables. insert shit. done
Log the type of member
perfect postgres usage
I asked to log member
message.guild.members.fetch().then(async guildMembers => {
var members = guildMembers.filter(member => member.displayName !== sanitizer(member.displayName));
var failedMembers = [];
members.forEach(member => {
let newNick = sanitizer(member.displayName);
console.log(newNick)
member.setNickname(newNick).catch(err => failedMembers.push(member.user.tag));
});
member.displayName
Log
hey, I'm just wondering. is there a good coding app for mobile? bc i wanna start coding
Member
perfect postgres usage
ikr lmao
obvious object
Oh
And I've already logged member
Didnt see that lol
does anyone know any good command handlers for js
use framework
@summer torrent can you link please
thank you
I would suggest that you also learn how to make one, it's a good coding challenge that will also teach you some basics of modules and other basic node concepts
Does anyone know how I can identify in which voice channel the bot is?
which lib
your libraries docs will tell you how
I dont know what I did to fix it but thx for the help guys
if you ever want a bot giving a role using command use this template
Anyone used https://www.perspectiveapi.com/#/home ?
nope
why are you using find the djs 11 way and the djs 12 way?
I did it in v12
djs 11 style
Me over here with eris
Isn't it message.guild.roles.cache.find or am I just being dumb right now?
afaik it is that
Man offloading ML engine to perspective api would def reduce the CPU overhead
well they say it is that but that shit did not work for me
well, this is a bad template, others, please just use
guild.roles.create("roledata")
.then(newRole => msg.member.addRole(newRole))
.catch(console.error);
iirc that should be correct
but what if you want certin colors or perms huh
nah that shit dont work for me
nah, you just never did it
I already tryed that
What version are you?
and its still wrong, you just ifing it into the correct place
it works, for the wrong reasons
that stuff was returning some bullshit error so either your wrong or my console was having a good smoke of some pot
case 'creatrole':
message.delete()
if(!message.member.roles.cache.get('726773901064929313') && !message.member.hasPermission('ADMINISTRATOR')){
message.reply('you dont have the premissions to use this command!');
return;
}
if(!args[1]) return message.channel.send('you need to type what the role name should be.').then((message) => {
setTimeout(function() {
message.delete()
}, 3500)})
message.guild.createRole(PREFIX.length + "addrole".length)
break;
what is the problem?
we told you exactly what caused those errors
and you were wrong everytime
Is there an error?
I followed all your istructions and had to find it myself
Is there an error?
@vernal rivet me?
Both
you understand, your using functions from both djs v11 and v12 right?
Should be message.guild.roles.create()
ty
its msg.guild.create
the docs say otherwise
add the roles it wont work
the docs do indeed say otherwise
Guild doesn't have a method called create
Im telling you some of that shit someone was smoking some pot while creating it
then why did it not work for me in the latestr version huh
message.guild.roles.create()
obv not the latest version
oh really you want to play that bs
It's different if you are in v11
im in v12
Then it's what I said message.guild.roles.create
I dare you
it’s message.guild.roles.create()
docs are high af
all those yt vids or git hub links or other shit everyone was high af
||can also look at the d.js guides||
you know the github is where the package comes from right?
guides are high af too
nah you are by the seems of it
then why does my code work then?
What does it look like?
tell me why would it work if its wrong?
idk but message.guild.roles.create works for me
now its working but...
thats right my shit is right
and message.guild.create doesn’t
it does
its make the roles name is "new role"
if it did not explain why mine works

how do i make it so it will make the role name what i type
docs say your wrong bud
I can give you the bot link and show u
how do i make it so it will make the role name what i type
@stiff stream
What does your code look like progame
me?
Nah, the other person
look the code even exactly says its guild.roles.create()
Are you using args Ron?
want me to send the code?
Yes
case 'creatrole':
message.delete()
if(!message.member.roles.cache.get('726773901064929313') && !message.member.hasPermission('ADMINISTRATOR')){
message.reply('you dont have the premissions to use this command!');
return;
}
if(!args[1]) return message.channel.send('you need to type what the role name should be.').then((message) => {
setTimeout(function() {
message.delete()
}, 3500)})
message.guild.roles.create(PREFIX.length + "addrole".length)
break;
here you go
https://discord.com/oauth2/authorize?client_id=634090973344956446&permissions=8&scope=bot @vernal rivet prove that the !admin @earnest phoenix command does not work
shit thats an aactually person
can you not post your bot invite link
sorry dude
Why my bot not here
You are using args. Just put args[1] in the create method
Can I add?
your bot needs to be approved
Why my bot not here
@earnest phoenix hasn't been approved #502193464054644737
Why my bot not here
@earnest phoenix because it’s not approved
before its added here
Ok
there?
Yes
lmao it takes time smh
in what part?
3+ weeks is the queue time
it’s 3+ weeeks lmao
I applyed like 10 days ago XD
In replace of everything in ()
ok
oo fun stuff
the args with ! in the start right?
In replace of everything in ()
@vernal rivet with ! in the start?
How to ?
yes
wdym how?
Yes
Well uh wdym
no code has been given and you ask how???
if u don’t know how
Wait a min
learn how to use mongodb
that's how
How do I change the size the image displays in an embed object
@vernal rivet still calls it "new role"
Because
How do I change the size the image displays in an embed object
@earnest phoenix use options
???
Oh wait i got it

like I said you have to use the edit command and have a delay for adding the role to a person
exports.run = async (client, message, args) => {
if (!message.member.hasPermission("ADMINISTRATOR")) {
return message.channel.send(
"You should have admin perms to use this command!"
);
}
const user = message.mentions.members.first();
if (!user) {
return message.channel.send(
"Please Mention the person to who you want to warn - warn @mention <reaosn>"
);
}
if (message.mentions.users.first().bot) {
return message.channel.send("You can not warn bots");
}
if (message.author.id === user.id) {
return message.channel.send("You can not warn yourself");
}
if (user.id === message.guild.owner.id) {
return message.channel.send("You jerk, how you can warn server owner --");
}
const reason = args.slice(1).join(" ");
if (!reason) {
return message.channel.send(
"Please provide reason to warn - warn @mention <reason>"
);
}
let warnings = db.get(`warnings${message.guild.id}${user.id});
if (warnings === 3) {
return message.channel.send(${
message.mentions.users.first().username
} already reached his/her limit with 3 warnings);
}
if (warnings === null) {
db.set(warnings${message.guild.id}${user.id}, 1);
user.send(You have been warned in ${message.guild.name} for ${reason});
await message.channel.send(You warned ${message.mentions.users.first().username} for ${reason}); //DO NOT FORGET TO USE ASYNC FUNCTION
} else if (warnings !== null) {
db.add(warnings${message.guild.id}_${user.id}, 1);
user.send(You have been warned in ${message.guild.name} for ${reason});
await message.channel.send(You warned ${message.mentions.users.first().username} for ${reason}`
); //DO NOT FORGET TO USE ASYNC FUNCTION
}
};```
omg
Ummm probably needs to be in a object. Try {name: args[1]}
I sent my source code
bruh
i said learn how to use mongodb
From where?
I wanna learn
But couldn't from YouTube
docs?
Ok
?
Will try
remove the !
Oh without the !
k
..
My bad
embed:{
image:{
url : "spaghetti",
options : {
width: 1024,
height: 1024
}
}
}
aren't you supposed to pass data and then the name
Have I typed it korrekt
uhh
Me on mobile can't test
It's the other way around
Bruh
Still?
Isn't it supposed to be
you have to edit it .....
Where is the doc when I need it
message.guild.roles.create({
stuff
});
you cant create roles witht he name/color/perms...
that is the syntax right
you have to edit them after creating a blank one..
Use then function
have a verified bot
Bottom example
Oh
have fun failing if none of you want to listen XD
your wrong
Yep
everyone says your wrong
Also
🤷♂️
enjoy being a failure XD
ack
ackapoo
My bot under verification in top.gg + applied for bot verification too

embed:{ image:{ url : "spaghetti", options : { width: 1024, height: 1024 } } }Me on mobile can't test
F you discord
Can't out code blocks in quotes
Rip
im not sure if its
image:{
url : "spaghetti",
options : {
width: 1024,
height: 1024
}
}
or
image:{
url : "spaghetti",
width: 1024,
height: 1024
}
I believe the second, but you'd have to check.
https://discord.js.org/#/docs/main/stable/typedef/MessageEmbedImage
It's the second one
@vernal rivet ty for helping
Np
is it ok if i will ask one more question?
Yep
thx
i will use one and save 99 for later
Don't ask to ask, just ask
how to i make that the bot will make the role as the color that the person says?
arg[2]
(just a template not spoonfeeding)
Only use them if your saying not, or opposite
tyyyyyy
so you'll get errors if you use it outaide of if statements
also delete() has optional arguments for selt delete
Make it check if the user sent a common color name
without needingin to setInterval
Then make a role with the hex color
Make it check if the user sent a common color name
@earnest phoenix how?
Hex
how?
You can use a Color package, most accept names, and can convert to hex
^
i belive discord will actually take blue as a color.
it may need to be all caps
Maybe
That's for embeds
Discord.js accepts color values for stuff
it says it accepts BLUE
I just checked, roles.color is type of number
unless the docs are just trolling us
like this: if(!args[2]) =
blue
red
yellow
(etc) return;
?
I WILL SET THAT EACH COLOR = TO his name
like this: if(!args[2]) =
blue
red
yellow
(etc) return;
?
I WILL SET THAT EACH COLOR = TO his name
@stiff stream ?
I guess it is a string
i think discord stores it in a specific format
Yee
Why not BlUe
@earnest phoenix Hello again, did you find a way to launch your bot I'm in wonder
I'm sorry 😦
Wait, who is trying to figure out the give and remove roles?
a few people
@earnest phoenix ahm u can't learn a lib or programming language
it is infinity
ok that acceptable
:))
ive been working with js for awhile, still learning daily
they where working on creating and deleting roles iirc
also, the whole, no spoonfeeding rule
please upgrade
Rip
😻 thanks for trying atleast
pls wait 3weeks+
lol
u need tu
||100 years later||
😄
i dont beg u
ok
Eeeeeek! How do I get verified?
your bots page
by going to dev portal
You should also get a Discord-System-DM when it reaches 75 servers
It’s in 75
Unless it got flagged for "inorganic growth" or something, but I'm going too far off topic
Might take some time
Okay
how do I embed rust in python
probably pretty low for deleting channels
maybe 10
10 what
10
ok, 10
your bot cannot legally delete more than 10 channels /s
10 channels ever?
Are you guessing?
10 a minute
10 a minute seems reasonable ill check the docs
do the docs say ratelimits?
do you mind pulling it up?
i was told that wasnt public info
and couldnt find it
docs said to check the rate parm sent with every response
Ye
you don't get access to those in djs iirc
you get acess to the ratelimit event
With or without
It tells you you’ve been rate limited
With an object saying when u can request again
so, that doesnt tell you the actual rate limit
ie, status changes is 4 per 20 seconds
or 5 per 20 seconds, cant remember
It tells u how many requests uve sent
Just got the DM from discord, bots getting verified
Congrats
Still don’t have the bot dev role here tho idk, it got added earlier
Just to ruin the fun; your gonna wait like a month or more for it to get verified
so, your saying the way you get the ratelimit value is by hitting the rate limit?
I thought they promised 5 day return
You get heavier punishments as you go iirc
@safe totem lol
Ive been applied for a month no response
generally speaking, you the first ratelimit value is the one you expect
Damm
You tell us, what’s the error?
@stiff stream first, addField expects 2 values
message.user doesnt make any sense does it?
yes i think
Also why are you using avatarURL()?
here are the properties of message
https://discord.js.org/#/docs/main/stable/class/Message
Look for MessageEmbed while you are on docs
no .user property
Also why are you using avatarURL()?
@earnest phoenix what i should use?
Look above at what Woo said
avatarURL() can be null
so,you can use displayAvatarURL()
message.author.avatar is just an id
if you want just an id, thats fine
no i want the logo
well, id look at this, and choose the one you want.
https://discord.js.org/#/docs/main/stable/class/User
avatarURL() can be null if the User doesnt have one
Why are you using addField for an image 😖
use setImage?
i really would suggest using the docs
yeah they cover what things do
whatcha mean?
E woo you are still here
hello gamers
@misty sigil hi
im bad at database so i will be stalking you
it's better than using a json db
whatcha mean?
@solemn latch its not showing what is to send the logo, only links.
very simple too, just db.set(message.guild.id, "prefix")
is there any examples i can see
if you look at the docs, setfield is for text

ok ty
if you want to use an image, you need to set the image
which the docs explains here
https://discord.js.org/#/docs/main/stable/class/MessageEmbed?scrollTo=setImage
do u know if it will work with the picture i sent? @misty sigil
which you can find by looking at the methods and properties
what?
does anyone how to make a one-time popup for every refresh to popup (javascript) or css
what ?
error: TypeError: message.guild.members.get is not a function
nah
does anyone how to make a one-time popup for every refresh to popup (javascript) or css
hmmmmmmmmmmmm
im gonna use quick.db looks nice
does anyone how to make a one-time popup for every refresh to popup (javascript) or css
@ancient nova i think with the warn thing
this is why you stalk this server:)
no I mean for a website I'm creaing for my bot
yes ik
alert("your message here!");
you can just store something in the local storage to say if the user has seen it or not
and only display if they havent seen it
I need a custom made one
I have commands called usercount,servercount, members that are not working idk why
I'm using window.prompt
@misty sigil is there a docs for it or website or video?
help
theres docs
There’s a website
^ that too
I need a warning popup, it means that before you enter the website you have to tick that you're 18 year old (something like that)
Can anyone help me
what do you need
error: TypeError: message.guild.members.get is not a function
@slender wagon
ok
a one-time popup window
what code
i do not have a magic crystal ball
I don't know the code that's what I'm asking for it
use cookies
i don't think cookies would be needed for a onetime popup window
well, hold on
window.alert("Welcome to Insta House Mom, Best Moderation & Entertainment bot\n\nWarning: The animations of this website may cause symptoms of epilepsy")
this site is 18 plus?
something like that but with custom-made layout
most 18+ sites you should probably pop it up every time
@solemn latch no I wanna create epilepsy warning popup
ah
You should just do it every time you visit tbh
^
yeah
@misty sigil are u here
how do I do that
yes i am
onload alert
Oh
?
So
can anyone send me an example code? can be in css or javascript
im just looking at this elseif chain
and 3 message events, and the if you send yes it restarts the bot
and how you just respond to ram
The usercount servercount and members aren't
using message.content
last cleanup was yesterday i add a lot of useless things
Also ram
y'know i'm just pointing out errors that'll get you denied
instead of this js let ucount = client.users.cache.size message.channel.send('I am currently watching ' + ucount + ' users.') have you tried ```js
message.channel.send(I am currently watching ${client.users.cache.size} users)
Let me try
But I don't think it will
If you look at the broken command called members
It's almost the same code
did i point out that on line 66, that client.on message you are building an embed for every message sent
?
i'd advise just putting the profile along with your elseif chain
Idk how
someone must help me to port forward, i have it forwarded on my router but its still a lh 🤷♂️
I tried but failed
client.on('message', message => {
const embedProfile = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle(`${message.author.username}'s Profile`)
.setAuthor(`${message.author.username}'s Profile`)
.setDescription(`${message.author.username}'s User Informations`)
.setThumbnail(message.author.displayAvatarURL())
.addFields(
{ name: '\u200B', value: '\u200B' },
{ name: 'ID:', value: `${message.author.id}`, inline: true },
)
.setImage(`${message.author.displayAvatarURL()}`)
.setTimestamp()
.setFooter(`Every stats of ${message.author.username}`);
if (message.content === "?profile")
message.channel.send(embedProfile);
})``` and afaik this sends the embed profile every message
at least it should
I don't understand
nice use of displayAvatarURL tho
Thx
@eternal flame check your computer firewall to check that it isn't blocking it there
where would i find it and what do i do-
you're trying to port forward to your computer, right?
im trying to port forward a local host so it cna be public, if thats what you meant then yes
windows?
yessir
check if your antivirus firewall is blocking ports
windows has a firewall
or the windows firewall
hi
||hi||
How do u do that
hi
does this look like the right channel to be asking that?
oof no
^
how do i uninstall a package lmao
npm uninstall [package name]
@sinful belfry ty and yes i'm
ok
there are 'port checker' tools which can tell you
but better if you try hosting a webserver and serving a webpage through it on the port
epic
i need a tutorial on this
so
as it is
right now
ive forwarded the port
can i access it from a different device
it still says local host so
you should be able to do yourip:port
im testing on my raspberry pi (great tool for hosting bots) and chromium says this site cant be reached
oh
ok
and then you can access whatever is listening on that port
unless you've specifically created a webserver which loads a webpage, any web browser will not load it
so
wait
ive just done the my ip thing
and you have just said this im sure but i dont understand because i stupid
is this supposed to happen?
why have you forwarded the port, may i ask?
yes
oh
i thought you asked me
im forwarding it so i can make an api with bot stats
also
maybe later so i can develop a webpage
im not that smart tho
not yet
ah so do you have a webserver running on that port yet?
yes
lemme do that rq
yeah just setup a quick express server or something similar and serve a simple webpage with it
that is probs the best and easiest way to check that what you've done has worked
hey
anyone help me here: throw err;
^
Error: Cannot find module 'C:\Users\Utilizador\Desktop\languid-noisy-teller-2020-07-26_170114 (1)\index'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
hi
hi
you're requiring a module which doesn't exist
you either need to install it or check your file paths are correct
const verify = require('./privateRoutes')
router.get('/', verify, (req, res) => {
res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});
//private routes file
const JWT = require('jsonwebtoken');
require('dotenv').config()
const config = process.env
module.exports = function(res, req, next) {
const token = req.header('auth-token');
if (!token) res.status(401).send('Access Denied!');
try {
const verified = JWT.verify(token, config.secret);
res.user = verified;
} catch (e) {
res.status(400).send('Invalid token');
};
};
its not running the func and im not sure how to pass in req and res
just module(res, req) in your app.get afaik
inside da ting?
im following a yt tutorial and it still nto workin
dont
ye
jeremy
can I manually shard my bot
im still getting error but now its h t m l ified
I want a shard for dbl because its erroring
gold i told you already not to use your own home ips as your webservers lol
maybe a bit early to start sharding
throw the maybe out
I want a shard for dbl because its erroring
n o
I have a sharding manager so I won’t have to worry about sharding when the time comes
a shard one shard for discord bot list
also lmao helpme ;-;
discord bot list shard one single shard for discord bot lsit
why would you want that
my bots errorin on me
^
I don’t think its in my control
you mean a domain?
yes
you have to buy domains
freenom
a domain is just a pointer to your ip
excluding freenom
it's still going to be widely exposed
^
because you cant afford a webserver use freenom x)
anyone who has your domain has your ip
you're asking for your router to be fried or to be dox'd
anyone who has your domain has your ip
including aeon
what have i started
so for the webserver
oop
:_)
HeLMe
question about hosts:
can i just like share a folder from my desktop to a host and edit it without any issues? or is there something else i gotta do
woo have you any idea how to help?
im not sure what your doing ngl
auth
i need someone to help me change it from ip:port to an actual domain
you need to get a domain
use a reverse proxy too
buy a vps, buy a domain, setup nameservers
well i do have 1
a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with their codes
okay, then add an a record
stop trying to host a website from your home address
that points to your ip
someone answers me please
a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with their codes
just curious, have you made anything yet?
you dont really need a domain until your ready to publically share
okay, you should REALLY have a host before having a public api
api's get a lot of abuse, having it on your home network is a really really bad idea imo
also in my opinion
abuse as in: ?
jeeeeermey gheep meeeeeeeee
abuse as in: ?
@eternal flame dee doss
inb4 banned for impersonating mods
Hola?
d e e d o s
you can have multiple folders
ive never been ddosed or doxed and i dont want to
well, your kinda encouraging it
youre prob right
get a host before doing any of this
*cries*
@solemn latch me dices ami?
i literally want to pass in some shit
this is an english speaking server
and have it work
sorry sorry
@earnest phoenix no hablo espanol, #memes-and-media
i have a .xyz domain so
what I was saying was that if you told me
a domain isnt a host
DDoS & people just being dumb fucks & requesting farrrrr more than they should, even on accident @eternal flame
yeah ik
"Accident"
i know a few people that used it, some liked it, some didnt
Ehh idk personally
what host do you use
ill look at em
Same here, & they have a dedicated + active Discord server for support
they are having some stock issues on their regular vps's should be in stock again sometime in the next week
They are currently out of stock but ping a mod in their server & they can put in an extra server for you 9 out of 10 times
Literally did that yesterday & they did it in like 10 minutes
can hav help?
res.status is not a function
const router = require('express').Router();
const verify = require('./privateRoutes')
router.get('/', (req, res) => {
verify(req, res)
res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});
module.exports = router;
someone answer me please
a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with its codes
and how would that be? someone explain to me please I'm new to this
where are you doing res.status
codes
const JWT = require('jsonwebtoken');
require('dotenv').config()
const config = process.env
module.exports = function(res, req, next) {
const token = req.header('auth-token');
if (!token) res.status(401).send('Access Denied!');
try {
const verified = JWT.verify(token, config.secret);
res.user = verified;
} catch (e) {
res.status(400).send('Invalid token');
};
};
``` here woo
Yeah I figured that'd happen
line 13, in the catch blocc
they aaaaaaaaaaaaare?
we did it reddit
strange
its not saving the header
or something
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
```fuck
yeah, cant do that
you should authenticate BEFORE sending stuff
router.get('/', verify, (req, res) => {
res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});
isnt that what this is doing?
oh i know whats up
i like them, currently have two of their vps's
planning on getting a dedi from them eventually.
anyone use mongoose for db?

