#development
1 messages · Page 1644 of 1
wat
that confused me
Download the HTML...file?
With ftp client?
Are we talking about a bot or...?
like a backup
Backup of a site?
I'm talking about the backup of mine bot site
a working bot, that does something?
yes
And it do work?
imagine making your bot do something
other than be online
imagine making your bot online
yes
You reek of string concentration
Help with?
rainbows
Rainbows have surrogate pairs
dont ask
and i cant do nothin abt that?
<meta charset="utf8">
put it into the head tag
thanksssss
thats the codification method. then you can include letters like á, é, í, ó, ú without problems
its generally better to upload to pastebin, or hastebin. most users wont download a text file
how do I save this
there's an error
client.on('guildMemberRemove', async member => {
member.guild.members.cache.filter(s => db.fetch(`serverData.${member.guild.id}.botsData.${s.id}`)).forEach(x => {
let bot = db.fetch(`serverData.${member.guild.id}.botsData.${x.id}`);
if(bot){
if(bot.owner == member.id){
member.guild.members.cache.get(x).ban({reason: "Leave."})
db.set(`serverData.${member.guild.id}.botsData.${x}.status`, "Reddedildi")
db.set(`serverData.${member.guild.id}.botsData.${x}.redReason`, "Leave.")
}
}
})
})
(node:6576) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ban' of undefined
how can i solve the problem
member doesn’t exist
I want it to be automatically banned when it leaves the server, but
ive seen this code before 👀
is there a reason your dont just ban the user directly?
member.ban()
rather than
member.guild.members.cache.get(x).ban({reason: "Leave."})
will be banned for leaving the server
thats not what im saying
(node:6636) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ban' of undefined
pls rich
why are you fetching a member, when you already have the member
we are pogging
I mean it will be banned when my server enters and then exits
okay
?
i am not talking about that one bit
i am talking about in your ban code, why are you not doing it directly
I'm sorry I don't speak English very much. I don't know how to explain
if u want to ban the member when they leave just do member.ban()
no need to fetch
I don't want it to ban every member, I just want members on db
wdym
then check if they are in the database, and ban them using member.ban if they are
you cannot get member from cache since they are banned
The bot checks if the person coming out is on db, but
Okay so I'm doing this silly little ''Guess the movie'' game for friends and I've been stuck for quite some time now. This is my first bot and I'm not that experienced with Python, but I really want to do it.
When the movie is selected, the variable ''title'' is changed to all the different names of the movie. Then, it sends a screencap, waits a few secs, sends a hint, a screencap, etc and then reveals the title of the game. All of this works.
But when I input an ''if any(word in msg for word in title):'' and a lil ''you won'', it completly ignores it. No error message, nothing. It continues with the screencaps and acts as if nothing happened. I'm a little confused and would appreciate if anyone had an idea?
each instance of someone using a swear word should create a record in the database. then when you want to know the swear count you count the records. if you want to see how many times user x swore you count the number of records with user x.
Would you mind posting the code for this?
it might look simple, but that's quite complex code-wise
does anyone do js and uses a instagram search?
like, as with most stuff in programmin, concept is always easier
https://cdn.discordapp.com/attachments/432965481486483457/819343116750291004/unknown.png
it never searches for the acc 😦
https://srcb.in/G7NOkVGrii
thats the code^
nothing logs in the console btw
something only logs if i put a @ before the ig acc name

