#development
1 messages Β· Page 464 of 1
Literally this
}).then(rsp => {
[
"β
",
(find.permissionsOf(client.user.id).has("externalEmojis") ? ":RedTick:457860110056947712" : "β")
].concat(numbers).forEach(item => rsp.addReaction(item));
});```
hmm
What exactly are you reacting to?
mmk
its the same i sent you lol
and other people as well

When did you send that?
You even sent it yourself
Bruh
There's a difference
If you open your eyes
1 is 2 characters
1 is 1 character
btw this is how i got the one
\1β£
:one:
then pasted it from there
for some reason its different when you copy and paste it tho
just discord being weird i guess π€·
Ye
@bright spear isnt discord always weird
How are you currently sending?
What library?
discord.js
discord.js
lol
Ok
@remote tide how are you sending it currently
message.channel.send({embed: { color: FF0000, description: "Embed color"}}); isnt it?
hex in js is 0x + the hex code
yea
i do thi s currently http://prntscr.com/kjfeck
@remote tide that should work
i dont use rich embeds
it doesnt :((
ok 1 sec lemme see
oh
cyan isnt a valid color @remote tide
you can use one of those color names, a string with a hex code, or a decimal code
Do you guys use discord.js?
yes
why wouldn't an error/warning be thrown for an invalid color?
You could make a random color for embed color.. π
Dont you need 's
cool
for some reason it takes fff as blue but ffffff as white
Any way to generate silent PCM data to fill in silence for recordings?
and fyi @remote tide u can just do .setColor('ffffff') for white etc
Record to something such as PCM, save to file, convert to mp3 via ffmpeg
what is PCM
Audio codec
does coming soon mean adding soon or documented soon
@bright spear Says that, its implemented
voice receive?
you can
Stable: https://discord.js.org/#/docs/main/stable/class/VoiceReceiver
Master: https://discord.js.org/#/docs/main/master/class/VoiceReceiver
BIG DIFFERENCES 
theres just no good documnetation
I use master
i use stable
But yea, Any way to generate silent PCM data to fill in silence for recordings?
Hey can anyone give me a code that if i put in eval it tell number of bots in a server
m8 I usse not the public ios beta, but the developer beta
Hey can anyone give me a code that if i put in eval it tell number of bots in a server
Wanna know what I think the video thing is for?
docs
there are a few new commits tho
yeah @remote tide "client.users.size;client.token;"
banne

experiments tab
so bots will be able to do video shit now?
That would be interesting

Ive had this for like a month now
bots about to replace watch2gether&sync-video 
LOL
ikr
I have never seen that function
no idea what that is lol
Audio data
and do you use the experiments tab 
how would bots even "screen share"
Magic
what screen do they have
ffmpeg
lmfao
lol
so could you play youtube videos????
nope u get banne for that
Also only some canadians have this rn https://i.iderp.io/q1rqFHBz.png
music video bots whenβ’
oh the discord game store
its only for nitro users
yea
but the rest of us can just go to https://staging.discord.co or https://printer.discordapp.com
oh frick
wat
Ik
discordapp.com email 
but that url went to a yt vid recently
u need to think @remote tide obvs not
look at docs => "Client" => users property is a Collection => Collection has size property => put it all together
and
ez
^
._.
What usage are your bots on .js?
wdym
Like CPU/RAM usage
barely any if ur not autistic
any1 know a nsfw api?
wait
can i ask this here
danbooru/gelbooru

google 
i cant find
on google
all are nsfw identifiers
except neko
i dotn want neko
dont*
I need to make an api for nsfw, I have one which gets local files but its not really good
Try the HubTraffic api π°
Does anyone have an idea of what the average # of members of a guild there are?
Average #?
Number
Dont get it
50+ at least, in any of the servers im in, even in the small ones there are quite a few
Hes asking the average number of members in a guild
Thats not average.. Guilds like this one proof that
Yeah but there are many small guilds, thats why its 50 at least
its probably more 100 minimum
Can anybody help me dev a bot?
English
he means programming language
Programming language
O
X)
Lol java?
Ok
C++ is too much lol
Which api? i personnaly use javacord
Uh
jda or riot 
π
Uh javacord
Seems jda has a stronger community π
yea, i know more people that use jda instead of javacord
you should probably finish learning the basics before making your first bot
Ohh thats nice π°
Okay
thats really cool btw
time to quiz him with fizzbuzz
what exactly do you need help with
what are you stuck on in the first step
I cant even start up the bot
I cant do the detailed desc
Lemme make the new bot
Okay now
The dEtAiLeD dEsC
where are you getting your instructions from
this is not to create a bot
what
it is to add an already created bot on a bot list
https://medium.com/discord-bots/making-a-basic-discord-bot-with-java-834949008c2b this is a good guide on making a discord bot in java
then you should do it on your computer
I cant until me dad comes home
btw, you need to code it
do you know any programming languages?
Weird duuude
Did the set status code for discord.js change? it isn't working for me anymore
code: client.setActivity(`${res.body.title} by ${res.body.artist[0]}`)
hmm
@neat falcon it's supposed to be client.user.setActivity(name, { type: 0/1/2/3 });
oh
i tried it with name and type and it didn't set
oh wait
that was presence
nvm
still doesn't seem to work
Oh god a guy runs this js bot, and for the command to run (it creates an image) takes 20 seconds +
Wrong channel my dude
user.addRole("479774202782679041").catch(console.error);
It says "TypeError: Supplied parameter was neither a Role nor a Snowflake."
user is defined and the role ID is correct
Mhm are you certain?
Is user a GuidMember?
yes
Also, I'd try getting the role first, so you can check if it actually exists.
const role = <Message>.guild.roles.get(' i d ');
if (!role) return console.log('no role');
// add the role, etc
Ty @sick cloud
np
msg.member
well
since i am using PHP and not Python
i'm having to make an alternative script to pass with access tokens
Can someone help me create a bot that can be used to spam my server over and over again with a command
I've tried and it's not working
Here's what I have
thanks for the token
it is
yes it is
I deleted a few digits off the end
nah u didnt
So no, not token
just use a paste service
not even in code block
And you can try it but it won't work
what that guy said
Not a big deal
it is a big deal
come to my dms son
well hope your bot gets deleted 
Its my own server why does it matter
because you're spamming discord
spamming discord is bad
@last rampart your bot will get ratelimited like a motherfucker
does discord delete your bot if you hit the ratelimit too much π
actually what does happen
probs api banned idk
Why does it matter it's my bot on my server I can do with it what I want
it does matter
because you'll be banned from the API
because even if its your server
then no more bots
it matters because you're spamming discord's servers
its not like ur hosting your server
the messages go through the api layer
all requests will hit discord
also guys how do you get the size of keys in an object?
that or how do you make an object into a collection, idk
Object.keys(o).length
does anyone have any experience with using the firebase admin sdk in node.js with cloud firestore?
i keep getting Error: 7 PERMISSION_DENIED: Missing or insufficient permissions.
Need more info like what call are you trying to do in what structure with what permission setup etc.
did you set the service account and the json key?
yeah
const serviceAccount = require('../FIRESTOREACCESS.json')
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
})
const db = admin.firestore()```
i guess the account's permissions are wrong then
or they key is wrong
otherwise idk
stackoverflow says add the database url
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<DATABASE_NAME>.firebaseio.com"
});```
im not familiar with python, but either make the script run a new instance of itself and then quit, or have an external handler to restart it automatically or on exit code
where is the database url though
that seems just for the old "realtime database" not firestore
while seconds < 6000:
s = s + 1
time.sleep(1)
if seconds >= 6000:
s = 0
restart()```
maybe something like that
no idea, i havent actually used firebase
idk
i just want the bot to restart to update itself every so often
for DBL statistics
and not have to manually do it
can the script restart itself like that?
with restart()?
idk about python, but from what i know, a script cant restart itself without calling an external function to do it after it quits
@quartz kindle im in
We used discord applications
to make a bot you need to write code
or do we need to use the discord bot maker ?
^
pick a programming language
if you dont know any, chose one and start learning
good languages for starters are javascript and python
No special programs like the discord bot maker on steam?
honestly they are severely limited in what they can do, and they severely limit your own abilities as well
no good bot was ever made with the bot maker
ok so it would be better to make it from scratch?
yes
what would you recommend for mac?
technically you're not making anything totally from scratch, because there are countless libraries that you can use
such as a discord library which provides an easy to use programming interface to connect to discord
so there are many things that are already done and free for you to use
but you still need to write the bot logic from scratch
what it should do to messages and how to reply, etc
consider this an time investment into a new skill
what kind of skill would you be more interested in?
javascript is great for web programming, interfaces, apps, etc
python is more geared towards offline applications
there are countless other languages out there to chose from
i cant make that decision for you, although i myself work with javascript
The language you choose is down to personal preference
exactly
in case of no preference, chose something that has prominence in a field you would be interested in
Hello. Sorry if I'm interrupting something, but I've been wanting to make a bot that has a command to get the invite link to a random server, from discordbots.org/servers or anything else, and I was wondering if this is possible. I have experience with bots, so I don't need help with the bot itself, but just with fetching a random server invite.
probably but i cant think of an easy way to do it
use an api if one exists, else scrape the page
^
scraping the page would do it
just make a random ID generator and make it input a website link
and then get the HTML content of the tag for joining servers
But wouldn't that only get the invites from that page? So that you'd keep getting the same few invites.
not if you use a random number generator
http://discordbots.org/servers/<< insert random number here >>
and then get the HTML content
well, that way you're gonna get 404 99% of the time
π€
Yeah. π€
make a page checker function then
to check if it does not have keyword "404" in the HTML
then you can just make it re-make the random number again
and loop it until one is found
and then posts
It would have to make a ton of requests for each server.
you can do this
https://discordbots.org/search?q=RANDOMSEARCH&page=RANDOMPAGE
and pick one from that
Lol
make an empty search
the only true way to probably get a random server is by inputting a random number for the server
or a random character
it won't be random then
ik it sounds weird
but you have probably got to do it with numbers
of course there's still a risk of going out of bounds
the only hard part to it is going to check the HTML code for the discord server invite
i think
Ooh, that might work.
thats not hard
you'll have to obviously add some rules to it
Yeah, that's not hard.
you can get jquery for node and parse the html response into jquery objects
and use jquery to navigate it
lmao
finding a way to do it efficiently is a problem also
ew
well
it depends on what lang the bot is even in
to determine whether or not it can do some website check
there are html parsers for pretty much everything
its easier than using regex for example
but you can always stick with regex
im not talking about html parsers
Ew jquery.
im talking about the programming languaue the bot is in
I know how to get it from the page. I just didn't know how to get a random page.
make a random number generator
thats what im saying
it literally is that simple
It looks like the top servers goes up to 75.
there are html parsers for many programming languages
in python it is as simple as this:
import random
print(random.randint(0,100))```
just make it a variable
Well thank you guys. π
I know discordbots.org has an API. But that doesn't let you fetch servers I assume, right?
i found a way to get over 300 pages
https://discordbots.org/servers/search?q=%20&page=300
I know that Discord has an API to check guilds on discord
but you need to understand OAuth2 and searching with HTTP post requests
hello
this goes until 381 lol
https://discordbots.org/servers/search?q=a&page=381
what about the regular bots Tim
yes?
how many pages in the bots section?
ye
I'll make it get random bots too. π
free advertising :3
Lol.
how can i create a sub domain, for ex, i have something.net domain, how do i make img.something.net
Me and @viral meadow need help
i have a image uploading thing but i dunno how to open a subdomain
@gleaming glen just add a dns record for that subdomain
@gleaming glen me and @viral meadow need help
he answered me 
@outer niche and @viral meadow need help with the bot invite link in the developer portal
We cant get the bot to work in the server it keeps saying that you need a code grant
turn require code grant off in the application page in the dev portal
Ok
inb4 "why is my bot offline"
Got it working. Fetches a random server or a random server by query. π
It takes like 3-5 seconds, but will probably be faster on a VPS rather than my shiternet.
using API or scraping wtih cheerio or something?
Scraping.
hello all any good addond that corrects codes in visual code ?
idk
andbody that can help me with a problem please
you have to kinda do it yourself dude
ik it might be hard but you will get through it 
anyone know the function to set client username
What library?
@earnest phoenix what lib? mind you, you can set your bots username from the dev dashboard now, and also you can only change it twice an hour, be careful
you can set the nickname to null
but the bot can't set its own username since it doesn't have admin
I didn't think you need admin for changing username?
the bot doesn't have any perms
It just needs permission to change nickname 
change nickname
We have to wait a long time before the bot gets validated?
validated?
on the website
maybe scroll up?
yes, let them think it's a month
lol
You could probably get the average using the #logs
Shouldn't be more than 2 days actually
Wrong channel ay
##----EVENT ON MEMBER JOIN----##
async def on_member_join(self, member):
with open("../DSB_Files/welcome.json") as file:
weldict = json.load(file)
if str(member.guild.id) in weldict:
if member.guild.id == 475902932190101504:
await member.add_roles(id=475931350491332618, reason="Member joined us!")
channelID = int(weldict[str(member.guild.id)]["chID"])
channel = self.bot.get_channel(channelID)
msg = weldict[str(member.guild.id)]["msg"]
if "{USERNAME}" in msg:
msg = msg.replace("{USERNAME}", member.display_name)
if "{USERID}" in msg:
msg = msg.replace("{USERID}", str(member.id))
if "{MENTION}" in msg:
msg = msg.replace("{MENTION}", f"<@{member.id}>")
if "{SRVNAME}" in msg:
msg = msg.replace("{SRVNAME}", member.guild.name)
if "{SRVID}" in msg:
msg = msg.replace("{SRVID}", str(member.guild.id))
if "{SRVCOUNT}" in msg:
msg = msg.replace("{SRVCOUNT}", str(len(member.guild.members)))
embed_welcome = discord.Embed(title=f"Welcome to {member.guild.name}!", description=msg, color=0x00FF00)
embed_welcome.set_image(url=member.avatar_url)
embed_welcome.set_footer(text=f"You are our member #{len(member.guild.members)} !")
await channel.send(embed=embed_welcome)```
``add_roles`` - I don't know how to use it. It asks for an ID but when I give it one it rejects it, and it also doesn't have an "ID" argument.
Any Python experienced able to help me?
How do I get the role object? I just need to know how to get it.
role = discord.utils.get(member.guild.roles, id=45234534254523453)
np
So if I know java, would learning C, C# and C++ be easier?
Not really. Just the concept of Object Orientated programming
Ah okay.
how do I tell someone that the 2nd part is missing in a kick I've got the user but idk how to do the reason
if (!args[0]) return msg.channel.send("Hmmm, looks like you didn't tell me someone to kick!")
it didnt work
let member = msg.mentions.members.first();
let reason = msg.content.split(" ").slice(2).join(' ');
let mod = msg.author.username
let args = msg.content.split(" ").slice(1).join(' ');
if (!msg.member.hasPermission('KICK_MEMBERS')) return msg.channel.send(`You don't have permission to run this command!\nMissing Permissions: \`KICK_MEMBERS\``)
if (!msg.guild.me.hasPermission('KICK_MEMBERS')) return msg.channel.send(`I don't have permission to run this command!\nMissing Permissions: \`KICK_MEMBERS\``)
if (!args[0]) return msg.channel.send("Hmmm, looks like you didn't tell me someone to kick! Notice: Please make sure the bot is a higher role then the user you're trying to kick or it will not work!")
if (!args[1]) return msg.channel.send("Hmmm, looks like you didn't tell me a reason to kick that user! Notice: Please make sure the bot is a higher role then the user you're trying to kick or it will not work!")
member.kick(reason)
msg.channel.send(`Lewd hell kick!\nUser ${member}\nWas kicked for ${reason}\nBy moderator ${mod}`)
},```
yes @pale marsh
Oh
Replace it with if (!reason)
Also why did you join the array and assign it to args anyway?
my bot is weird like that i name some of the names I use are random af
ty @pale marsh
No problem
python
@sick cloud i got it
aaaaaaaaaa
file size is 100mb
dude
i'm losing my nmind
lol
How can I get a user object from a mention in JDA?
gl buddy
thanks
why would you use wav files, are you an audiophile?
if mp3-320/aac is not enough, at least go for flac
how do you make a bot use custom emojis
If you type a \ in front of the emoji name it will show it in it's raw form
which is better m4a or webm?
If you send that, and the bot has as server with the emoji, it will work if you just send that text
Isn't m4a for audio?
yeah
Webm is video too tho
well is there a way to do botwide emojis?
Technically I think Flac would be one of the best
i'm talking about audio tho
@sour perch Bot's have Nitro essentially
As long as the bot is in a server, it can use all of it's emotes
after effects it self doesnt support flac
how do i add an emoji then?
i need help downloading flac then
i read this, but i dont understand how to use it https://anidiots.guide/coding-guides/using-emojis#how-does-discord-js-store-emojis
If you are in a server with the bot, just add an emoji and type a \ in front of it
So
will look like !oliy
So you just send everything between <>
And you golden
Just curious, do you play from your own library or just get from YouTube
hm, ok thanks
like @quiet bobcat
yeah from the message object
Message#getMentionedUsers()
or actually from args
could use regex to extract user id and JDA#getUserById
JDA#getUserById(args[n].replaceAll("(?:<@!?)(\\d{17,21})(?:>)", "$1"))```
error handling ommitted
@quiet bobcat why people ignore me, is that because I'm wearing in blue?

