#development
1 messages · Page 1146 of 1
Is it in .gitignore
Did you ignore it?
what's that?
Ok now
.gitignore basically ignores things you tell it to when commiting. Normally you remove config files, node_modules and some other stuff
@golden condor @ashen widget Is head bot dev in our team. please explain him the api thing
ya tell @golden condor
git remote add main <GitHub repo URL>
@ashen widget you can make a simple API with express
how to get repo url
@ashen widget you can make a simple API with express
@golden condor not experienced with express can you tell how or refer me to a vid
ok
any vid if you have
@golden condor nothing happend
I don't
git add.
No it has to have a space
do you want a folder or a specific file or all of it?
all
ok
You do a commit messsge
ok
git commit -m "message here"
message in ""?
now?
git push --set-upstream main master
git push --set-upstream main master -f
No problem!
You can't change commit names
can i remove it
i don't need it
i no longer use their example
i made my own code. If yes then how can i remove it
but is this somethig important?
Someone knows the problem? (discord.js v12)
is gitiginore important
let muterole = message.guild.roles.find(`name`, "Muted");
V11?
v12
guild.roles.cache...
Oh, thanks!
is gitiginore important
because it sayszychorp
#development message use this
let muterole = message.guild.roles.cache(`name`, "Muted");
It's .cache.find
guild.roles.cache.find()
No
async run(message, client, args) {
if (!
message.member.hasPermission('MANAGE_ROLES')) return message.channel.send("You dont have the permissions! You are missing the ``MANAGE_ROLES`` permissions");
let argsC = message.content.split(" ").slice(1);
let muterole = message.guild.roles.cache.find(`name`, "Muted");
if (!argsC[0]) {
return message.channel.send('Please mention someone');
}
const search = argsC.slice(0)[0];
let {
member
} = message;
if (message.mentions.members.size > 0) {
member = message.mentions.members.first();
} else if (search) {
member = client.findersUtil.findMember(message.guild, search);
if (member.size === 0) {
return message.channel.send(`❌ No members found \`${search}\`!`);
} else if (member.size === 1) {
member = member.first();
} else {
return message.channel.send(client.findersUtil.formatMembers(client, member));
}
};
if (member.hasPermission("MANAGE_GUILD")) return message.channel.send("Failed to mute the user! (Higher permissions)");
if (!muterole) {
try {
muterole = await message.guild.createRole({
name: "Muted",
color: 0xDF9C9D,
permissions: []
})
message.guild.channels.forEach(async (channel, id) => {
await channel.overwritePermissions(muterole, {
SEND_MESSAGES: false,
ADD_REACTIONS: false
});
});
} catch (e) {
console.log(e.stack);
}
};
if (member.roles.has(muterole.id)) return message.channel.send(`**${member.user.username}** is already mute`);
member.addRole(muterole.id)
.then(message.channel.send(`**${member.user.username}** has been mute.\nPlease see if the *Muted* role is greater than the role of the person you want to mute.`))
}
}
That's my code.
you didn't have to post the whole code
Oh
hm wait
What you need to look what's wrong?
what version are you on?
there's a lot of v11 code, refer https://discordjs.guide/additional-info/changes-in-v12.html on how to upgrade
we can't help much here
hey @golden condor i had a question if u don't mind
Ok
Yes
You can use a github webhooks which posts to your webserver on the vps
You can use a github webhooks which posts to your webserver on the vps
github has webhoook?
Yes
and callum
idk why
the github took name of my
user on pc and it says commit was made by it
but pc is of my bto
Yes it will do that because you haven't said a name
bro
uh
git config --global user.name "hey"
git config --global user.email "i-am@example.org"
That ^^
If you're using Github Desktop instead of Git CLI it probably won't work
ok
no i am not
and is github repo bad or good ?
since everyone can see my code u know
Your GitHub repository should be private then?
You can make a GitHub repository private
And if you don't want to use the Microsoft GitHub thing, you can make a private repository into your VPS directly
ok thnx :)
Github is nice with open source x)
but
x)
everyone can just copy paste my code ;;-;
<3 open source
everyone can just copy paste my code ;;-;
@delicate shore then make a private repo
Just make it super hard to read
yeh i did
lul
Just make it super hard to read
@golden condor lol how
Talent

