#development
1 messages · Page 1603 of 1
yep
will this work?
try it
disable cloaking then
basically opens the website for u instead of redirecting
it puts the site inside a frame
the pro is that you'll see ur .tk url in the address
the con is that sites that block freenom domains won't work
but is there a away of making the sites.google.com says didi-web.tk
oh
the only way would be to have an actual domain
how would I verify www.didi-web.tk
nothing that's free is perfect
yeah, ik
yw
try namecheap
I was about to say that
.xyz is only a couple of pence
Namecheap offers cheap domain names with the most reliable service. Buy domain names with Namecheap and see why over 2 million customers trust us with over 10 million domains!
its £0.72 to register xyz
consider a shorter name
türk varmı
kk
mine was like
not as cheap as xyz
ok
oh ic 5 years at ...
why not just buy a .gay domain
why is .xyz so cheap
because .abc is the most expensive
/s
stupid slash cmds that don't let me be sarcastic
pls tell me what u looked
my own bot's domain ofc
Google sites 
im new
If only Google sites allowed you to add custom html and css
if you want a domain, use this: https://tld-list.com/
best place to find domains and compare prices
when I clicked 2 years it goes up to £5
if i set 1 year and auto renewal is it cheaper tahn
2 years and auto renewal?
1 year doesn't have auto renewal smh
idk lmao
a registrar?
russian domain
you see, domains are paid yearly
you can't auto-renew something you'll pay only once
which company are you buying from?
so it will charge every year?
not if u buy 1 year
oh
you guys pay for domains?
this post was made by the github free domains gang
i see
domains are renewed every year, and every renewal costs
so will I get charged the £30 or yearly costs?
so i can do 1 year, and it will cahrge me again
if you want to keep it, yes, you have to pay another year
first year has promotional price, second year onwards doesnt
regular price per year of .xyz is 8-11 usd
thats why i asked, which website are you buying from?
so I own it until I cancel?
exact pricing might not be up to date, but that gives you an idea of how much you're gonna pay in the second year
do keep in mind, however, that you're paying YEARLY not MONTHLY, so what might seem high is not at all
you do
domains are basically rented
so its the same as using freenom
ehh
no
i just borrow it
its the same everywhere
from what I can tell freenom still owns it and its just routed to your ip
so.. i own dank-didi.xyz if i pay yearly
Any of you guys got any idea of how to force a EOF error from a stream so im not sat waiting for minutes or hours waiting for the error to raise 
yes
thank you so much!
"please, stop, I can't take it no more"
------ cf8 software
Yo
i also gotta fix these loading times 
I got ubuntu and when i try to open steam
but the eof error happens in py or in js?
It gives me fatal error: steam needs to be online etc
js
Its when the player runs into a un-expected EOF and cant recover
alot of the times it can recover
but occasionally it cant and i need to reload the source, which tbh im not entirely sure how todo cuz the docs are not my best friend 
cf8 be like
im sticking to http://dank-didi.ml/ for now... and my BT router said 'Warning, this site may scam you'
probably
lack of SSL will get flagged by everything pretty much
Yes
okay
i think ive worked out how one sanely live reloads a video stream 
pause
unload
detach
destroy
create
attach
load