@quasi marsh (sorry for tag if its bad) i looked into the emoji thing you explained earlier, and i dont get it to work, im making the bot send the emoji like you explained, but all it sends is the name of the emoji not the emoji itself
It needs to be in the server with the emoji
it is
It needs permission "Use external emojis"
...
How would i go by finding the first channel in a server/guild which my bot has the Send Messages permission?
Loop over guild.channels and check if you have permission to send message
how would i go by doing that 
try to send the message, catch if failed and move to the next channel
Or just check perms
var stop = false
guild.channels.forEach((channel)=>if(stop) return else if(can send message) send + stop = true
some pseudo code
guild.channels.find(channel => channel.permissionsFor(bot).has('send messages'))
what is this? it prevents my bot from starting. https://h.mayo.pw/tevapujena.js
help me please how do i donwload flac from youtube
youtube doesn't serve flacs
even if they did - like railrunner said, against their ToS
so what do they support?
webm , m4a
what about wav? can i download wave?
no AGAINST TOS
the format doesn't matter, it's against their ToS
we're not going to help you with something like that
please
what about those websites that give you a download to any youtube video with a link
those are against their ToS as well
anyways, this is getting offtopic
I'd suggest stopping before you get muted
@uncut slate what rule did i break?
1, 3 and 8
yt video download is against their tos
but everyone does it pretty much (not condoning at all)
we can't help you but youtube isn't going to take you to court for it
my web browser can download any media from a website
discord.js Okay this might be out of any kind of like possibility, but is there a way to make the bot like reread a json file instead of completely having to restart if that makes sense? almost like a mysql server i guess where its a live edit and it query's a new result instead of setting a, well, set result based on a file
delete require.cache[require.resolve('./file.js')]
part of how i reload a command
requiring at runtime is a horrible practice
so what all the people
thats all i have to do samurai
no they just break the tos and youtube doesn't do anything
streaming the files is grey area but technically against ToS as well - downloading them is something we absolutely do not condone
@night imp what would the worst thing happen?
the Earth would be hit be a meteor
all they would do is revoke your key
they wouldn't go out of the way to sue someone for having a discord bot that doesn't make money
What about https://www.npmjs.com/package/self-reload-json ?
think about it this way
yeah that's what Im saying rythm does it you should be fine
if you get it revoked then stop doing it
why use another npm module when you can just do it natively
we just won't help you
pretty much yea
"pretty much"
no need for a npm package if you can just use the piece of code i sent @slim heart
it didnt work samurai
here might be the actual problem i'm having. i checked my error monitoring:
SyntaxError: await is only valid in async function
1
at createScript (vm.js line 80 col 10)
2
at Object.runInThisContext (vm.js line 139 col 10)
3
at Module._compile (module.js line 616 col 28)
4
at Object.Module._extensions..js (module.js line 663 col 10)
5
at Module.load (module.js line 565 col 32)
6
at tryModuleLoad (module.js line 505 col 12)
7
at Function.Module._load (module.js line 497 col 3)
8
at Module.require (module.js line 596 col 17)
9
at require (internal/module.js line 11 col 18)
10
at files.forEach.file (/home/node/mini-me-stable/server.js line 32 col 19)
const event = require(`./events/${file}`)
I just used the npm package words perfectly
m4a audio only DASH audio 58k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 61.24MiB
webm audio only DASH audio 71k , opus @ 50k, 73.99MiB
webm audio only DASH audio 88k , opus @ 70k, 99.75MiB
webm audio only DASH audio 106k , vorbis@128k, 117.72MiB
m4a audio only DASH audio 138k , m4a_dash container, mp4a.40.2@128k (44100Hz), 163.54MiB
webm audio only DASH audio 165k , opus @160k, 191.39MiB
which is the best one?
Hmm can i create handler for help?
quality wise
./help/${file}.js
i care about quality
the last one has the highest bit rate
but idk about opus vs m4a compression
you might wanna google that
its not
and didnt get an answer
woah
you sure m4a = aac?
mmmm
o damn
Tim always saves the day
im just good at google
I'm good at bing Bong asking other people to google for me
How do I make the logo go up and down like that?
like equalzier and many more bots did
css magic
yes i know it's css
.bot-img img {
-webkit-animation: mover 1.5s infinite alternate;
animation: mover 1.5s infinite alternate;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}```
just check devtools
ty
oh looks like u need this too ```css
@-webkit-keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}
@keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}```
.bot-img {
box-shadow: none !important;
}
that doesn't work
oh this css #bot-details-page .bot-img { box-shadow: none !important; }
I just noticed that my bot has n/a for how many servers it is in on the website. Is there something code wise that i need to add to my bot?
you need to post your server count manually to DBLβs api
you can either check the API docs on the website or use the dblapi module
you can learn more about that in #topgg-api
Thanks!
Can i get some help with php?
And mysqli
For some reason I'm not being able to execute certain queries
I've googled the issue but none of the solutions work for me
I'm getting an sql syntax error
Sho query
$sql = "SELECT * from myTable WHERE name = $name;";
$name is a variable that fetches a url parameter
I did an echo($name) and it shows correctly
Mysqli says it's an sql syntax error
When i use numbers as a url parameter it works though
I think it has to do with space characters
use prepared statements
Do you think can could be the issue here?
sql is iffy with concatenating variables, it doesnt always work to put the variable directly in there
besides, prepared statements are pretty much a must, to avoid sql injection
Btw when i type in a single word it says "unknown column "name"
I'll check that then
idk about msqli since i use PDO, but it should be similar
I'm just using mysqli_query($conn, $sql)
example
Since I'm a newbie to php and mysqli
$stmt->bindParam(':firstname', $firstname);
$stmt->bindParam(':lastname', $lastname);
$stmt->bindParam(':email', $email);
$stmt->execute();```
Thanks I'll definitely check that out
I've been trying to fix this for almost an hour
what this does, is that it prevents the variable from tampering with the sql execution string
I'll probably read some documentation about it
if someone attempts sql injection, it will be treated strictly as a value and not modify the sql string into executing something arbitrary
from an sql standpoint yes
the php script itself can have extra protection as well by using filters
example
instead of $_GET['variable']
$var = filter_input(INPUT_GET, 'variable', FILTER_DEFAULT )
filter input has many filters to chose from, default being removing any potential dangerous characters
there are specific filters for other things
That's useful
example
$search_url = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_ENCODED);```
also validation filters, like FILTER_VALIDATE_EMAIL
which is extremely useful
Woah PHP
Scary
@earnest phoenix look into a module called cheerio
Correct me if I'm wrong but I think thats the name
@quartz kindle care to help? Modules are kinda ------ up.
Yes but it's a proven fact that the more modules you have the better the product is 
You don't need to censor yourself btw
@zealous veldt https://gyazo.com/0d2ab7b3dd7a10cb471ad81e1e02028f
if you already have an http module such as request, node-fetch, snekfetch, etc... use those
else use node-http
is there a way to keep our bot from crashing when it runs into errors?
@viscid falcon dont make it run into errors
The fuck?
thanks charles, that helps a lot
nah u can use a .catch(() => {
catching them or listening for the event @viscid falcon
there's no way to catch ALL errors, you need to have a catch function for everything that can result in an error
thats part of being a developer, catch errors over and over again until very few or none are left uncatched
and anyone know any good api for getting roasts?
google just gives me a bunch of stuff about a coffe one
process.on('uncaughtException'... And 'unhandledPromiseRejection'... And my amazing
@quartz kindle So how should I do it without a module?
Why are you requiring modules multiple times tho
it was a joke xd
O
Thank god lol
no u

sssss
@earnest phoenix basically what you need is
https.get('https://encrypted.google.com/', (res) => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('end', (d) => {
// d = response buffer
});```
Hmmm
actually, i dont even think you need on end
anyways just console.log res
and see what it contains
the body is somewhere in there
this should help you out
hnnn
```}).catch((err) => {return Promise.reject([BOT]: Proxy error.)});
^
TypeError: Cannot read property 'catch' of undefined
at Object.<anonymous> (C:\Users\charl\Desktop\robloxapi\index.js:9:3)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
Whats the issue? It works with my other errors.
whatever is before the catch is wrong
Wait wait
(node:14384) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
host: `178.128.239.65`,
port: `8080`
});```
its a proxy thingr
Same error, still no.
globalTunnel.initialize({
host: '178.128.239.65',
port: '8080'
});
then idk, check the docs for global tunnel
are you sure the error is on that line?
yes
oh i got it
i think
@quartz kindle How would I get page content with the thing you gave me earlier?
@quartz kindle I read it all the way through and have experimented for a bit
no mention of page text
So I have the css thing where the bot logo goes up and down
how do I make it so when it goes up it doesn't cut off
if that makes sense
probably overflow:visible;
SqliteError: database disk image is malformed
I feel stupid for asking this, but what's the URL for posting to the Discord API?
What are you trying to do?
https://discordapp.com/developers/docs/ Discord has documentation on the endpoints.
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Anyone here use discord.js-lavalink and/or lavalink/lavaplayer? I need some help, not sure if my issue is a lavaplayer or discord.js-lavalink problem. Getting no matches when using https://i.imgur.com/kmDLdgB.png https://i.imgur.com/DyR8uRl.png /loadtracks (ping me if you can help)
@earnest phoenix what do you mean?
the identifier should start with "ytsearch" or "scsearch" if you want to search youtube or soundcloud
oh, ok, thanks
π
<@&265158261945270273> sorry. My mistake. That was my code. "YOUR BOT WAS HACKED!!!" - that's from me.
Ooof
How do I fix my bot?
What is the problem with your bot
Doesn't run
Errors?
Just make a config file
Yes/
Then it is very easy
I'm also new to coding
Just make a json file with token as key and the token as value
Wait
My key is inside settings.






