#development
1 messages ยท Page 359 of 1
someone told me they are not needed so i stopped using them and it has still worked
jesus fucking christ
Oh lol i did miss rhat
The biggest error i see is that he doesnr know how to do config stuff
thats were its nerrowed down
I'm done, if you can't help yourself I can't help you
of course not
cause thats def, the deffinition of helping
if you cant help yourself then you cant be helped
Aeth
mhm
xD
Why not just leave
god
hang on, tweaking it real quick
editor desided to mess up and deleted some bits
const config = require("../config.json");
module.exports.run = (client, message, args) => {
if (config.ping == on) {
message.reply("**Pong!**")
} else if (config.ping == off) {
message.reply("this message is set to off")
}
}
module.exports.help = {
name: "ping"```
my ping command

The on in the config.json is inside "", right?
yes
That means it is a string
oh
so it should be a string when you are comparing them
Also, the () are optional, but you should use them because it makes your code easier to read
ok
that's a lie...
wait so in my json, they will not be a string?
No they're not
they're not optional.
weird, my code works normally both ways
It doesn't. Your code was just lying dormant in a file, un-used.
ive tested both ways before
You haven't.
yes i have xD
Seems like sometimes it does, sometimes it doesnt.
You should use them just to be safe
Okay, listen. I will literally give both of you $100 paypal if you can prove that parentheses around if conditions are optional in JavaScript.
ok, doing it rn
Oh, and if you can't prove it, you're getting banned :^)
Can I prove it for the lulz?
Aeth hold on there
Let me write my own JS interpretter
that's not JS anymore
Still JS to me ๐
@umbral eagle You're in too
Or wait hm
my code rn
I'll paypal you $100 if you can send me working code that has an if condition without parentheses, interpreted by Node.js v9.3.0
Mmm I can already smell the bans
const config = require("../config.json");
module.exports.run = (client, message, args) => {
let bob = "test";
if bob == "test" {
console.log("works")
}
module.exports.help = {
name: "ping"
}```
I wouldnt take the money
It never has. But, keep talking.
it always has, this is strange lol
if(true)
console.log("this does work :)");```
Come on lads! $100 paypal, right now, for what you said you could prove!
ready
Im wrong, but i wouldnt have taken your money anyway
Good, but I will gladly keep up my end of the bargain and ban all of you
oh wait, i shouldent run this withen a bot lo
im nto admiting cause ive done it before and it has worked
@umbral eagle Now, if you could please, for gods sake, convince those other 2 dumb shits that parentheses have ALWAYS been a requirement in JS.. that would be great.
was this updated or something lol
Nope.
K
hmm
@fleet epoch you're weong
imma talk to a friend that knows alot about js
doesnt work on jsfiddle
Aeth, I think they're too used to programming Lua they forgot how JavaScript works
Please do. Please have him tell you that it works and then split the $100 paypal @fleet epoch
@fleet epoch believe us, never worked
ok i have 2 friends talking to me rn about this
no imma keep fighting till i can proove myself wrong
I did
Actually no, @fleet epoch I will give each one of your friends $100 individually (so $300 for the lot of you) if any of you can prove to me that parens in if conditions are optional.
Inb4 typescript lol
Thats not how typescript works i know
Hm
this probably isn't the best place to get help on very basic js deni 
Lul
unb you're not gonna believe this shit, I am so fucking close to offing myself
jesus fuck

I dont understand why people volunteer for this
wait WTF
i code without parenthisis but i look in my old code and there are parenthisis
like this is magic
You don't.
someone haxed me
omfg so done
have you been doing 

this is soooo weird lol
TAKE THE L
@uncut slate doesternarycount?https://this-is.definitely-not-a-sketchy.host/6719b21573.png
Probably more than that tbh @umbral pelican
lul
@inner jewel absolutely not
okay
I'm gonna hurl
done
and all of my friends are saying yes its needed, ok i take the L nu banz plz
i'm writing it rn
@inner jewel You're not a valid entry, but I'd love to see what you're cooking up
Ban 
i thought i had something going, i guess not
also, remember, if statement to be taken literally, as in if <condition, with or without parens>
gg @uncut slate
let functions = [()=>console.log("true"), ()=>console.log("false")];
let cond = 1 + 1 == 2;
functions[cond && 0 || 1]();```
that's not an if statement
Banne
lol
-bots punchinglikes
@hollow zephyr
where did the other dude go though
what other dude
oh
Iโm at school rn
I'll give you $1k
What did aj do
he was one of the mouthbreathers who said parens were optional
@raven hawk $1000 dollars if you can prove that they are right now
No that was me I think
nah, he was in on it too
I read that on some stack overflow question
And I said it in here ONCE
Oh i c
Holy hell aeth just boosting up the prize higher everytime
so you're admitting you're wrong
Kek
Yes
@tawny lava literally doesn't matter because they can't prove me otherwise
Ye ik
I tried it in jsfiddle earlier and said in this chat that it didnโt work
the curly ones are optional
I will code you a discord library in brainfuck if you can make an entire js file without a semicolon
You don't need to add semicolons in js xdddd
turing completeness check
now give me my brainfuck discord lib
But dont you need a semicolon
not in js
no
js semicolons are always optional
For anything, you do not need to add a semicolon
Well fuck you too Sololearn
lol
well it's convention to always use semicolons
i'll make an assembly discord lib if someone gives me a compilable .java file which prints "Hello World" without semicolons and only subclassing Object, no interfaces
:^)
System.out.println("Hello World"); 
Ill give someone a dollar if they can code a discord bot using Alice
forgot the last part oops