any other way to store objects besides JSON? compatible with ts?
A database?
or there's only writing an object in .ts
pretty much any database
use a database?
just use a database and typecast?
Lol
since I'm using a free DB, I don't want to store everything into it
yikes
then get a proper Database and store stuff in there
¯_(ツ)_/¯
then get money
get a job
Oop
xD
yk that DBs themselves are free right? (well, most dbs)
like, it's the host that's paid
facts for the fact command, itemlist for the shop, natures for the pets and which for the which command
ikr
🤔
json has literally -1% reasons to be used instead
yeah, sometimes I think if I should keep it like this
😱
well you can use json if it's static data
S.help
just keep using json then
if they'll be read-only then it's fine
😉 hehe I knew it
but I asked if there's anything like JSON that TS can read without an extra flag
just to know
if u want an alternative, then there're properties and CSV files
Excel 😩
properties are like
key=value
otherkey=othervalue
anotherkey=anothervalue
ohhey=there
.env database
nani
I don't have sensitive data, so maybe I don't need to go that far
is there a way to use redis asynchronously without promisifying everything by myself
async/await?
the only async redis package i found has wack typings
yea
surely anything network based JS is gonna be asyncronous already no?
redis is local and buffered
currently you have to use promisify for having it async
but its alright
could be worse tbh
also you could attach the redis stuff to promisify so you can just call the attached function for async stuff
any error?
for each dont respect async
ew forEach
oh yeah i finally did a benchmark with the 3 types of for loops
im never using forEach ever again
yo
when installing wavelink
it gives me an error "failed to build multidict yarl"
bros
i ned help
client.on("guildMemberAdd", async (guild, member) => {
const wch = new mdb.crearDB("WelcomeChannels")
const wchannel = wch.obtener(`${message.guild.id}`);
let embed = new MessageEmbed()
.setColor("GREEN")
.setAuthor(member.user.tag, member.user.displayAvatarURL()) // esta parte lo que hace es poner el nombre del usuario y imagen en la parte de arriba
.setImage('https://media.giphy.com/media/TKv4j0jA2IUfcLFCKl/giphy.gif') //el gif que quieras poner, yo te recuerdo que pongas uno de giphy
.setTitle(`Welcome to ${message.guild.name}`) // mensaje que pondra en el titulo puedes modificarlo , seria algo asi " bienvenido a discord ayuda"
.setDescription(`${member.user} Diviertete En El Servidor !`) // aqui es la parte de descripcion puedes modificarlo , es el mensaje que pondra en el embed puedes cambiarlo a tu gusto en este caso se veria asi "@usuarioqueentro diviertete en el servidor"
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, format: "png", size: 1024 })) // agarrara el url del mienbro en png en tamaño 1024 y lo pondra en la aprte superior
.setFooter("Now we are:", message.guild.memberCount) // puedes cambiarlo como gustes asta poner el id de que entro al grupo pero pues como dije las hare lo mas indentico a discord ayuda pero pues si quisiese poner el id de la persona solo cambialo a esto "Usuario: ' + member.user.id" si quisieras poner el tiempo de mensaje solo escribe debajo : .setTimestamp() *opcional*
client.channels.cache.get(wchannel).send(embed)
});
i dont know what happens
but the bot
doesn`t sends the message
when somebady joins
😔
you just copied this code?
._.
make sure the channel is cached
they are just notes from me
oh
ah
any ideas?
yes it is
then it should work, if the channel is cached. just for fun console.log your channel
(guild, member)? Im used to that just being (message)
not for this event
Its like that for my event 
only member is a thing, guild is not a thing
how would a memberAdd event even have a message object? lul
Mine does and it works 
;_;
I don't question the code
but like, there's no message involved
Pretty much lol
oh, we're talking about different stuff
Lol
Ah
i actually tried only with the channel id
and it doesnt works
yes, i know
Could be a issue with your db
is that i used other command
Try using the command you made to log the channel
Thats probably the issue then
😔
The main issue is one of 2 things 1. How its being fetched or 2. How its logged
Your actual code is fine
._.
Or another issue i missed since I have 1 braincell 
i started logging frequency of commands to my bot and noticed something interesting
😳
the most commonly run command is one that conflicts with mee6, and one of the most expensive commands in my bot
if i change the name of that command, i can massively cut down my resource usage
Rank cards?
yes
if i change !rank to !localrank, it wont conflict with mee6 any more
😳
Ezpz
i dunno how that might affect users that are already expecting it to be !rank though
Maybe a transition period?
tbh i would just leave it
set it to another prefix if ya dont want it to conflict™️
I solved it ready to go ;3
nice ghost ping
which had the ping on 
😔
how can i solve this
by showing your code?
show your code.
#commands message
there, that should do it
does anyone know why my topgg backgground isn't working anymore? It was working before, but it just stopped out of nowhere.
i cant just change the prefix of 70,000 or so servers that have decided they like !
that costs me a lot of image generation resources, not something i considered an issue when it only had like 1000
don't send screenshots, provide the code please.
Yeah but im saying it's their issue 
I think if it was that much of a conflict they would change it
const Discord = require('discord.js');
const config = require("./config.json");
const Enmap = require("enmap");
const get = require("get");
const client = new Discord.Client();
const db = require('quick.db');
const fs = require('fs');
client.config = config;
fs.readdir("./events/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
const event = require(`./events/${file}`);
let eventName = file.split(".")[0];
client.on(eventName, event.bind(null, client));
});
});
client.commands = new Enmap();
fs.readdir("./commands/info/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
if (!file.endsWith(".js")) return;
let props = require(`./commands/info/${file}`);
let commandName = file.split(".")[0];
console.log(`Attempting to load command ${commandName}`);
client.commands.set(commandName, props);
});
});
client.login(config.token);
no its my issue, because i have to provide the resources to render those rank card they users dont even want, theyre after mee6's rank card
Theory: in order to know when a user joins, you must have the GUILD_MEMBERS intent activated on the bot's page in the discord developer portal. Make sure that option is turned on.
its not insignificant.... its 59,000 rank card renders.
you are my hero
compared to nearly 20,000 start commands
<style>
body {
background-image: url(https://wallpaperaccess.com/full/1204217.jpg);
background-color:#FF0000;
}
</style>``` this is what i have on top.gg. It first worked and it most definitely showed a background. Then it stopped working out of nowhere *POOF* gone.
url(' ')
the preview does show the background tho
That isn't the right code. Your error specifically mentions guildDelete.js
nice hidden adversiting
if I put guildDelete, the bot won't work anymore
lol i can remove the name.
I just have a general question.
but anyways seems you edit white mode but view in dark mode ig
how do i check the inspector?
The next step is show us guildDelete.js, which is what was asked of you: show us the code.
deleted it just for you sweetie ❤️
@eternal osprey f12
kay kay, thanks
module.exports = (client, guild) => {
client.logger.cmd(`[GUILD LEAVE] ${guild.name} (${guild.id}) removed the bot.`);
// If the settings Enmap contains any guild overrides, remove them.
// No use keeping stale data!
if (client.settings.has(guild.id)) {
client.settings.delete(guild.id);
}
};
f12 or right click -> inspect
@unborn venture logger isn't defined
client.logger doesnt exist
yeah exactly
Stop shoveling random code into your bot and actually learn JavaScript to stop having those errors you don't understand and we can't solve for you.
Where did client.logger come from, I've seen it in random peoples code
Does anyone know how to get 10 documents with the highest value in a specific field from a mongoDB collection
Console.log is what he needs i think
random tutorials i guess
It's from something I wrote with a friend, "Guidebot", on github.
Ah
client.logger is a npm package right? Or am i being stupid.
no lol
No idea
owh nvm
Exactly the code they copied into their bot that doesn't have a client logger
No, that's not it, it's completely irrelevant, Awsome
idk i am just suggesting something
client.logger is something you assign to client yourself
it can be anything you want
client.logger = 10
What we should all be suggesting is that they learn javascript instead of just shoveling random code from random places in their bot's code
Client.logger = console.log
lol
very useful logger
logger maxima
btw i checked my inspector. It doesn't seem like it is overriding any images.
Is this just a bug or..?
Because i had the same image for like months
and it just disappeared without me doing anything.
dm your bot's page
If only 
will do!