No nobody can't read your code if it's a private repository?
What are you talking about
oo
Github is nice with open source x)
Discord is nice with their app
Gitlab is also a thing
it doesn't mean they respect or will continue to respect your privacy
ok
Bruh
Escape the emoji
And only the id for reactions

[x]
i wish i was a bot ;-;

i would have free nitro

Not really, it's just normal user accounts
yes

u can make tho kek
use that botclient.tk
bru
Umm
Not really, Mixer streamers were able to create global emotes
What does an async function do
until they closed it
Promise
async function ok () {
await doThat()
}
// same as
function ok () {
return new Promise((resolve, reject) => {
doThat()
.then(resolve)
.catch(reject)
})
}
@earnest phoenix ^
something like that
Thanks
On the ok function you aren't resolving or rejecting
?
I am
I thought resolve and reject are like callbacks. resolve('promise resolved') or reject('promise rejected')
They're
is there a way for me to send data from my backend script to my frontend one?
api?
@short siren i don't know if this example can help you
async function asyncBased () {
const reply = await message.channel.send('Hello world!')
}
// same as
function promiseBased () {
return new Promise((resolve, reject) => {
message.channel.send('Hello world!')
.then(reply => resolve(reply))
.catch(err => reject(err))
})
}
btw .then(reply => resolve(reply))
is the same as .then(resolve)
I don't have a really good example to give you
@pure lion use your api
ah yea okie
from backend to frontend
websockets are cool for that
But on the second one you're trying to resolve a promise that doesn't exist with .then
?
can i emit something
yes
UUUUUUUUUUUUUUUUUGH
it's also really easy to setup
i forgot how to set it up even though i literally made a webrtc app with it a few weeks ago
client:
const socket =io()
doc time
is this the right place to ask for a bot widget?
server:
const io = require('socket.io-server')(httpServer)
xD
bruh
.then is used to resolve s promise you are trying to use it a resolve a promise but that promise doesn't exist. You are supposed to say whether it gets resolved or rejected. Like...
function checkName(name) {
return new Promise ((resolve, reject) => {
if (name == "Connor") {
resolve('good name')
} else {
reject('bad name'(
}
})
}```js
dumb jquery question time: how do i get an elements attribute, like an inputs type, is it .attr()?
Ignore sloppy formatting tried to write on phone
Edjit?
@sick cloud .val() ?
edjit
wait yeah ok
val is the actual value
const express = require('express');
const app = express();
const socket = require('socket.io')(app)
```this a good server boi?
Danny you are creating a new promise but not returning anything
yea that worked
@short siren re-read my example.
- .then()
+ async/await
I have
ES 2020
It doesn't make sense
also no thats not real ty
@sick cloud what are you doing it looks cooooooooooooool
making the oauth2 dashboard for my website/platform
steal
:o

@pure lion ok
what is ok
that should work
cooool brb
https://waifu.pics/
I made a user contributed public API for image endpoints for discord bots
anyone can upload and all images are manually checked by a moderator

listen to server atleast lol
is
gotta add regenerate secret now mm
who is owner of
mee6
lmao it wont work
Bruh
no
It's in his app
if not im going to make one soon™️
genSalt
yes
I need to buy a tm
and passport will do
@pure lion are u have sadie added as friend?
no
passport is epic for auth
shoot
@pure lion it is but for my website not discord at all
ooooooooooo cool
i gonna spoil it
wait imma go check how the fok i did socket
so you can make bots on my own app, i guess
@sick cloud I have been working on an IDE since 3 years. It's a smart one for me, It just checks for the require blocks and auto-installls the packages.
Thats why I get alot of "package not found" errors
ok?
200 OK
What is your project centered around?
it's like an online Application simplifier or oauth2 setup guide or smth?
what is status code 522 :(
@earnest phoenix yea
:o
that's enough
Isn't a 522 a CloudFlare error?
I swear if its another discord bot list
Is it better to operate slice functions on a webhook link to get id or token or use nodefetch for it?
Bcs fetching works easily
You can slice into it
and tells the error
I mean I see no issues on doing that
@paper cliff Which is more efficient?
.split
ikik.
Fetching makes a request
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
```this is what i did
So I should use Slice if possible?
ur good to go
but i still got the error
yup
did you made changes to your nginx conf?
to include Upgrade, Connection header
and proxy http version 1.1
where?
to your nginx conf
createServer bruh
uh
ah
.Server is the same as .createServer literally
ok
so it doesn't matter
me old user rip
idk
you mean ratelimits for the api?
ask oliy 
i found taht for you @pure lion https://www.nginx.com/blog/websocket-nginx/
may be it can help you
taht
i did the same thing no error rip
@delicate shore I don't think there is a limit
okk
millions of bot x)
XD
lol
wait shit
it says something ig
:bigbrain:
;-;


I wish I could test my own bot.
I mean
sed
Why do you bother creating commands
your own bot ?
where you can pick some random things on the internet :')
x)
Just like the mods xD
find an open source bot, edit the name and voila
lol
Oof
nice
location / {
proxy_pass http://127.0.0.1:8080;
include nginxconfig.io/proxy.conf;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
```making better-dbl2 is hard uwu
yes
bot list omega
bo^2 list
express.post()
My bot dashboard is on my localhost 6767
why making socket for bot list
or Discord Boomer List

nginx: [emerg] "proxy_http_version" directive is duplicate in /etc/nginx/sites-enabled/ale-bot.xyz.conf:27
```fuck the what
@paper cliff I gotchu covered. Ferb, I know what we're gonna do today
why making socket for bot list
idk i want to get shit from mongoose and then display it at the frontend
:D
i cbf
frameworks are bad imo
Uhh, What's the issue? Use node?
node: server side javascript
Express can use it.
nothing is better
Express could throw it at the frontend
oof....
rip
location / {
proxy_pass http://127.0.0.1:8080;
include nginxconfig.io/proxy.conf;
proxy_http_version 1.1; <---- HERE
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
```making better-dbl2 is hard uwu
nginx: [emerg] "proxy_http_version" directive is duplicate in /etc/nginx/sites-enabled/ale-bot.xyz.conf:27
```fuck the what
I love nodejs for some reason, it's one of the only languages I like coding in, after Php
php is one language you need to know to get a job
wtf
Bcs nobody will hire you without it.
lol
or very few people will.
imagine getting a job using php
A real language people should learn to use instead of using php is Nim
fixed the nginx
cool edit
imagine getting a job using php
@paper cliff luke did lmao
Php is bad @pallid igloo
i feel like im missing something really stupid
No one hires you from php
who is luke
i am stuck
Hi
hello to you gentleman
HI i want help with VSC as i dont know how to start my bot their
can u help me with that
hm i have my code
sell your bot and earn millions of vbucks
you have the code, you now need the knowledge to run it
im having issues (code 522) on my website where its not loading the background and ive been told its a nginx error
location / {
proxy_pass http://127.0.0.1:8080;
include nginxconfig.io/proxy.conf;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
```it started having issues when i added a http server/socked.io to my server side script here:
```js
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
```it loads the rest of the page, just not the background image
comment out your socket part
mkay
in my index?
how do you copy text using a button
navigator.clipboard.writeText(String)
w e i r d
o?
php is alpha
just doesn't wanna work
change my mind
thats so weird
Access to the contents of the clipboard is gated behind the Permissions API
Well you need the permission
pag
i have ssl maybe its that
oh it fails if i dont have permission
Calls to the methods of the Clipboard object will not succeed if the user hasn't granted the needed permissions using the Permissions API and the "clipboard-read" or "clipboard-write" permission as appropriate.
yes and verify that navigator.clipboard is defined
in some browsers it's even disabled
so weird
idk
yep it works when i use it with permission given
yep it works when i use it with permission given
how gib perm?
just do msg.guild.me x)
thats so cool tho
@delicate shore that simply means the user is not connected to a voice channel
are you fucking serious
This version of discord.js is incompatible with discord. Please upgrade to V12.
move to v12
operable program or batch file.```
anyone hab fix to my issue
whats this
these errors gettin good
install node
my bot is not starting
operable program or batch file.```
did you insatalllllllllllllllllllllllllllllllllllllllll node
once you install node you have to reboot your terminal or ide also
read the v11->v12 migration doc
send the error
that's still unhelpful
and why don't you have syntax highlighting
Hi. I can't change the message via the discord api
HTTP/1.1 405 Method Not Allowed
what message
just read ^
ur using a wrong http method
it's probably a PATCH or a POST
channels/742678688079806536/messages/743024591328378973
I wonder...
OwO
@paper cliff thx
This channel lmao
lmaoooooooooo
that is the most retarded thing i have ever read
@pure lion can u come dms
lol
this channel is not for trolling
you can't sue them if you're in the USA btw
good.
btw, a bot needs to be 'hosted', it has to be connected to Discord 24/7 to receive and send messages
@sage estuary same
it's like a simple program
if you close your computer, the program is closed
stop trolling
wtf
low effort troll
just get out of here
Funny rofl moment 🤣🤣😂😂
@coral trellis
why am I replying to this guy
Put the bot inside of a box
its code from the web chill
ah shit
haha
its just some random github thing
lmao
@sage estuary is isn't a smart idea to send your token here at all, please reset it through the developer portal
It literally says
//Sample GitHub bot```
his making a fork
lol
xd
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}```
what to do
i installed node
@weak rain apparently that file is missing when called by the code
@sage estuary no
@weak rain apparently that file is missing when called by the code
@velvet bluff file is their bro
Just read: it's not
Is it in that exact location?
Or you specified the wrong path for the file
As I can see you’re searching the file in the drive labelled E
"E:\Thunder V2\server.js"
It’s an error in your code
hm
You’re searching in the path that 112batman specified
@sage estuary Look it up on internet, literal first result
dang it
Read the error

No
Can someone please ban this guy already
Are you even doing python
Then how tf would python code work
Can someone please ban this guy
@slender thistle :l

@sage estuary what language are you coding in
Javascript?
@sage estuary if you want help then actually use it and r e a d the errors and documentation
Wait am I allowed to send links here for the docs?
Yes
Ok
OwO
Admin Admin!
There is the docs
Java ≠ javascript
Well, java is different than JavaScript
A lot different
Javascript works with node.js, java works with the JDK
They’re not exactly the same
good morning, where do i add my bot?
Still not banned
he said he was elite hacker so i believed him
-faq 1 @split goblet
@split goblet
@split goblet Hi, you can check the faq
he said he was elite hacker so i believed him
Java and JavaScript are not the same
^
Guys seriously... Why are you even replying to that, isn't that obvious he's trolling af?

how 2 fix eesue
im having issues (code 522) on my website where its not loading the background and ive been told its a nginx error
location / { proxy_pass http://127.0.0.1:8080; include nginxconfig.io/proxy.conf; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } ```it started having issues when i added a http server/socked.io to my server side script here: ```js const express = require('express') const app = express() const server = require('http').Server(app) const io = require('socket.io')(server) ```it loads the rest of the page, just not the background image
unfortunately i am translating our conversation, could someone help me?
@split goblet Check the link above
@pure lion Disabling the upgrade header thing fix that?
okay brb
I'm from Brazil, I don't know how to speak English rssrsr, I'm still new to this developer business :)

stop replying to this guy pls omg
VS isn't for hosting bots
@split goblet Hey, did you check the link above?
@paper cliff hi how did you get the developer tag?
Its for coding
VS is an IDE, Integrated Development Environment. An IDE will only help you write proper code
@split goblet You get the developer badge if you have a verified bot
Never said that, you just need to install an interpreter/compiler for your language
stil not loading the bg
wut happend ?
i m unable to install quick.db on VSC
@paper cliff I do bots on my phone unfortunately I don't have a computer :( one more day I'll get it
on localhost?
nginx
@weak rain What OS?
location / {
proxy_pass http://127.0.0.1:8080;
include nginxconfig.io/proxy.conf;
# proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
windows
@pure lion Are you testing that locally or on a server?
You need to install visual studio build tools and some other dependencies, they have a guide on that linked on the npm page.
LoL
its saying unable to find python wtf
how ur banned ?
Compiling on Windows is such a pain in the ass
they said i was selfbot which is not true
where and show
@pure lion Send me the link of your website if you can please
I do bots on my phone unfortunately I don't have a computer :( one more day I'll get it@paper cliff
@split goblet That wasn't my question
its saying unable to find python wtf
Aye Misly I did, I usually try to reply whenever I'm actually able to do something
@weak rain Thats one of the deps, here is a guide for troubleshooting, and how to install the dependencies https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/troubleshooting.md
I'm not understanding anything, I'm not from the United States, I'm from Brazil so I have to keep translating :(@paper cliff
Once your bot is online and working, yes
@split goblet Use https://deepl.com/translator it seems to be better
Thank
well, i'm trying something in this developer world :) it will take my bot right
@paper cliff


@split goblet Good luck! If you want to add your bot on top.gg: https://top.gg/newbot
is there a way to share emojis across shards?
They're already shared
You can already use any emoji from any server (if you have your bot in it) in any server
yeah but my bot is stating unknown emoji when i try my help menu on another server in another shard
but working on my server
internal/modules/cjs/loader.js:1187
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\\?\E:\Thunder V2\node_modules\canvas\build\Release\canvas.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (E:\Thunder V2\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
E:\Thunder V2>```
const reactEmoji = ['742861599035097158', '742861156787552287', '742860390517440573', '❓', '👻']
const emoji = ['walletcoin', 'serverconfig', 'setuplogo', '❓', '👻']```
see
id and name
Yes you have to put something like that :<:walletcoin:742861599035097158>
it will be converted to your actual emoji
that's not the problem. The problem is that the emoji is not available on that other shard
You need both the emoji name & emoji
It is
I mean sure it's not in the bot cache
but it's usable
it works totally on the other shard
Just use the entire id:name format
Yes you have to put something like that :<:walletcoin:742861599035097158>
a for animated
bots cannot use emoji's from servers they aren't in. Apparently this also counts for shards
no a for non animated
This doesn't count for shards
As I said
just above
use the entire reference <:id:name>
so you're saying id's work if it's on the same shard, and "discord emoji language" works accross shards?
can someone help me
ids only literally fetch the emoji from your cache
I just cant install quick.db
the entire reference doesn't do that
message.channel.send(`My message < :partyblob:4985561956196>`)```
@nocturne grove ^
i hate discord formatting omg
@weak rain what's the error
its saying unable to find python wtf
hello i need some help something is wrong with my bot
then install python?
Did you check the documentation?
@paper cliff i tried
@weak rain and?
the entire reference doesn't do that
@paper cliff yeah but he wants to react with an emoji. Will that still work?
It should yes
Good morning guys, I just created my bot I wanted to help you how do I get the verification that is missing?
I cant find the problem
Like checking that I have the developer tag?
apparently
Yes
i watched youtube tutourials
youre dont know wat youre doing sooo
@hollow gulch U litterally do, That is a basic level issue.
youtube tutorials
plz no
@split goblet bot verification is another story
its not bc u created a bot that u have a badge
If you are following discord.js, Please refer to https://discordjs.guide/ It is maintained by the library devs and is the only up-to-date guide.
^
@split goblet To obtain the developer badge, your bot has to be in more than 75 servers
official guide > yt
ikr
Yes, how else did I get it? or need to boot the bot on multiple servers?@tight plinth
@split goblet You need to keep your bot online for atleast 12 hours/day and That bot needs a minimum of 75 guilds with atleast 14 non bot members each.
Got it thanks ae kkkk not wise it's going to be a long walk
@pallid igloo nope
your bot needs to be in 75 non-fake servers. fake=server you own/bot farms...
Oh.
there is no other requirement for now
@pallid igloo stop spreading false information everytime omgggggggggggg
Alr I'm sorry, I'll take a break from this server for a week.
you better
In fact, Some developers create server and fakes accounts to win just that tag :(
Uhh
how should i open Powershell with administrator
right click on windows button => powershell (administrator)
use cmd
its not opening in the folder i want to
@weak rain You can usecdor change directory in order to change where you want to go. Check withdirif that directory you wanna go is actually there or not.
Dir is for windows
LS for Linux and Max
So is cd
cd works in all 3 iirc.
@paper cliff tried your way still nope
u
;-;
s
@weak rain ngl your pfp make it looks like ur gay
@earnest phoenix what way I forgot
@delicate shore no
Guys my bot needs 12 hours online to appear the green ball?
mine I did now I'm also testing :)
@split goblet No, if it's online, you should see the green ball automatically
I'm using discord.py and I need my bot to be able to show how many guilds its on inside an embed.
How do I do that?
he's online just to stay with ???????@paper cliff
@split goblet ??????
@leaden rover Did you even read the documentation before asking that question?
??
Yes
@split goblet what?
I have this currently:
embed.add_field(name=":star: **Servers:**", value="`f'len{client.guilds}'`", inline=True)
wtf
Your syntax is incorrect
embed.add_field(name="⭐ Servers:", value=f"{len(client.guilds)}", inline=True)
Oh ok
len{}?
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});
This is the code from the docs, I wanted to ask What is the webhookAuth? Is that something like we set a password or on the lines of that?
:()
what do you use the top.gg api for?
does it have any specific cool features?
Vote tracking, Widget making, Servers, etc.
it's all about for the people with top.gg bots
right
Is it client.guilds ir bot.guilds?
whatever you defined your client as
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported```
if you're using those, you should use something else
if a package you're using is using those, then the package authors should update it to not use those
Guys i just have a question , i have just uploaded my discord bot in top.gg like 2 weeks ago and still it is not coming in the website
verification can take 3 weeks
Read the pins in #support @umbral pollen
Some1 knows how to make a logs vote of dbl?
In python
@earnest phoenix https://top.gg/api/docs#pylib
@earnest phoenix they will ping me ??
Hello everyone 
I have a .json with some information like that
{
"stats" :{
some datas
},
"monitors" :[
{
"id" : id,
"type" : 4
},
{
"id" : anotherID,
"type" : 3
}
]
}```
my question is : How to get the first elements or the second ?
I tried ```myfile.monitors[0].id``` but it returns me ```TypeError: Cannot read property '0' of undefined```
Can someone help me ?
my full api result is here
https://hastebin.com/ilaqugofux.json
@woven sundial that should work
it doesen't ...
its request for uptime robot api
then why are you requiring a file?
wait
can you show the whole code
or the bit where you fetch?
yep that'll be better lol
can u show that?
sure
exports.run = (client, message, args) => {
var Discord = require("discord.js");
var request = require("request");
var options = { method: 'POST',
url: 'https://api.uptimerobot.com/v2/getMonitors',
headers:
{ 'cache-control': 'no-cache',
'content-type': 'application/x-www-form-urlencoded' },
form: { api_key: 'MY-API-KEY', format: 'json', logs: '1' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
console.log(body[0].monitors)
});
};
No async await
yep I tried some things 😦