is that all that would need to be fixed in my code?
probilly not
i learned js a year ago

looked like () and ""
public class Main {
public static void main(String[] args) {
try (java.io.BufferedWriter out = new java.io.BufferedWriter(System.out)) {
out.write("Hello, world!\n".getBytes());
out.flush();
} catch (Exception e) {
System.err.println("Hello, world!");
}
}
}
I cant go instantly code a python bot
ok back to the being jerks, i need to cooldown cya
10$ for whoever can give me a valid java class that can be loaded at runtime which doesn't subclass Object or call the parent constructor
:^)
hm
lol, just fixed my code
turned out, i am a fucking idiot
and it fucking worked
after all of this, it worked by adding 2 simple ""
my life
Not ur fault someone haxed u
tru
uhh
trump
???
tru
yes my bot workes now
i forgot
the fucking strings lol
that was a lot harder than it should have been lol
xD
why are you still trying
everyone is saying it wont so i trust it
vs $500
i have to get off my computer rn sadly or else i would
excuses
i will be on in an hour
i have a brother and he gets an hour, then i get another hour for the day
excusseesssssssss
Aeth if hes 9
im 13
Sure
thx for all the help guys not being sarcastic
no i just had a brainfuck moment
i should of known that it needed to be a string
brainfuck turned into $1k or ban
function ifTrue() {console.log("a")}
function ifFalse() {console.log("b")}
const condition = 1 == 2 - 1
const p = ["(", ")"]
eval(`if${p[0]}${condition}${p[1]}{ifTrue()}else{ifFalse()}`)```
You need parenthesis in that
the evaled string still ends up to have parens
Now
[~]ฮป node f.js
if(true){ifTrue()}else{ifFalse()}
If you set variables
condition && ifTrue() || ifFalse()
Thx for sparing me (on phone now BTW doing dishes)
I think you both win
How, I lost horribly
I meant the mods
@fleet epoch KEEP SCRUBBING (joking)
hi
im trying to change my username
in the discord bot list website
so the bot is searched under diff name
will this work? for the discord js library?
you can use the discord applications panel
you need to update the username via the REST api
using a lib/manually doing the http request
ya i just tried it in dev-bot
and the dev-bot username updated
in discord dev control panel
:)
but i duno if that will update the botlist site
It should
i guess ill find out when i deploy the production version
is the change instantaneous? do u know?
Not sure
are all user ids the same lenght? Please tag me with the answer
@undone plover 17-19
I would not put that in your code
Not future proof, at some point the ID length will increase (again)
I can't for the life of me, figure out what I'm doing wrong:
let NewHelp = global.HelpPages
let AlreadyListed = []
global.COMMANDS.forEach((CMD) => {
if (!AlreadyListed.includes(CMD.D.ID)) {
AlreadyListed.push(CMD.D.ID)
if (NewHelp[CMD.D.group] === undefined) return
let addedDesc = false
"global.HelpPages" is set when all the commands are loaded
i put it in a variable called "NewHelp" and add the commands dynamically to the pages with "NewHelp"
NewHelp[CMD.D.group].embed.description += `*${CMD.D.s_desc}*\n`; addedDesc = true
Yet for some reason I always end up changing the "global.HelpPages" ?????
And every time I execute the help command, the pages double in size and the commands are each added all over again.
http://nuttysu.cc/4e01โ1867?!?!?!
It's almost like "NewHelp" is turned global when I do this?
Am I missing something stupidly simple?
just check the mentions in a message?
@languid dragon uhhhh javascript variables are passed by reference
so when you do let NewHelp = global.HelpPages then NewHelp becomes a reference to the same object global.HelpPages is a reference to
How would I get a new instance of global.HelpPages?
do a deep copy
or actually let NewHelp = [...global.HelpPages]
a shallow copy should work just fine for what you're doing
so that will copy it into the new var?
wew i am n00b
thanks for your help my dude
anything to distract from this terrible hw
ur a legend 
i got memed on with my own fucking error reporter http://nuttysu.cc/112aโ1868?!?!?!
CRIES
@glossy sand ive appeared once more to distract u from ur terrible hw
henlo yes
that means HelpPages is not iterable
I can't really help you much more without some context
what is WRONG with you
is helppages not an array?
ya
i just assumed it was an array lol
check the code you're using to generate the help pages lol
well heres the thing
my command handler does this when the bot is started
global.HelpPages[CommandDirs[x]] = null
global.HelpPages[CommandDirs[x]] = {embed: {
color: 0x8D2151,
image: {
url: `http://nuttysu.cc/${CommandDirs[x]}-banner.png`
},
description: ''
}}
so every directory becomes a "HelpPages"
so like
HelpPages['dev']
would be a page etc
and then in the help command
it basically just adds to the description
you can probably just find an algo on npm because deep copy is annoying to implement
it's like
Insane
function deepCopy(o) {
if (Array.isArray(o)) {
return o.map(e => deepCopy(e));
} else if (typeof o === 'object') {
const r = {};
for (const key of Object.keys(o)) r[key] = deepCopy(o[key]);
return r;
}
return o;
}
that should probably work
I can think of a few edge cases where it wouldn't but you probably don't care about those
okay so
i found this example
that worked for me
also apparently Object.assign() does it now
but it didnt when i tried
apparently
var x = {myProp: "value"};
var y = Object.assign({}, x);
should work, but doesn't
HONESTLY LOL
well this works and im happy
and thanku for teaching me about these things
i had no idea you needed to do this holy shit
assume all properties are references and are passed by-reference
except numbers, strings, and booleans because fuck you
it probably seems like such an un-needed thing because of like the effort but
but i need it for the dynamic-ness of everything
because if the bot doesn't have appropriate permissions it does this
Object.assign doesn't work for you because it only creates a shallow copy
you need a deep copy
Object.create also doesn't create a deep copy
people = trash
if you don't need a deep copy and you're on the latest node
you can use the spread op
const sourceObject = { hi: 'bye' };
const copy = { ...sourceObject };
no we do need a deep copy
{
'thing1': 'dis meme1',
'thing2': 'dis meme2',
'thing3': 'dis meme3',
'thing4': 'dis meme4'
}
can i iterate this like an array
yes
what do you need it for
to deep copy
why do you need to deep copy
not alot
well
i have an object that is global
and i need a new instance of it because commands are shown dynamically
if the user doesn't have permissions it shows "you need blah blah to use this command" instead of showing the desc
also stringify and parse best hack hate me phanta
so in that case its generate each time the command is used
@glossy sand JSON stringify and parse is the fastest way, as it's implemented natively.
v8 (and consequently node) does runtime compilation of javascript code to machine code
so that deepcopy function is faster
might even be faster uncompiled for large objects
since it doesn't need to make an enormous string
and has less pressure on the GC
jit compilation op
Are there any alternatives to the Forever node module? I want a node module that just starts the js file whenever it crashes but I also want to see a log like I would with a regular startup without any node modules.
const { text } = await snek.get(`http://gettwitterid.com/?user_name=${args[0]}&submit=GET+USER+ID`);
const dom = new domParser().parseFromString(text);
console.log(dom.getElementsByClassName("profile_info"));
@gusty topaz that returns [ Node { namespace: null, text: undefined, _selfCloseTag: false } ]
wth is this...
ur mum
ok I went to the page
hold on
the thing is
on the page
wait
dom.getElementsByClassName("blah")[0]
try that
dom.getElementsByClassName("blah")[0].innerHTML
trying...
is this frontend stuff
There we go, that worked, time to regex that bitch
https://lets-go-on-a.date/images/1516200983.890842.png
@wispy schooner that on topic of regexing HTML
well, according to my regex, it can't find it
find <td><p>*</p></td>
got it
http://nuttysu.cc/99e4โ1911?!?!?!
would this be good for a "toggle" kinda colour
related to @proven cloud's colour theme
Yes
ty
is that a WEB DASHBOARD?
oh
Hello
I have a question
Can my bot use custom emojis from my server in other server?
Yes you can
xd