you sure you're using the api correctly?
mhm
you're not
you're fetching the html site and then trying to convert it to json
which is what the error would tell you... if you logged it
thats how it works right
oh
damn bro thats cool
k just got an error
at Message.delete (/home/runner/economy-bot/node_modules/discord.js/src/structures/Message.js:577:60)
at /home/runner/economy-bot/commands/instagram.js:11:36```
gonna fix it rn
i straight up get redirected when i try to use the url
oh it's probably because im on phone and i have the instagram app installed
if movie == "sonic":
title = [
"Sonic", "sonic", "sonic the hedgehog", "Sonic The Hedgehog", "Sonic the Hedgehog", "Sonic the hedgehog"
]
* if any(word in msg for word in title):
await message.channel.send('You won!')* <--- My miserible attempt
await message.channel.send('first pic\nURL')
time.sleep(10)
await message.channel.send('Second pic\nURL')
time.sleep(6)
await message.channel.send('Title : _ o _ _ _ _ _ _ _ e _ _ _ h _ _ ')
time.sleep(6)
await message.channel.send('Last pic\nURL')
time.sleep(6)
await message.channel.send('Title : _ o n _ c _ h _ H e _ _ _ h _ _ ')
time.sleep(10)
await message.channel.send('The answer is : Sonic The Hedgehog')
I'm sorry, I have no idea how to format code in Discord. I just got into coding..
Anyways this is what it looks like.
Is this all inside of an on_message event?
Unfortunately the code is going to be a lot more complicated than that. In your code, you only check for a guess once, and then keep sending hints. You would need one event handler that checks for guesses, and another method that keeps sending the hints as long as no correct guess has been made.
anyone know with postgres using INSERT INTO table (...) VALUES (...) ON CONFLICT (key) DO UPDATE SET key = ... how am I able to set multiple new values? for multiple keys
I done it
DO UPDATE SET (thing1, thing2, thing3) = (thingval1, thingval2, thingval3)
iirc
I was thinking that but I figured it would be too simple lol
is there an endpoint i can call to check if my bot is online?
what
a url that i could call that would tell me the status of my bot
you can implement one
nah that just says online
they should expose that
there must be some api they call internally to get the status
we dont track status's anymore anyway
the "online" is just a placeholder and doesnt represent anything.
these guys set theirs
bots which show other status's are bots that had status's other than online when that feature was removed.
this is the offline color
no idea tbh
i just tested that bot and it was online
so maybe that doesn't mean they are offline
idk
Code pulled from NPM – which everyone was using
it doesnt, we dont track that data any more like i said
👀
when top.gg did track if a bot was online did they use a discord api to get the info?
that was when they were all in here
yeah, we tracked it because bots got invited
ohhhh
yeah
that makes sense
can someone help me ?, I wanted the bot to recognize the chat attachment
what does await canva.Canvas.clyde(text) return?
what is happening now? are there any errors?
it is, yes
Do you know where I could find a great tutorial for that?
I'm sorry, I don't really know where you would find a tutorial for that.
poggers
This worked by the way so thanks
hey look I fixed something!!!
i got some beta testers for my webhook stuff lol
one of the bigger servers jumped right on it... theres now a pepe themed triviabot with a big brain pepe as its pfp
i made some of my commands limited to people who voted on the bot and im not sure if thats allowed or not
ok phew
its the best way to get votes
just make sure to give them a grace period, e.g. make your votes last 12 hours and 5 mins
i have
that way if they vote again, theres no period where their privileges are stripped from them temporarily
@unreal kiln dont advertise please!

i asked for help testing features of my bot when i was developing it and i got banned
ohhh ok
i had an economy system set up and I kinda wanted it to be like that
where it just counts your coins or in this case "bonks"
what kind of database are you using?
Anyone here know unbuntu fairly well?
centos is my main linux distro
So I have not ran a website on a vps before so I am not sure exactly how to do it.
When I start the main file locally it goes to localhost, i belive I connected the domain to the vps correctly if I go to the domain rn it shows this.
How can I set it up to show the dashboard on the domain.
The widget does not work for me, what do I do?
/var/www/html seems to be where the website files go
you shouldn't really use a vps to host a website

heroku firebase and vercel have free hosting and they are easy to hook up to a domain
if your website uses sockets then a vps might make sense
Heroku and the likes are not good for non-static website hosting. Some websites act as IPC layers and also require a cached state to stay active for as long as possible
Well the bot code and the website are one in the same
Ill look into how to do that
What would I use to host the site?
Can you connect your databases and stuff to a shared hosting?
yep
each database does it differently, but each one supports connecting from anywhere
Alright, ill try to do that.
hi so
is there some api around that can get a full city name
i'm using this weather api but it only provides the city name and two letter country code (ie. "brisbane, au") and i want to get the full name (ie. "brisbane, queensland, australia")
can't find one through googling so
google maps api should have all that data
body
the browser does
maps api has a free tier
tyty
look into geocoding and geolocation apis
you get $200 per month of free credit
equivent to 40k requests per month
there are other options as well, like mapbox and openstreetmap
mapbox is much cheaper than google and offers like 100k per month free or something like that
of course api results may be a bit different
Download whole gmaps full-res and selfhost it, izi pizi
@opal plank todays progress. gonna work on collecting more data tomorrow so I can make more stuff
someone help me fix the error
what error
Are languages like Perl, Prolog and Lisp still relevant today
Behold, my prophecy has been fulfilled
come here!
Dead became a regular here for asking for code help
how do I make fields like this?
discord.Color.red(() the ) is wrong
/n
yeah just seems to be 2 fields and a bunch of newlines and bolds
can someone tell me how to close my string
tim asked what your error was 👀
ah
" ' `
What
uwu
Shiv
cant see shit from a picture of incomplete code
Tim we know
is screenshotting an option here? or?
or pastebin
Or cntl c ctrl v
k
yes
Under 13 much
lol
I tried to use slashes and commas, but it didn't work
wat
Not like that
@vestal stirrup we said \n
It's actually \n
Newline
I sometimes question the future of the development community
i question the future of humanity
The future is foreseeable
dsicord.Embed yes
When discord gets sold or something like that
yes
you didnt close the f string
lol
Oh my fucking God
@slender thistle see
k
Close your title string with an "
That 2 days ago
Oh what happened to them?
ugh, i got a 429 reply