google mongodb sort and limit
its being overridden by this
owh the preferred dark color?
i've disabled that
but still doesn't seem to be working tbh
also
the image you're linking is protected
they already do
they do
unless you're doing something wrong
the sharding manager in discord.js does auto restart them
Okey 2 problems now.
1: If i want to send the embed it doesnt send it
2: if I send a normal message the bot sends the message like 4 times.
pls help
Is your bot logged in 4 times?
How can I attach an embed and an image to a message?
The channel was logged multiple times
message.channel.send({embed: embed, files: [canvasResult()]}) is giving me an error
canvasResult() returns this: return new Discord.MessageAttachment(canvas.toBuffer(), 'result.png');
bruh but in the database there is only the channel once
it always happens to me that it sends the message like 4 times when i use async
😔
wtf the console logs
are you still with this issue?
😔
it is with me?
Is there a recomended size for the bots custome banner?
How do you even set the banner?
Ah
Then edit your bot and past the link in the custom banner field
Im trying for 30min to rescale my banner and it would look good it will always be off screen
like do i have to make it like 100x100 to fit or how small/big
I asked in support if anyone knows a recomended resolution and i got sent here
const target = message.mentions.users.first() || message.author;
const rawLeaderboard = await Levels.fetchLeaderboard(
message.guild.id,
message.guild.memberCount
);
const guildUserLevels = await Levels.computeLeaderboard(
message.client,
rawLeaderboard,
true
);
const user = guildUserLevels.filter(
(xpobj) => xpobj.userID === target.id
)[0];
const neededXp = Levels.xpFor(parseInt(user.level) + 1);
I need this for a rank command but everytime i run it on a big server it takes awhile to respond then it becomes normal, so basically once ran the command should be fine for a few minutes then it will have to process it all again. Is there i could get rid of all this slow process
How can i set the bot prefix costom in my bot
you can just do + (customizable)
is this like a library or something?
Is there a recomended size for the bots custome banner?
whats this Levels.fetchLeaderboard
Levels.computeLeaderboard
i see a fair number of banners being 128*128
Ok thank you !
It dosnt work
It looks like this
I started at like 1270x720 i think and if i lower down it just gets blurier
Oh it does work
Il try the original one too
the hd one
do you ever look at code you wrote the other day and wonder what crack you were smoking?
It does work
me?
couldnt be me 🙄
I ussualy dont look back at my code online if i need to update it or improve it
Like i think its a waste of time to revisit code if it works find with no error
can someone help me make a bot
im in the middle of a rewrite and i havent tested what i did the other day lol
This is not a bot making tutorial server
dam
If you need help please search soem tutorials on youtube/google
Here you can ask for help if you have any errors
ok
yeah it is a library
then its probably just a slow library
oh
They're still working on it
it actually is a package
So it'll be consistent
a package is a form of library
discord-xp, i just found it and set it up
well its probably just slow
you know a better one or should i remake one?
@wintry terrace to make a custom prefix you gotta code it
i mean, any database can do xp systems quite easily and quickly
using a library doesnt make a lot of sense.
+1
the way i use it?
they have a limit option in fetchLeaderboard
you are giving it no limit basically
this library is designed to work on smaller amounts of data at once
that's for the leaderboard command
if a guild has 100k members, it will take a while
const user = guildUserLevels.filter(
(xpobj) => xpobj.userID === target.id
)[0];
thats too late
wym
you already did this ```js
const rawLeaderboard = await Levels.fetchLeaderboard(
message.guild.id,
message.guild.memberCount
);
const guildUserLevels = await Levels.computeLeaderboard(
message.client,
rawLeaderboard,
true
);
you already fetched ALL members
oh right
limit = message.guild.memberCount
so yeah that's why i was asking if there is a way i could get rid of that
and then computeLeaderboard fetches the user from discord one by one
so if a guild has 100k, it will fetch 100k users, one by one
it will take ages
yeah
The bot doesn't want to send the text file, no matter what how hard I try
so that library is meant to be used in small amounts
for example fetchLeaderboard(id, 10) to get top 10
it already sorts them by xp for you
so i can't do a rank command with that library
you want a rank like, to show what is a single user's rank?
if my bot is in servers with too many members
yes
that's what i've been talking about the whole time
im pretty sure the library has a different function for that
const rawLeaderboard = await Levels.fetchLeaderboard(message.guild.id, 5);
if (rawLeaderboard.length < 1) return reply("Nobody's in leaderboard yet.");
const leaderboard = await Levels.computeLeaderboard(
client,
rawLeaderboard,
true
); // We process the leaderboard.
const lb = leaderboard.map(
(e) =>
``` i already sorted the leaderboard one
fetch(userId, guildId, fetchPosition = false)
thats the function for that
Levels.fetch(user, guild, true)
welp seems like i am using a outdated version
No errors?
should I give ppl extra xp when doing some actions like buying in the shop, using dailies and voting, and winning games?
btw my leveling is global
only that it cant find the file
but I tried a lot of dots and names
Have you tried `${__dirname}/runs/...`?
What's the actual error?
oh so it seems like i had a reason to fetch the whole data, i wanted to check the ranking of the user that's why i needed it
looks like you can just fetch the single user
can someone help me? I looked at some guides for making a voice bot but can't still do it, I only want to play 1 file when a command is issued but can't do it
just loged the user.position and it comes out as undefined
so yeah i can see the level and everything but i can't seem to get the position on the db since i am not feching it all
idk how to find its position without fetching the whole server members
hmm, so the db doesnt track that?
not sure if theres a way to add it to the library.
thats why there is a third parameter
I have a array object like:
messages:[{guildid: 11, count: 20},{guildid: 99, count: 30}]
``` How can I check if the array has the guild id 99, without a forloop?
anything you do will requure looping one way or another
but is there a smaller way? I do not want to use for lol
What would you use to check?
yes i was just working on that but i can't seem to get it to work
with .some() ?
nvm all i had to do is enable it
messages.find(x => x.guildid === 99)
or exactly the same thing with .some()
got this when trying to run my bot, got told to ask here. does anyone know what these errors mean?
idk im very tired so please excuse me haha
its something like asyncio\lib\base_events etc
which im not sure what that means
No, its when you try and login with your bot
is there any value named "intents" in the base client code
You could just call a .find(), but this is technically a for loop
@safe creek you need to enable this https://img.pyrocdn.com/e0xDhwO8
it worked before tho
on my test bot but now that i wanted it to work on my main
it just did that :/
ive activate the intents thingy
should i try starting it agsin?
yea
i have a leaderboard command
and it does not show the top 10, it shows the top 10 of the people that recently sent a message
make that opt-out, unless it is only per server
fs.writeFileSync(this.dir, JSON.stringify(mData, null, 2), (err) => {
if (err) throw err;
console.log('Saved file to' + this.dir);
})``` shouldnt it console log when this runs?
everything else works
the file writes and stuff
it just dont console log
how can it not log wtf
thats where im at
heres the file that came from if you wanna carve your eyeballs out
anyways imma go eat and do schoolwork
not sure what cmd is doing with all that ram
only a discord bot...
if i restart the ipc client instance, the dashboard gives errors asking to restart dashboard too
how can i fix this?
dpy
like have the dashboard reconnect with the ipc after i restart one of them?
when will you stop using a json db?
me?
god i remember my first db being a json file, was very very sad
@opal plank are you talking to me!?
hey
@drifting wedge
const n = require("../n.json");
const Discord = require("discord.js");
const human = require('humanize');
const client = new Discord.Client();
exports.run = (client, message, args) => {
let prestring = args[1]
if(prestring == "ban"){
const Embed1 = new Discord.RichEmbed()
.setColor("RANDOM")
.setTitle("Ban Help Command")
.setDescription("Usage: !ban <@user> <reason>")
.addField("This command will ban the selected user.")
.setFooter("AwsomeCord || Moderation")
message.channel.send(Embed1)
}
```why is this not giving any errors nor work?
OHHH
lol
oh
for fuck sakes bro don't fucking mock me
i dont know python exe
i am trying my fucking best right
you didnt read the docs before even doing it
just tell me once it's wrong and that's enough
yes i did
ofc i did, how else would i make a fucking bot
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:
- proper syntax
- debuging code
- basic features (vars, arrays, objects, functions)
- read and understand docs
- nodejs module system
As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.
Here are good resources to learn both Javascript and NodeJS:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/
Please take a couple of weeks/months to get acquainted with the language before trying to make bots!
youtube?
you know have an understanding of how objects or function parameters works
learn js before attemping to make a bot
you need the basics to do it
you're copy pasting from the internet without knowing what i does
learn it first
I made it myself
no cap.
tfw we are at a point people get offended when you tell them to educate themselves about something
I am definitely not getting offended by the fact that he is telling me to learn something
it is the fact how he states it
you still dont know js enough to be making a bot, all your dependencies are unecessary except Discord, and you dont know how functions work
this is not a friendly reminder/demand to learn something.
your intonation and wording implied it 🤷♂️
^^
Actually i do need them, i have more code at the bottom of the file.
I lear ed JS 2 years ago and dont remeber any of it lol.
like 70 lines
then you didn't learn it
sure, post it
I make a program that writes other programs
if you truly learn something, you don't forget it
And and multi code translator but I havent touched it in awhile
then its not 70 lines u dork
- comments
lmao
smh

dont use colors
require stuff at the top of your file for consistency
dont name your functions with retarded shit like runShit() if you plan to show this code to anyone (lmao, wtf million)
you could swap your function to be async so you dont do stuff like channel.join().then(connection => { this often, chaining thens, its mostly redability
i sure hope thats not ur token at the end
thats all i gotta say @crimson vapor
the rest isnt too bad
also if your TIME is hardcoded, why declare it?
run directly in the interval
maybe put ur functions in different files to make it index cleaner
also im not sure its a good idea to have this command open to everyone
cuz you are not checking for yourid
also is that ur token right there
ik
so anyone can start multiple of this
is that really your token
honestly I wasn't expecting so much
Hey is there any good documentation on prefix commands? My bot uses the Slash command, and I'd like to check that method out as well.
find out 😉
Fun fact java and JS are diffrent. JS original name was mocha
btw erwin, i gotta be honest... what i did was very wrong and stupid. I wasn't thinking clear. I ofc had to split it first, as args[1] just gets the first letter. Sorry!
wait i thought that java was the coffee
apology accepted
I assume the bot is only pinged when the prefix is used? Hopefully...
I prefer constants above imports
The icon yes, java do was always java
and yeah ik the standard of having imports above all else
uhhhh wdym prefix commands
ah
usually the format i have is imports above, functions below, then split the code into sections
Look it up! 😃
if I remember correctly though java can do more. Cause JS is web based but I may be wrong
Never said node was
js is for the web
but nodejs is a runtime
no
hmm for some reason the computer is forgetting my constant variables literally right after logging them i'm guessing thats bad
I dare someone to make a Mrs. Frizzle bot
And have it do random stuff that has to do with rhe show or random memes lol
Idk I'm just bored with no water
when i try to login on the discord bot / top.gg site it goes back to the main page but still says loging = i cant vote
can someone help me
what should I use instead of colors?
honestly it's up to you whether to use them or not
i personally use them to highlight my log level and some important information in the log message
I mean he said not to use colors, I assumed he meant the lib
ye
Ight stupid question. I made a bot (has no code dont hate me) awhile ago but it doesnt stay on 24/7 like I want. If it has to do with a server well what do I have to do. Or is it code?
a bot is a program
it only stays online while the program is running
bro I did it @quartz kindle https://million.is-a.computer/files/uoOOpDPgZZ2pUfK1.png
How do I keep it running forever
run the program forever
Ok
VPS's can run 24/7 without having your pc online forever
so can I
how to sleep deprivation 101
being a student is the easiest way to commit sleep deprivation
console.log(window.document.forms.length)
//returns 0
function validateForm() {
console.log(window.document.forms.length)
} // returns 1```
why does the number of forms change
Whats a VPS
virtual private server
Ah
a cheap way to host things
any ideas on my problem
Yes
are they running at different times?
techincally ones at the start of the load
and antoher is when i click a button
but nothign changes to the forms on the html page
so the form hasn't loaded yet?
ah
arguments on console log
im just guessing
you should do all interaction in the dom ready event
okay
any reason for this over colors?
does anyone know why my bot on topgg can't have a background?
not adding useless dependencies to your code that are 3 lines long?
I am using html to set a background but it just doesn't apply it, only in preview.
<style>
body {
background-image: url('https://i.pinimg.com/originals/3b/8a/d2/3b8ad2c7b1be2caf24321c852103598a.jpg');
}
</style>```
bro is-is-odd is the best /s
aight back to
it's just an example image*
not sure why that doesnt work, its typically done on body iirc.
but like, it doesn't save it now. It once worked for like months, then the image dipped out
yeah i read that..
what
But yeah, still it would be already nice to just put a background.
that answer menas you're not old enough to understand the meaning behind it
did they change markdown shit?
(moderation field used to be yellow and utility was green :/)
use apache if you want yellow
actually
yeah i think its apache
test
yeah, apache
+ diff is more
- huehuehue
# or md is also cool
or you can use hljs visualizer to test them all
https://pastebin.com/qmwXSjK4
code here
error here
: TypeError [INVALID_TYPE]: Supplied options is not an object.
options is not an object
reading do be hard sometimes
token leak 👀
?
my youtube key
INT eresting
capital D discord is just better
copy pasting code op 😄
why
- diff
``````scss
[scss]
``````fix
fix
``````less
less
``````yaml
yaml
``````makefile
makefile: ~
ghey
lmao
i like lua
ummm for diffenter styff
its all the same thing
you do know they are all the same right?
just named diffrently
actually im curious now
funfact
and yes, i know variables cant just be a number
im amazed that code even runs
but they want to have different ones, so they can chose which one they want to use :^) ```js
const one = 10;
const two = 10;
const three = 10;
i fixed that
all 11 errors?
lmao
yes
you're not understanding what erwin is showing, are you?
ok
i forgot to press the button
btw erwin, yarn v2 basically forces you to install typescript
its such bulshit
lmao
im using a host and i can only use 50.66 MB / 100 MB
ok i will fix
code blocks are language highlighters
you select the language you want to highlight
and it adjusts the colors accordingly
hi
i like lua
the syntax is like this basically:
```languagehere
code here
```
it higlights numbers, which is quite handy
like this
server: 30
each language has special rules for where and when to apply what colors
for example the md language colors blue all lines starting with #
something
#something
the diff language colors red all lines starting with a minus sign, and greenish all lines starting with a plus sign
when we share code snippets, we put them in the code's own language, so the snippet is easier to read
JavaScript
[nice]```
there is actually a ton of different stuff you can do
message.channel.send(confirmation).then(async msg => {
setTimeout(function(){msg.react('❎')}, 2500)
const cancelFilter = (reaction, user) => reaction.emoji.name === '❎' && user.id === message.author.id;
const cancel = msg.createReactionCollector(cancelFilter, {time: timeout})
cancel.on('collect', r => {
try{
msg.delete()
}catch{
return
}
})
})```
(node:9336) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message
msg is defined tho
i see
but i got other reaction that i wanna react so i need it to wait couple sec so that i don't hit the rate limit
but you're not waiting for it
you are reacting 2500 ms AFTER the rest of the code ran
setTimeout is a "set it and forget it" function
it doesnt wait around to see the result
hm
turn it into a promise if you wanna do that
also, you shouldnt be using a reaction collector for this
Linking in HTML: https://i.imgur.com/2M5SUG9.png
Formatting of external file: https://i.imgur.com/2M5SUG9.png
onclick: https://i.imgur.com/UiPQTpo.png
Getting that testWebhook() is undefined
then what am I supposed to use
msg.awaitReactions()
a collector is good for long term usage, for example "listen to all reactions for X amount of time and to Y for each reaction"
awaitReactions is better for "listen to this specific reaction then send a reply or do something"
okay I am using two reactions
where's the other one?
i just didn't show it in code
dont hide code when asking for help, otherwise you may get incomplete answers
we answer based on the code we see
No that wasn't my intention I just found it unnecessary to show all code and thought to keep it to minimum
message.channel.send(confirmation).then(async msg => {
msg.react('❎')
setTimeout(function(){msg.react('✅')}, 2000)
msg.awaitReactions('✅')
const proceedFilter = (reaction, user) => reaction.emoji.name === '✅' && user.id === message.author.id;
const cancelFilter = (reaction, user) => reaction.emoji.name === '❎' && user.id === message.author.id;
const proceed = msg.createReactionCollector(proceedFilter, {time: timeout})
const cancel = msg.createReactionCollector(cancelFilter, {time: timeout})
proceed.on('collect', r => {
//code
})
})
cancel.on('collect', r => {
msg.delete()
})
I already heard and know this is definitely not the efficient way to do it, but that is working for me
is that code supposed to listen for one answer only?
or can multiple people keep reacting and it will do different things?
i am trying to have it only one person and answer
then you're doing it the wrong way
a lot of that code is very redundant and unnecessary, if not completely broken

i just get rid of all reaction in proceed after doing something
that pretty much stops from other inputs
honestly don't see a problem in this except it's giving an error even though it's working
let msg = await message.channel.send(confirmation);
await msg.react(yes);
await msg.react(no);
let response = await msg.awaitReactions((r,u) => u.id === message.author.id && [yes, no].includes(r.emoji.name), {time:10000, max:1});
if(!response.size) {
did not respond
} else if(response.first().emoji.name === yes) {
proceed
} else {
await msg.delete()
}
(reaction,user)
oh okay thank you
async await is your friend
yeah 
Linking in HTML: https://i.imgur.com/2M5SUG9.png
Formatting of external file: https://i.imgur.com/2M5SUG9.png
onclick: https://i.imgur.com/UiPQTpo.png
anyone able to help?
make sure the function is in the global scope
and not behind some wrapper or onload event
I imported the file in the head
and the external file is just the plane function testWebhook() with a feq require()s at the top
is it live? can you dm link?
<link rel="text/javascript" href="../../../post.js">
<script> not <link>
<script src="myscripts.js"></script>
ah yes
<script src="main.css"></script>
ah yes, the negotiator
Hello, does anyone have a good handle on puppeteer here?
is anyone willing to give an example of how to make my bot send a message when someone votes my server?
there are examples on https://docs.top.gg
@quartz kindle whatcha think?
no there isn't
i'm asking how to have my bot SEND A MESSAGE when someone votes for my SERVER
python
it needs to be a bot
use a webhook
^
it needs to be a bot
it’s still a webhook?
it triggers multiple things in by bot's program, so it needs to be the bot
yes
webhook = some running server that can intercept a HTTP request