@quiet bobcat I cant use them in embeds wetf
you can
I using them in fields xD
use a \ before
I didn't know about it
I love this serverrrrrrr
Can someone help me please, YTDL how to make it so you can search for a song without using link? (Discord.js)
is there anything i can use which will work will YTDL?
i've checked YT there is nothing.
Hey! I need some help please ๐ฆ
Integrate YouTube videos and functionality into your website or application.
How will this help?
they must offer some api for searching videos
But how would i use it?
-_-
I know someone who just scrapes the page
yeah I wrote a music bot that just scrapes the search page
but that's a hacky solution
My bot stopped working since yesterday and I dont know why, it keeps reconnecting and not responding to commands or responding 10 mins later (if it does not restart first).. I did not make any changes in code.... Im working on Discord.py -- Anyone could help me please ;-; ???
https://developers.google.com/youtube/v3/docs/search/list this might interest you
@narrow flare I would run a profiler
how would i use this in my play command?
it sounds like a memory leak
@sinful oyster uhhhh poll it for search data then use the results to retrieve a video?
??
sorry im stupid.
@glossy sand My pc does not seems to be working NOTHING xD.. I will try to open the bot as a new one..
@sinful oyster do you have any idea what a restful api is
https://www.npmjs.com/package/youtube-search i got sent that in a diffrent discord.
and it has only 16 svs xD
kk its fine.
When you wish you could search google.com itself but Google fucks your ass if you try and scrape and their API is only 100 queries per day
Speaking of that I read a comment once where Google fucks you if you try and scrape data without accepting ToS/asking permission (not using API basically). But does Google scrape your website still when you put in a ToS that says they can't or even asked permission to scrape your site?
im having an issue with the bit
bot
for some reason theres a money cap on this one member in a server
and its not letting him deposit the money
does anyone know how to fix this???
What are you using to store the money?
Like are you using json files or a db?
Are you saving everyone's balance to a file?
yes
uhhhh hold on lemme see
cats or nsfw?
lmao
wait i think we fixed it
ok good
i use https://thecatapi.com
How can I make a eco system using a JSON
in js its easy
Nah
just put all of the players balance in an array
Making it automatic
Make a Cats nsfw bot
lol
Lol
then just do JSON.stringify(balances)
the write that to a file
and when you go to get the money, read the file and do JSON.parse(data)
Does anyone know if there is a way to have someone host a bot 24/7?
Im currently using aws free tier, but thats only for a year
if it's in JS, use glitch: https://glitch.com
(its free)
@bright spear should i trust it
its made by the company that made Trello
Oj
anyone know why this wont work?
function play(guild, song) {
const serverQueue = queue.get(guild.id)
console.log(serverQueue.songs)
bot.player.join(guild.id, message.member.voiceChannel.id).then(async player => {
message.channel.send(song.title, { code: "json" });
await player.play(song.track, { region: message.guild.region });
player.on("end", async (data) => {
if(data.reason && data.reason === 'REPLACED') return;
serverQueue.songs.shift();
console.log(serverQueue.songs)
play(message.guild, serverQueue.songs[0]);
});
}).catch(console.log);
}
}
it shifts the song but doesnt play it
btw im using lavalink.js
I tried to get help with this code before, I updated my libs and checked it plays before leaving, but every now and then when you use one of my soundboard commands the bot joins and leaves instantly. Here is an example of my code:
// Voice only works in guilds, if the message does not come from a guild,
// we ignore it
if (!message.guild) return;
var voiceChannel = message.member.voiceChannel;
if (message.content === (prefix + ' reee')) {
// Only try to join the sender's voice channel if they are in one themselves
if (voiceChannel) {
voiceChannel.join()
.then(connection => { // Connection is an instance of VoiceConnection
const dispatcher = connection.playFile('./sound/reee.mp3');
dispatcher.on('end', () => {
voiceChannel.leave()
});
})
.catch(console.log);
} else {
message.reply('REEEee y0u n33d t0 b3 1n a v0ice ch4nnel f1rst!1!!11 :alien:');
}
}
});```
I have no clue why its doing this ;/
my DiscordBotsLists api works now but i get this
2018-01-18T05:41:00.588238+00:00 app[worker.1]: Unclosed connection
2018-01-18T05:41:00.588246+00:00 app[worker.1]: client_connection: Connection<('discordbots.org', 443, True)>
2018-01-18T05:41:00.588511+00:00 app[worker.1]: Unclosed response
2018-01-18T05:41:00.588514+00:00 app[worker.1]: client_response: <ClientResponse(https://discordbots.org/api/bots/396464677032427530/stats) [200 OK]>
2018-01-18T05:41:00.588525+00:00 app[worker.1]: <CIMultiDictProxy('Date': 'Thu, 18 Jan 2018 05:39:59 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '2', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=d293441a3c0d6867beabeea5e3cf571531516253998; expires=Fri, 18-Jan-19 05:39:58 GMT; path=/; domain=.discordbots.org; HttpOnly; Secure', 'X-Powered-By': 'Express', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Authorization', 'Etag': 'W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"', 'X-Varnish': '114952669', 'Age': '0', 'Via': '1.1 varnish-v4', 'Accept-Ranges': 'bytes', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'Expect-Ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Server': 'cloudflare', 'Cf-Ray': '3def37854c785711-IAD')>
tell me if you want to see code
H E R O K U
lol WIX
thats not even an error
My bot pms users the help documents, how can I send the help to the channel the command is run in if the users pms are closed? (using discord.js)
msg.author.send(help).catch(e=>msg.channel.send(help))
thanks
What is this?
And I don't think that's code so if you want to chat go to #general.
Yes
Go to #general to talk.
#general is English
Any languages in #memes-and-media
Ok.
I speak mortal and cat
hey guys, where can i get list of all the id of the emojis
what emojis? ๐
โ โ
\โ
\โ
http://nuttysu.cc/17faโ2003?!?!?!
these kind of emojis dont have ID's and dont need them
\โ
i want to check whenever someone react with them
if (reaction.emoji.id === "391613511022936067") // do something
if (reaction.emoji.name === "") // do something
if (reaction.emoji.name === "โ
") // do something
Assuming you use D.js
ok thanks
if (reaction.emoji.name === "โ
")
doesn't work
error?
client.on("messageReactionAdd", (msgReaction,user)=>{
if(msgReaction.message.author.id===client.user.id) {
sql.get(`SELECT * FROM users WHERE userId ="${user.id}"`).then(row => {
if (!row) sql.run("INSERT INTO users (userId, level, exp, commands) VALUES (?, ?, ?, ?)", [user.id, 1, 0, "on"]);
}).catch(() => {
console.error;
sql.run("CREATE TABLE IF NOT EXISTS users (userId TEXT, level INTEGER, exp INTEGER, commands TEXT)").then(() => {
sql.run("INSERT INTO users (userId, level, exp, commands) VALUES (?, ?, ?, ?)", [user.id, 1, 0, "on"]);
});
});
if(msgReaction.emoji==="โ
") {
sql.get(`SELECT * FROM users WHERE userId ="${user.id}"`).then(row => {
if(row.commands==="off"){
row.commands = "on";
msg.reply("you've enabled to use commands to disable them use :negative_squared_cross_mark:");
}
});
} else if(msgReaction.emoji==="โ") {
sql.get(`SELECT * FROM users WHERE userId ="${user.id}"`).then(row => {
if(row.commands==="on"){
row.commands = "off";
msg.reply("you've disabled to use commands to ensable them use :white_check_mark:");
}
});
}
}
});```
this is the code, nothing i tried worked
define "didn't work"
also, use prepared statements
also, you need to actually write the entry again
also, just console.error; doesn't do anything
i mean whenever i react with โ orโ it doesn't reply or changes the row.commands
you can't just reassign the variable, that doesn't do anything
you need to resave entry
?
?
?
what do you mean resave entry?
you okay hun 
โ
Nope, am broken, pls fix
Heh?
JDA utilities is not working for me
I copied the example bot to build off of it but all I get is this
Exception in thread "main" java.lang.NoSuchMethodError: net.dv8tion.jda.core.entities.Game.playing(Ljava/lang/String;)Lnet/dv8tion/jda/core/entities/Game;
at com.jagrosh.jdautilities.commandclient.CommandClientBuilder.<init>(CommandClientBuilder.java:40)
at super.secret.project.Main.main(Main.java:36)
update jda
I have the latest
dependencies {
compile 'net.dv8tion:JDA:3.1.1_212'
compile 'com.sedmelluq:lavaplayer:1.2.42'
compile 'com.jagrosh:JDA-Utilities:1.9'
}
from my build.gradle
oh
3.5.0_328
hold on
ill let gradle do its thing
now its crying about this
I removed the line
now it does tihs on runtime
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoSuchMethodError: net.dv8tion.jda.core.entities.Game.of(Ljava/lang/String;)Lnet/dv8tion/jda/core/entities/Game;
at com.jagrosh.jdautilities.commandclient.CommandClientBuilder.useDefaultGame(CommandClientBuilder.java:335)
at super.secret.bot.Main.main(Main.java:39)
Game.playing
.setGame(Game.playing("loading..."));
ok
@glossy sand found this nice thing http://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/
might help you
might not
UnhandledPromiseRejectionWarning
when I am trying to post the server count
any ideas?
you should also get a second error that bubbled into the promise rejection
that's what's important
Ok
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Too Many Requests
@glossy sand
why tho?
too many requests~
Because it's an unstable system that can spike high event throughput
Which can coincidentally
Hit a ratelimit
?
what is the ratelimit?
10 requests per minute
Use a background async loop to update your stuff
imo I update every 15 minutes in the background.
I like to think of it as a third-party service that just has information regarding the bot and doesn't need the most absolute up to date info
Even the profile picture is cached on the website which means it's not always up to date
wait, I waited over 20minutes
And still the same error
I had problem that the bot updated it every 0.001 seconds lol but it was just for 30 minutes
which is a lot of requests
but when I will be able to post my server count again?
1 hour ban if you ratelimit
1 hour ban, alright
wait, ban.. is that like serious thing?
ok it's more like cooldown
It's a ban
I guess you could call it a cooldown
But it's a straight up ban that all your requests are dropped until the timeout
mhm
I need help with pm2
How to close client from discord.py ( client.close() and client.logout() doesn't work at all ) i know i can exit() but that's not clean at all x)
I need help to keep my bot online
Nice thank you ๐
Means exit was successful
I think he wants to destroy the client instance
like in discord.js you have client.destroy()
which logs ya out
Oh, I thought he wanted to turn off the bot
I wanted to keep my bot online
i have "delete_server()" but i don't think so ๐ค
Not offline
do you have a server
No
That's why
i want to stop the executable file
Should i create one
Cause i run it as subprocess
You have to keep your computer open with the console open to keep it running
he is on a server
i want him to close it clean
i run himself a subprocess to kill him ?
Maybe
if i use SIGTERM he will not turn off
and i don't want to use SIGKILL
That's all the point x)
i try exit(1) maybe exit make the errors and skip exit coroutine
Note if someone have the same problem : Doesn't work i will post the solution here when i get it
Ok
My bot randomly keeps crashing with the following error, even when no one is using it.
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 104.24.120.234:433
at Object._errnoException (util.js:1003:13)
at _exceptionWithHostPort (util.js:1024:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1194:14)```
how can i add reactions for next page?
I dont know which statement causes it though
it just randomly comes up and crashes the bot every 5 mins
what lib?
discordie
ahh yea
connect ETIMEDOUT 104.24.120.234:433
discordie is severely outdated
failed to connect to discord
ah ok
but that's purely your internet
or cloudflare being stupid
What program is going to help me with my problem?
I mean it's an outdated lib
?
what problem
Keeping my bot online
so it becomes online and dies?
so it doesn't come online at all?
No
Does it just stops after a couple of hours? Or do you need somewhere to host it?
the code needs to run 24/7
What
you've already been told that this is just a connection problem
Visual Studio Code
Oh
Visual Studio has a lot of programs/add-ons that have a high price though VS Code is free
Found it
Ik now
Just got tor, time to visit the deep web
No
Yes
No
no
i need help with the owner format
?
owner format??
bruh nvm i got it
me too
nah im good just need to make commands
why won't you just say what it is .-.
i goofed
..
idk were i made commands i fell dumb rn
i'm gonna leave this because maybe you don't even unerstand english ยฏ_(ใ)_/ยฏ
yep under 15 years old
๐

lol
how old are you ?
hm?
.. how old are you?
4.47 billion years old
@left fractal
under age of 20
@left fractal ^
13
tf are y'all doing
:/
don't pressure people into revealing personal info
Licking
ik
also this doesn't belong in #development
this why im not sayin the trueth
hey guys, gonna use the twitch api for my bot, when i come to make an app to get a client id what do i do here?
bit confusing
Enter a redirect uri
can i put my bots website?
no
OAuth Redirect URI has nothing to do with OAuth Invite or bot website.
Google "oauth simplified" to learn more about OAuth 2.0.
GET /api/bots/33165156313/votes will return a array ? or no
yes, it'll return an array of objects
@buoyant veldt http://localhost
ok
SOMEBODY SAID ERIS
How do I make it so every file in /commands gets registered
Wdym
you can use fs to list files in the /commands directory then require them
is there a way to "auto shrink" text? like from an api i'm using it gives me this block of text, but it won't add to an embeds desc since its too large. is it possible to do something to make it end with ... if it hits say, 112 chars
so it'd be [text until 112 chars]... or something
(using discord.js)
thanks
"An idiot's guide" is a good place to start
^^^^
your library should have some provision for retrieving a user by id
dude
Deni
look at the Documentation
im sick of directing you to the D.js docs every 5 seconds
its not hard
lmao ken
LOL
How do i make it send a message of what they said but take of the prefix in a DM
'dm': (msg) => {
msg.author.send(``);```
I don't know Javascript that well but I assume it has a string replace function
string.replace(old, new)
@scenic crest what is it called again,virtual arts studio?
Visual Studio Code
f
not f
oh hi
Development.
Development
development
development
agreed
code thing
please have some meaningful discussions going on here 
hmm, I added the code pinned in #312614469819826177 to the ready event, but it didn't seem to work, it didnt log updated stats or something went wrong
d.js 12
its the same thing thats pinned there
hm
and something after that code did run
did you add your bot auth token
yes
not your user auth token
yeah
are there any errors
nope
"https://discordbots.org/api/bots/" + bot.user.id + "/stats"
should be like that
its missing the bot id part I think
oh, it didnt say that
i dont think the bot id is needed
let me try with the id
checklist:
- POST
- https://discordbots.org/api/bots/stats
- not using your user token, use the per-bot tokens which you can get on the edit bot/api docs page
- posting valid json
- token in the Authorization header
pin
still didnt seem to work
should pin in #312614469819826177


<- this has an id