They're always here, everytime with weird and plain obvious errors
I used to be a regular then I just gave up and llearned it
My prophecy held true the whole time
i suppose one 429 in 15000 requests isnt the end of the world, just have to refine my rate limit checking code
What
The cause? A single gram of spoonfeed
wat
Dead its "()()()()()()()()"
Jesus fuk
i mean
happy birthday @quartz kindle !
im just guessing, but i think its the " that needs to be closed, not the ( 👀
How celebrate my bday 🤔
Ah yeah I'm kinda glad to just stay in DMs nowadays
if you want your title to be usernames's balance, color = discord.Color.red sure
You can already tell I'm not in the state of mind to deal with this
Aged like milk
thank :3
f"wkw's balance**"**, color = color.red
See where those " are at
what like....
require("discord.js");
console.log("make me bot");
why no work.

Wanna bet?
oh please
You have to log in the bot first
Okay that person tslking changed my mind
youve been here as long as or at longer than me, you know some people can be that stupid
Someone show Aki the dbl bad codes repo
kekw
There is a repo of them
require("discord.js");
console.log(require("discord.js"););
console.log("make me bot");
thanks
lmao
A repo?
@solemn latch its not working because you gotta put your token in the require. paste it back here to show me that you did it right. 
alr so how do close string one answer cause you all said different stuff
every " needs a "
you have one, you need to place the other
i think shiv even gave you the right answer up above somewhere
Guys im a dev look:
require("discord.js").login("token"):
Wait no work
Wanda
when you die of not being able to TYPE
Bro
What is your pfp
Read this
And read your code
Do you see a difference between the "
I don't need to read the docs they said
I can memorize stuff just by looking at they said
Dude, your issue is simple: if you opened something, CLOSE that something
I know the problem just don't know how to write it correct
You know the general problem
You open a door, you close it
You don't know where the cause is
I always leave the freezer open
And I showed you the idea of where it can be an issue
ree
Are you blind
Ree they wont spoonfeed me like a baby
I got it, thanks
Np
f"{ctx.author.name}'s balance", color=discord.Color.red()
See this
For your own sake
And see your code
alr
use custom hex
And compare them
k
the discord colors dont work for some
👀
use 0xHEX
I don't CARE if they work or not
**text** for bold stuff
Or general markdown
I just want this guy to get his issue fixed and fuck outta here
He won't
how do i print 1+1 as a bool? its for a cs class im in
Remember, Sharknado had 6 sequels
did that but didn't work it gave me another error
the em.add.field is a invalid syntax
Add.field 
fck
thank you but i already knew
I'm amazed
can you put in emojis on a bot status?
i tried using a <:name:ID> for it but that didnt work
Probably no ig
aw
bruh
Like, bots have some kind of limited nitro
They can use all normal and animated emotes, but can't have gif pfp or expanded file sizes
so emoji is ignored ig
hmm
welp
i was planning on using emojis on the status of the bot to make it look cooler
After you fixed that invalid syntax, there will be AttributeError 
mhm
Invalid syntax more like I'm kinda trying to put shit together without basic Python practice and docs
shivaco more like a person who doesn't have self respect
Oh I gave up on myself a long time ago, but that's not the case here
I'm pointing out a few issues you are experiencing in an unusual manner
I just want to get this done I've re written the code twice over 3 days
A-ok, my rant is over. Is there any place where I can see where the attribute error is raised?
should i ss or right the code
it's not that long
that'd be helpful to provide the full code
em.add.field(name = "wallet balance", value = wallet_amt)
That em.add.field is an issue, but there's another issue before that line as well I suppose
ya i fixed that issue and then it gave me that
Send the line above that 
I did fckin tell you the error and you still didn't notice it
f"{ctx.author.name}'s balance", color=discord.Color.red()
that's not all
1 sec
As for the AttributeError which you'll be getting after fixing that, refer to https://discordpy.readthedocs.io/en/latest/api.html?highlight=add_field#discord.Embed.add_field
em = discord.Embed(title = f"{ctx.author.name}'s balance", color=discord.Color.red()
See, you don't close the parenthesis
wym
.red()
I mean, you literally didn't close the parenthesis
o
em = discord.Embed(title = f"{ctx.author.name}'s balance", color=discord.Color.red)
you mean doing that
no
Keep calling the red classmethod, meaning, keep the parenthesis there
Ye wee fahken soolless cun'
tf
Just put one closing parenthesis at the end of the line
i hoppe i get appoved
don't remove any other parentheses
wait
another error -_- lol
Man, why do you choose to suffer from this shit by skipping python basic 
Because "oh dude I need this really quick and then I'll go learn"
"I'm stuck on this for 3 days"
You were fine in what sense
even with messing around you should be able to spot these issues.
My man I had issues different than this when I started d.py
And mind you I didn't learn Python prior to that
well undefined name wich I know what that means just bruh
kekw, discord bot as first project ftw
Point still stands go learn Python
I remember having issues like this, its not unheard of, but im pretty sure i solved them on my own? 🤷♂️
Exactly norizon you don't know how much I hate myself for that
wallet_amt = users[str(user.id)]["wallet"]
I mean, I did it too 
Kindly provide the full code for that command, it's hard for people to help with those snippets.
Ah so same boat
pain boat
ye

ok
How can i see how many roles are in the server from higher to lower
Get roles list, it'll be ordered from lowest to highest iirc
HOW depends on the library you're using
i mean to say not for bot making for general
So I want my bot to do a command that involves pinging someone else... Can I make it so that it works with replying?
It is, if you get the mentions list the reply's mention will be the first element
Oh I thought he meant using like djs replies 
Doesn't djs already have support for replies?
inline replies? nope on stable, master yes
wait why does it say that wallet_amt = users[str(user.id)]["wallet"] unidentified name 'user'
Is user defined?

no dip ik that
Uhh
just with my code
So
const user = user
Wdym then
He what
Spoonfeeding, copy-ready code, plug 'n play code, call it what you want
Basically code that you can ctrl + c/ctrl + v into your code
Without changing a bit
Nor understanding what you're copying
No, imagine 
Oh
Technically the same thing lmao
I wanna create a economic bot but python freaky
You're not making a economy bot, you're making a budget bot
wait
Please learn python
It's not hard, you'd have finished already if you stopped asking for answers here and started taking courses
yes
Didn't someone send you the links yesterday
ye
Then its probably faster for you to find them
Yeah discord search. It comes in handy sometimes
https://www.codecademy.com/catalog/language/python and for "courses"
alr
Thx miyuu
❤️
I think we need one more Shiv
Then learn Python
ty
Then practice Python
StackoverflowException: shivaco stackoverflowed
Then practice your appropriate knowledge in actual projects
It doesn't work well the other way around
you have to pay
Codecademy is free, there is paid options
wait
Lmao
Theres pay shiv to teach you
Sololearn is decent
Yo bro if I was paid to teach you bet your bottom dollar I wouldn't be here
Nono, there's no YouTube™️ please
ya
"Try it for free" works fine.
There's just extra with paid
I did a full JS course free of charge.
they all are paid
From a tag in a server
Recommendation: https://www.sololearn.com/Play/Python (good online course on the basics)
https://automatetheboringstuff.com/ (for complete beginners to programming)
https://learnxinyminutes.com/docs/python3/ (for people who know programming already)
https://docs.python.org/3/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
http://greenteapress.com/wp/think-python-2e/ (another decent book)
http://www.codeabbey.com/ (exercises for beginners)
https://adventofcode.com/ (high quality programming challenges)
https://dev.to/thepracticaldev/daily-challenge-1-string-peeler-4nep (daily programming challenges)
http://rosettacode.org/wiki/Category:Python (Code samples on different things)
Erwin probably
I learned how to use html in W3Schools
it is a very good site
Hi, so I have the following code:
let split1 = eggs[item - 1].split(" ");
let eggtype = `${split1[0]} ${split1[1]}`;
let split2 = split1[2].split("/");
let hatchnum = `${parseInt(split2[0]) + 1}/${split2[1]}`;
console.log(`${eggtype} ${hatchnum}`);
What it does is take a string like, Rare Egg 0/3, and splits it into Rare, Egg, 0, and 3. It then takes the 0 and adds a 1 to it. Then it puts it all back together and logs it.
Yet, when I console.log it, it gives a response like this: Rare Egg NaN/undefined.
Does anyone see what's wrong? All help is appreciated.
Yeah, W3Schools is really good for vanilla web stuff
Like, it's one of the founders of modern internet anyway 
Log the values of the variables before doing addition. If they show as valid numbers, then you should probably convert them into type number through the Number constructor. Using mathematical expressions on strings doesn't make much sense, now does it?
ah. Nvm. I didn't read the parseInt. My apologies
I would still recommend the Number constructor over parseInt
Cannot connect to the MongoDB at localhost:27017.
Error:
Network is unreachable. Reason: couldn't connect to server localhost:27017, connection attempt failed: SocketException: Error connecting to localhost:27017 (127.0.0.1:27017) :: caused by :: No connection could be made because the target machine actively refused it.
``` I dont know what I'm doing wrong...
[#development](/guild/264445053596991498/channel/272764566411149314/)
yup
right here
aight imma slep
Ah, ok. I'll try it out and see if it fixes the problem.
Do what I suggested first though which is logging the values before you do the addition
Ok, sure
I liked the result of my site
I was able to learn the basics of HTML
Cool, looks quite well structured
how do you even make that -_-
Looks pretty clean. Not sure how I would feel about the image if that was the first presentation
When you learn how to code, you can make anything
Can i hax
@earnest phoenix https://www.w3schools.com/html/default.asp
dude i can't get a quote outa my head
Does anyone know how to connect a bot to MongoDB or even just an regular DB ?
A thing you could try is to make a watermark on the background with your main image
Like, a monochromatic version of that image
Upscaled obviously
And with a low opacity
I will try
It'd break the contrast between the image and the bg color
is JavaScript java
Ok, so I logged each of the values, (Rare, Egg, 0, and 3).
Rare and Egg showed up perfectly. 0 showed up as -, and 3 showed up as undefined.
I feel like the line which I commented on is what is messing it up.
let split1 = eggs[item - 1].split(" ");
let eggtype = `${split1[0]} ${split1[1]}`;
let split2 = split1[2].split("/"); // <-- Most likely cause for the issues.
let hatchnum = `${parseInt(split2[0]) + 1}/${split2[1]}`;
No
just try
look at my first site
after i learned about html, it improved a lot
I also asked a few others, and it seemed to work for them:
Same as car and carpet
what
Meaning they aren't the same.
But javascript was born for java, which became a standalone lang
oh
So, like, they're totally different stuff
It's only called javascript because it was used to pass client side data to java applets
So java script
Nowadays it doesn't really matter since they took different paths
does express come with it's own typings, because the 3 dots underneath the express string import look like it might be a message stating you should install @types/express
express doesn't have its own typings, only D T
The docs say app = express(); not new
Then the issue just may be that typings need to be installed
yup turns out that was it, thanks
log the value of eggs and eggs[item - 1]
because if someone else can make it work, then it's an issue up further
I found out what was wrong. The original string was actually Rare Egg - 0/3.
pain.
bread
paneleiro
Happy cake day btw
gracias
Anyone else having high ping with their bots using Discord.js?
Typically my ping is 40-100
Lately its been in the 10k+ zone
My friend randomly had this issue for 3+ days now
So it isnt just me affected
I even switched hosts to see if it was my host, same issue
Our original host was https://repl.it I switched to self hosting and same issue
Repl.it is a simple yet powerful online IDE, Editor, Compiler, Interpreter, and REPL. Code, compile, run, and host in 50+ programming languages.
My ping is via self hosting + discord.js so idk 
My ping is around 200+, but then I hosted from SG
I didn’t even apply for listing my bot on top.gg
I deleted it afterwards applying it because I coded it to be private
Okay cool
ok
Not support
None of us devs care
ok
:heart:
when I run my code it says im exceeding the rate limit
Good
"too many requests"
Know what rate or limit means
limit is what it goes to and rate not really
Why is inherits not working for me?
https://i.callumdev.pw/v46f2.png
Well you are limited bcs you spammed over the allowed rate
inherits doesnt have get() in it on the code that you showed
Ayo.
I have updated my package.json and removed some packages.
I want it to update for the package-lock.json and the node modules.
Should I delete them both and do npm install discord.js ?
how do you prevent escape characters from being used in embeds?
like if someone's username
has weird things like ||sad||
the ||
It's causing things like this to happen
Idk what this guy had in his username
why does old one work without error, but new one creates an error (<#development message>)
hey what's an attribute error
google it
If you're still working on the same thing 
no im working on a giveaway bot
it's going good just not with saying who won
@earnest phoenix
What
ys
I'm not and that's why
Then just ignore it
Why bother
don't know
cause I was wondering what a attribute error was
and u said that
but I googled it
@umbral creek
^ bump since completely ignored -.-
What is the error? @snow urchin
this is his error
^
Wouldn't know sorry
Also I recommend you use classes since you're working with typescript, typescript is able to transpile to older js versions if you need to
somehow sticking it into a class fixed it.. i mean.. ok then, not gonna complain 😄
https://i.callumdev.pw/bb1ng.png
cute
hey i had a question
i am using discord.js audiostream to receive audio calls
however, how do i actually export the pcm file as mp3?
you need to convert it with something like ffmpeg
google it, there are many discussions and explanations about it
helo guys
If I edit my bot, does my bot accept time take longer?
@quartz kindle what does this mean?
i still don't undestand
and those here, if i install them, d.js-light will automaticly pick them up?
yes
thats for ignoring certain events, its mostly for advanced usage, you dont need it
just use intents
so should i disable it?
just leave it default
and do i still need d.js ? or delete it
@quartz kindle If I edit my bot, does my bot accept time take longer? (sorry for the ping)
uninstall djs
ok ok
it can cause conflict issues
no
@quartz kindle how i can cache a emoji that i needed
what do you need it for?
someone is popular today
If I do, npm i discord.js-light, it will install master or v3?
v3
yes
I see
reaction
smth like this
but everything i do it, it auto react and delete my msg
i did bro
Show code
Dont use djs light... it will be no longer supported when djs 13 with cache control will get released
will do it, after v13
Ok
tim belike: 
.addField(`Roles [${guild.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length}]`,`${member.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}`, true)
What’s wrong here?
error?
guild.roles.cache.filter exists right
I wasn’t here LOL
${guild.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length}
to this
${guild.roles.cache.size}
@earnest phoenix might be better
Ah okay thank you
${member.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}
to this
${member.roles.cache.map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}
@earnest phoenix
well this is odd
why does invites api endpoint doesnt show welcome channels names?

@earnest phoenix oye, what are your welcome channel names?
ITenteretsting
i doubt he set the channel names as only emojis
You never know.
if (!owners_id.includes(message.author.id))
if (message.author.bot) return
var embed;
{
message.delete()
if (message.content.startsWith(""))
{
message.delete()
embed = new Discord.MessageEmbed()
.setTitle(message.content)
.setDescription("by " + message.author.username)
.setColor("RED")
}
}
message.channel.send(embed)
}```
try it
Whats the error?
Error is undefined
, what error @devout thorn ?
if (message.author.bot) return
var embed;
{
message.delete()
``` this line causes error
@devout thorn
whs?
oh wait
im give const
if (message.author.bot) return
if (message.content.startsWith(""))
{
message.delete()
let embed = new Discord.MessageEmbed()
.setTitle(message.content)
.setDescription("by " + message.author.username)
.setColor("RED")
message.channel.send(embed)
}
i dont need help-
anyways
try dis
it works
nice
just try dis code it fun kindA
did it work?
no ones helpin no one
Wdym ?
i ade it by mashing my 3 other cmd cause i was bored
Weren't you asking for help in code?
nah
Bruh
Lul
kudos for that creativity
zalgo xD

i knew about that bug for quite a few months,m never once occured me to use it for something like that
lol
erwin
erwin didnt die
his soul just left his body
hmm. interesting. send a message of exactly 2000 characters and clyde blocks it.
oof
does this look alright for checking rate limts on discord webhooks? (not top.gg api webhooks!)
https://privatebin.net/?4695a5a4612e6dbd#H7oTpbfdE8n1w6GedAmJJjuRQhtMwK8MgLRyqa1qkSXB
This is to handle both per-channel, and global rate limits, on single and multi-homed systems.
I can't use whats already built into my lib, because the lib doesnt have stuff for sending to webhooks
Comments welcome 🙂
oh and... i dunno why, hatebin and hastebin are giving me error 500 atm 😦
hastebin never saves anything for me
yeah
i usually use hatebin instead, but even thats erroring today
lets all just go back to pastebin.com 
make your own codebin 
yea
update to nodejs v14
already did
what's the better language for Discord, Python, Java or JavaScript?
it depends
but JavaScript is the best
For most things probably
Depends on which one you're good at, I'd pick the one you feel more comfortable with
they're all similar ^^
I'm in the process of learning JavaScript so I was wondering if I should port my bot over from Python
you can if you want
JavaScrpt has a discord.js library that you can do alot of things

Isn't the performance better or something?
The performance difference is barely noticable unless you're doing huge operations
True, but Discord.py is really good too
Discord themselves recommend Python so I'm gonna stick with that for now.
your choice (:
rust , c++ are the most effecient language
Wrong, C is the most efficient language
It's really really annoying and hard to write
if you want js and a over the top lib, use detritus, its far better than d.js
its in typescript, since you use python you might already be familiarized with types and typeguarding
What's the difference?
let me get the info for you
read past this for some examples #development message
i should make a proper introduction to detritus and what it has to offer over d.js, but in almot every sense its better than d.js
wow thats much easier by the look of it
most stuff is handled in the lib, so you dont have to write unecessary code for command handling, caching, etc
not only easier, its a lot better too
d.js doesnt have custom caching
which made Tim write d.js-light, which enables custom caching behaviour
detritus has that out of the gate too
custom caching, custom command loading, reloading, custom prefixes, command handling, everything
hey i need some opinion ,is this to much color?
those 2 pics are ONLY the options given to you on the command options
you have more options on the handler as well
its all optional
so you cherry pick whichever feature you want

lol
for typescript, check this
https://www.youtube.com/watch?v=ahCwqrYpIuM first minute of this
https://www.youtube.com/watch?v=zQnBQ4tB3ZA and this
if that interests you, watch the rest of the first video, its about 13m long, but it gives a nice introduction about typescript
typescript is basically javascript, but type guarded, so you catch bugs beforehand
TypeScript has forever altered the lives of JavaScript developers. Learn why TS is so awesome and the basic concepts required to be successful using it https://angularfirebase.com/typescript-the-basics/
Deep Dive https://github.com/basarat/typescript-book
TypeScript Docs https://www.typescriptlang.org/
Learn the basics if TypeScript in 100 Seconds! If you love TS, upgrade to Fireship PRO for 40% off using code mbus5Kcj at https://fireship.io/pro
TypeScript docs https://www.typescriptlang.org/
#typescript #js #100SecondsOfCode
Install the quiz app 🤓
iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.c...
what do you need?
does Collection is lighter then Map? what should i use for things that change every second?
collections are extension of maps
they should perform similarly, though collections has some extra stuff, memory wise using a raw map would be more efficient
i am sorry to fail you but... idk typescript, idk how will i do detritus =c
typescript IS javascript
check the videos i sent above
that one i know, i sent before
i mean the other ones
{
"code": "9tRzVFvaSg",
"guild": {
"id": "808323095098163220",
"name": "The Suite",
"splash": "85801f84f1ae3c24208dc4e2f2893f39",
"banner": null,
"description": null,
"icon": "a_feb92dbc6876e42f5ee336804e9501f8",
"features": [
"ANIMATED_ICON",
"WELCOME_SCREEN_ENABLED",
"NEWS",
"INVITE_SPLASH",
"COMMUNITY",
"MEMBER_VERIFICATION_GATE_ENABLED",
"PREVIEW_ENABLED"
],
"verification_level": 2,
"vanity_url_code": null,
"welcome_screen": {
"description": "The Suite, server made to relax in, make new friends, game with others and have a lot of fun together and strive to ensure that you have fun",
"welcome_channels": [
{
"channel_id": "808326394044088371",
"description": "Here you can assign yourself roles!",
"emoji_id": null,
"emoji_name": "⭐"
},
{
"channel_id": "808726809813450782",
"description": "Here is all the information you need!",
"emoji_id": null,
"emoji_name": "💎"
},
{
"channel_id": "808323098100760618",
"description": "Here you can socialize with others!",
"emoji_id": null,
"emoji_name": "🗣️"
},
{
"channel_id": "808388730242072606",
"description": "Participate in fun events!",
"emoji_id": null,
"emoji_name": "🎮"
},
{
"channel_id": "808728155518664715",
"description": "Here you can introduce yourself!",
"emoji_id": null,
"emoji_name": "🥺"
}
]
}
},
"channel": {
"id": "811298317836877834",
"name": "╔⪢👋-welcome",
"type": 0
},
"inviter": {
"id": "364071634816204812",
"username": "Oncologist",
"avatar": "67a12c2cfde48ca5fb3ab1948231fac9",
"discriminator": "4536",
"public_flags": 256
},
"approximate_member_count": 226,
"approximate_presence_count": 64
}```
@earnest phoenix this is your invite data
notice how welcome_channels do not provide name
thats what im puzzled by
does?
its discord API data
not urs
thats the data of ur invite
{
"code": "dbl",
"guild": {
"id": "264445053596991498",
"name": "Top.gg",
"splash": "0eaa94d4bfc74af03cdacd3155435afd",
"banner": "fda62f17d6fa9e057674d9ade7f2034d",
"description": "Spice up your Discord experience with our diverse range of Discord bots and servers",
"icon": "a_a8aec6ad1a286d0cfeae8845886dfe2a",
"features": [
"WELCOME_SCREEN_ENABLED",
"DISCOVERABLE",
"COMMERCE",
"PREVIEW_ENABLED",
"BANNER",
"COMMUNITY",
"INVITE_SPLASH",
"ANIMATED_ICON",
"NEWS",
"ENABLED_DISCOVERABLE_BEFORE",
"VANITY_URL"
],
"verification_level": 4,
"vanity_url_code": "dbl",
"welcome_screen": {
"description": "Spice up your Discord experience with our diverse range of Discord bots",
"welcome_channels": [
{
"channel_id": "280067058417401856",
"description": "Read the rules",
"emoji_id": null,
"emoji_name": "📜"
},
{
"channel_id": "502193464054644737",
"description": "Check out the frequently asked questions",
"emoji_id": null,
"emoji_name": "❓"
},
{
"channel_id": "769566680807899156",
"description": "Get up to date information",
"emoji_id": null,
"emoji_name": "🔔"
},
{
"channel_id": "714045415707770900",
"description": "Ask for support here if faq didn't help",
"emoji_id": null,
"emoji_name": "❔"
},
{
"channel_id": "264445053596991498",
"description": "Chat with the community",
"emoji_id": null,
"emoji_name": "💬"
}
]
}
},
"channel": {
"id": "280067058417401856",
"name": "rules-and-info",
"type": 0
},
"approximate_member_count": 140952,
"approximate_presence_count": 28576
}```
this is from here for example
OH

{
"code": "6QEExsN",
"guild": {
"id": "628731905423966219",
"name": "GenshinUtils Support",
"splash": null,
"banner": null,
"description": null,
"icon": "700027dd8b870fd8da5f25c3612bdfea",
"features": [
"PREVIEW_ENABLED",
"NEWS",
"MEMBER_VERIFICATION_GATE_ENABLED",
"WELCOME_SCREEN_ENABLED",
"COMMUNITY"
],
"verification_level": 2,
"vanity_url_code": null,
"welcome_screen": {
"description": "GenshinUtils/Leviathan Bot support server",
"welcome_channels": [
{
"channel_id": "693222035303956591",
"description": "Please read the rules",
"emoji_id": null,
"emoji_name": null
},
{
"channel_id": "782788611107586059",
"description": "News from genshin",
"emoji_id": null,
"emoji_name": null
},
{
"channel_id": "628731905944322080",
"description": "Chat away",
"emoji_id": null,
"emoji_name": null
},
{
"channel_id": "729083536430333983",
"description": "Latest updates regarding GenshinUtils",
"emoji_id": null,
"emoji_name": null
}
]
}
},
"channel": {
"id": "693222173246095401",
"name": "joined-left",
"type": 0
},
"inviter": {
"id": "188836645670223872",
"username": "Not Erwin",
"avatar": "a_24b8564dfcb2b0e4b7e2fb953c5b9454",
"discriminator": "8753",
"public_flags": 128
},
"approximate_member_count": 712,
"approximate_presence_count": 230
}```
yeah thats screening data
interesting
well i guess it makes sense

its screening data
i didnt know it was under welcome_channels
the name is a bit confusing
a bit confusing
ignore it then
xd
its API data
im getting all that with this
9tRzVFvaSg
which is ur invite code in ur status
the other ones i used is dbl
and mine 6QEExsN
im querying the discord api with the invite data
but i was puzzled that it only shows the channel ids and not their name
because in the screening data it shows the name
so i was confusing as to why it didnt show there
how do you get this?
use the /invites endpoint
oh, ok ok
which?
This
Wrong emoji’s at the channels




