#development
1 messages · Page 2043 of 1
I had to pick out about 50 Tenor gifs and realized I was doing it wrong like this
it was painful to go through several files replacing each gif URL
its easy to test
if you copy and paste the link into your browser, and it opens the tenor website, then its not a direct link
a direct link will open the pure image/video in a blank page
ahhhhh
hmm
well unless i'm pulling the api wrong, this is the only link (other than the one similar to what discord sends, which also isn't right)
{
id: '17626088',
title: '',
content_description: 'Hand Writing GIF',
content_rating: '',
h1_title: '',
media: [ [Object] ],
bg_color: '',
created: 1593161374.024217,
itemurl: 'https://tenor.com/view/hand-writing-writes-cat-headbutt-gif-17626088',
url: 'https://tenor.com/bl7vU.gif',
tags: [],
flags: [],
shares: 1,
hasaudio: false,
hascaption: false,
source_id: '',
composite: null
},
meh, i'm about to tell him his idea can play with the racoons in the dumpsters.
what is the content of media?
looking now
didn't see it till now
i was looking for url's
'tis a phat ass array of probably what i needed... https://hiekki.me/EPTOvO5pb
looks like it
//event#messageDelete
console.log(deletedMessage.author)
//Log: null
messageDelete events do not include any information about the message
only the message id, channel id and guild id
if you dont have the message cached beforehand, you cannot get it any other way
the audit logs will only give you information if someone else deleted the message
not if the authors themselves did
i just want to make it an if for author#bot but i see
auditlogs showing self-deleted messages?
yes
hmm but if i do it i should add all messages in the server
it can be useful actually
im using mongoDb for that
i can*
if you cannot guess or predict which messages will be deleted, then yes, you'd need to store them all, which will quickly become a lot of data, so you will need a lot of storage
and you will also have to deal with privacy concerns
for example your bot will need to inform people that it is storing all messages, and the users must explicitly consent to it
otherwise you are violating privacy laws
ah yes right but it is a custom bot
special for a server
who cares about that
just throw some clause in a 50 page tos and call it a day
ethic
just a quic question, why when i paste my text inside input field of my slash command on bot, it formats and looks like this
and not like it looks in txt editor:
Seems to me that is how discord handles it
It might look properly if you actually send it
nah i tried
ahh i will try creating prefix command maybe it will work then
Modal text areas do if I’m not wrong
Probably, but i don't think slash commands as of late does
Who knows if they ever will
Yea lmao
Why app discovery is getting a thing when apps can’t use the features they’re forced to use
Because discord can’t move forward quick enough
I had this issue with a couple of things, this is more annoying to do? but you can add in there \n and in your code yourMessage.replace(/\\n/g, '\n') and it will do the line shifts for you
if that helps
ok i goona try that, tnx
but...amm how should I use that, since msg that i sending is custom message? I use slash commands so idk will that work... ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const { MessageEmbed } = require('discord.js')
const { OWNER_ID } = require('../json/config.json')
module.exports = {
data: new SlashCommandBuilder()
.setName('message')
.setDescription('Send Message to selected channel')
.addChannelOption(option =>
option
.setName('channel')
.setDescription('Select channel.')
.setRequired(true)
)
.addStringOption(option =>
option
.setName('content')
.setDescription('Message you want to send.')
.setRequired(true)
)
.addStringOption(option =>
option
.setName('url')
.setDescription('You can provide url with message, it is optional.')
),
async execute(interaction, client) {
try {
if(!interaction.member.permissions.has('BAN_MEMBERS') || !interaction.member.id === OWNER_ID) {
interaction.reply('You are not allowed to use this command!!')
return
}
let msgChannel = interaction.options.getChannel('channel')
let url = interaction.options.getString('url')
let msg = interaction.options.getString('content')
let mEmbed = new MessageEmbed()
.setDescription(`**Local Message LOGS**
Message Succesfully sent to the **${msgChannel}**
-
**Message Content**
${msg}`)
.setColor('GREEN')
.setTimestamp()
if(url === null) {
msgChannel.send(`${msg}`)
interaction.reply({embeds: [mEmbed]})
return
}
msgChannel.send(`${msg} \n ${url}`)
interaction.reply({embeds: [mEmbed]})
}
catch(err) {
console.log(err)
}
}
}
down at the bottom where you have ${msg}
it would be ${msg.replace(/\\n/g, '\n')}
in all spots
then when you type out that message via the command, anywhere you you want to shift+enter, you'd type \n and the bot would do it for you
@upper current may i add you friend
ye
weird place to bond lmao
may I add you friend
lel
would you also like to bond? 🙂
too busy buying a $6 a year vps
from where tf
smh
I said I wanna see it
imagine paying for a vps when you can get 4 cores/24gb ram for free
wot
from whom
oracle moment
or not cause oracle doesn't accept cash app 
you dont have a card?
parents card? it doesn't charge does it?
It charges a 1$ fee then gives it back
rip
So when saving an image being uploaded to my api should I grab the buffer of the image and save it to my database and remake it when I need to serve the image again or just save a hard copy to the drive
database is better for small data, disk is better for large data
I see
@spare goblet can you remove my bot
https://top.gg/bot/735572650449174591
Its in a old account But i have proofs that was mine
Olá venha conhecer o Danitto um bot de Utilidades, Diversão, Administração e Economia !
I don't have access to the old account
But I was able to recover the bot
(with teams)
Ok
fake is a mod
Mods are fake
💀
visual studio used to open my bot's output in windows terminal, how do i do that now rather than have it sent to the inbuilt terminal
if you're talking about .net/c#, try building first then running the output binary directly, you can find it in (your project folder)\bin\[Release/Debug]\[runtime]\ProjectName.exe
an example would be bin\Debug\net6.0\ProjectName.exe
oh
just realised you're not using .net
however a way around this is to open your bot's folder in windows terminal and then use whatever command you run to execute your bot
that doesn't debug it though
i think the builtin debug console is required if you wanna debug
it didn't used to be
it used to open it in windows terminal
at least in vs 2019
i found this
yes that used to be the case
now it is not
i have wt as the default but now it opens the output in its own window rather than an external window
this comment is probably why https://developercommunity.visualstudio.com/t/use-of-windows-terminal-during-debugging/1293343#T-N1701529
and microsoft decided to not give the end user any choice
thanks for that
so for my welcome system, I managed succesfully set channel for welcome messages, saved it to db, but now i dont really know how should i send message in that channel, I have welcome.js file which actualy need to send message, but it dosent, i know i miss something in my code but cant find out what exactly:
setchannel.js: ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const {Permissions, MessageEmbed } = require('discord.js')
const Schema = require('../database-schema/welcomeSchema.js')
module.exports = {
/*
/**
* @param {Client} client
* @param {Message} client
*
*/
data: new SlashCommandBuilder()
.setName('setwelcome')
.setDescription('set channels for welcome messages')
.addChannelOption(option =>
option
.setName('channel')
.setDescription('Set the channel where you want bot to send welcome messages')
.setRequired(true)
),
async execute(interaction, client, message) {
try {
if(!interaction.member.permissions.has('ADMINISTRATOR')) return interaction.reply('You are not allowed to use this command')
const channel = interaction.options.getChannel('channel')
Schema.findOne({Guild: interaction.guild.id}, async(err, data) => {
if(data) {
data.Channel = channel.id
data.save()
} else {
new Schema({
Guild: interaction.guild.id,
Channel: interaction.channel.id,
}).save()
}
})
interaction.reply(`${channel} has been set as welcome channel`)
.then(console.log)
.catch(console.error)
}
catch(err) {
console.log(err)
}
}
}
there is no error or crashes...bot stays online and works fine
channel.send({embeds: [embed]})
Do you have the GUILD_MEMBERS intent enabled?
If he hadn't enabled/typed it, it would have thrown an error.
No? He’s just listening for an event that would never get sent without the intent enabled. Would not throw an error.
If anything, sending embeds the way he did would’ve thrown an error (or at least sent a deprecation warning of some sort)
Yea i have all intents enabled basicly
Ah yea tnx
But is it enabled in your developer portal? Or did changing that line like Glitter recommended fix your issue
i see
Everything beaide 0auth is enabled
…what? OAuth is not an intent
Can you show what intents you’ve enabled in the developer portal with a screenshot (unless your issue is fixed already, in which case congrats)
I'm using nodemailer to send an email, but can I style html wich I'm sending with the mailOptions?
these are all enabled, but still nothing no error, nothing
yea ik i just sai that...dk why
Are you sure your event is even loaded?
Also, try logging data before you do anything in the callback function
let am = reply[Math.floor(Math.random() * reply.length)];
const attackment = new MessageAttachment(am)
interaction.followUp({files: [attackment]})```
when it send the image with link it sent like a box
What is reply?
i think you cant get random links like that, you should use loop to go trough reply variable to get link since your reply variable is an array.
What? No. He’s just grabbing a random index of it
Just because something is an array does not mean you have to loop through it
i think messageattachement class only takes buffer as 1st argument not a link
^ pretty sure that’s the issue
Well, Ok 🙂 From my experience i know that i had to loop trough array to get random link
wot
The way he’s doing it is perfectly fine
I don’t see why you would ever need to loop through an array to get a random index of it
yea thats what i was about to say 💀
that would be very inefficient lol
imagine you do something like this ```js
let selected;
for(let i = 0; i < randomNumber; i++) {
selected = array[i];
}
doStuffWithSelected(selected);
surely v8 is smart enough to optimize that though
well I was thinking it would see that no matter what, selected will always just end up to be array[randomNumber] and optimize it like that
i mean, sure, but idk if v8 is that good
im guessing that would need some kind of AI assistance similar to what modern gpus use and shit
AI accelerated processing
interesting
you shouldnt need to have ipv6 to be able to connect to ipv6
nope
all links are expired
i restored it and now it works correctly
also why is your vps ipv6 only? everything is dual stack these days
ipv4 is still required everywhere for compatibility reasons
Is ipv4 on everything though? My router seems to only have an ipv6 address which sucks for me because I can’t host a minecraft server with ipv6
yeah you shouldnt use those types of facebook links, they are all temporary, you're gonna have to keep updating them all the time
lol weird
i used google
is ipv4 that expensive?
this time
wtf lmao
wait no $6 a year
do we really live in a world where ipv4 accounts for 80% of the costs of a vps?
and nobody knows?
ipv4 should’ve never existed
i mean, thats the same as saying 32 bit should've never existed
and 16bit
they were needed stepping stones
Well to be fair I guess the people inventing it at the time didn’t expect to ever run out of addresses
well a bit of googling says you need an ipv4->ipv6 tunnel to access an ipv6-only vps
also cloudflare seems to have that
nope
even hetzner is moving away from that
They're charging a ridiculous amount of when ordering IPv4s
look at the setup prices
there's still a shit ton of systems and devices that are ipv4-only
the same way there's still a shit ton of pcs running windows xp
ipv6 only is already the default for dedicated servers and will become the default for their cloud servers in the future
they're just not done developing the network tech yet
as stated in the forum
will their plans become cheaper tho?
true but most cloud instances will never need IPv4 as those targets are mostly proxy targets from firewalls like opnsense or targets of load balancers
which never public their ipv4
they were cheaper before and customers like me having 2 of the cheapest servers since the price increase are still paying 2,49€
can you make an http request to an ipv4 website from an ipv6 vps?
yeah by using the internal routing of hetzner
you use their load balancers of course
without paying for them?
no you pay for them, but you can add the servers to your virtual network using the virtual switches and you don't ipv4 anymore
as the target server never publishes it's ipv4 as the connection is only passthrough
either you use the virtual switches or their services like load balancers and firewalls
that's up to you
but the dedicated firewall (server) should of course have an IPv4
I'm not sure if this is off-topic or not: how can I link a domain to a specific port of an ip?
but the passthrough connection to the targets can be either a virtual network and/or straight IPv6 behind the scenes
You can not
There's no such a DNS protocol supporting this except SRV records
But literally no fucking service today really supports SRV records for some reasonm
so i basically need 2 different servers for 2 websites?
those 2 website just don't belong to each other
and they're hosted on the same server?
I'd like to
well that's when your webserver comes in place
you create the virtual host(name) which is your domain name, set the directory for it the server will listen to and that's it
and i should point like an A name to the ip of the machine right?
both domains point to the same ip
and you have a webserver like nginx
who points the connection to different websites by parsing the domain name
IN A www. -> target IP
IN A @ -> target IP
IN A * -> target IP
thanks! what does * stands for?
which is obviously www.yourdomain.org, @ usually is the base tld itself and * is any wildcard
can i do it like with django?
ok, thanks!
django is a framework, not a webserver i believe
the DNS consoles or zone management is different from hoster to hoster
you need a webserver in front that points the correct addresses to the correct django processes
ye i mean i did a thing like that tho some time ago but didn't know how to use a backend language
some use @ for the TLD, some just leave the hostname empty
that's what you need to find out
you have a vps right? running linux i presume?
yes
actually no
or litespeed
yes used apache a little
basically those are the most popular linux-based webservers
well if you have already used apache a little bit, then think about sticking to it
for example you can install nginx or apache directly from your distro's package manager
Tim changing his messages again
then lets say you have several websites, each one running on a different port, by a different script
you will use the nginx/apache webserver to match the domain names, and forward them via reverse proxy to a port inside the vps
each one running on a different port
assuming they're running on an own webserver
ok i got it, thank you guys
static sites also exist
it's actually not that difficult once you got into it a little bit
right so ive ran into a problem
is this 'unicode' character 2 bytes?
\©️
because it seems js is classifying it as a single character while my database parser disagrees
does it have an ascii value? if not, 2 bytes I believe
i think i may need to count the buffer bytes instead of how long the string is because js treats it as a single character
doesn't look like it's on here, so
also, it's summer for me now so what should I do
I need a project to get off my lazy ass and do
meh
I've thought about that but it requires a lot more effort than I'm probably thinking it does
it really does 💀
I've realized that I'm broke and I need something to work on to hopefully make some money out of lmao
you can go on doing my trivial work on my page but you will need to get into php a little bit :P
i have literally no fucking time i can spend atm
same, can't think of any project ideas 😔
$10/hr for 40 hours a week is not only unappealing, but it'll make me like 2 grand over the entire summer at the cost of being miserable
💀
lol
I wanna build something that makes money but at the same time it feels like I lack the experience to create anything sophisticated enough to make money with
should I go for servercheap or galaxygate for around 10$ vps
I wanna build something that makes money
good luck
yeah exactly
I mean I'm working my entire life even as child
and im coding as hobby
starting today with a lot of experience, time and effort you can bring in there's a good chance of getting into something you can earn cash with
I started programming about 1.75 years ago
But I'm quickly realizing that I need to make money pretty soon lol
just dont go on these freelance bidding websites 💀
And getting a job is an option, but I feel like it would burn me out of life while making pretty much no money doing so
unless you're a sweaty person with entrepreneur characteristics (boosting your bidding spot) and bots which automatically bid for you all day and a team behind you you wont win any bids (unless you're fine with making a whole business enterprise application for $5)
im working 18h straight or even more if it's required
And I don't wanna waste my summer playing video games and sitting here doing nothing
but as fucking employee you cant have an more stress-less life
I want to at least build something that gets me experience
Even if it amounts to nothing in the end
hmm getting involved into something real quick is probably not really realistic
I just wanna say -- I got a job offer thanks to my open source projects. I feel like in this day and age open source projects on github / gitlab can help a lot in finding a job
just building a cool open source tool or website or anything really will yield at least something
I wouldn't rely on that only when it comes to the time you gotta have to pay your bills
The problem with that is I feel like I don't have the experience to make anything open source
Well, I don't have any bills right now other than paying for gas and dates pretty much
let me rip off a bunch of projects to fill up my github portfolio
So right now is the perfect time in my life to do something that gets me experience
tho i dont have to because i have so many projects i havent published to github
My point is that open source projects will help you get the job that pays the bills - the project itself likely won't
I'm still only 16 so I have time
ask yourself if that's actually something you wanna do in the future
you may change your opinion and will do something completelly different later on
happens to quite a lot of people
At the moment I'm completely set on computer science
There was a point that I was very interested in physics, but once I actually did physics I find that I'm not very interested in it
lol
Computer science and programming is basically the only thing that I genuinely enjoy doing
(When it comes to career options)
well... there're way more options possible nowadays than back in time like 10-15y ago
I mean why not
would have been helpful if you're already involved in a project you can now spend "more" time on
but finding something you can involved to is quite hard
and developing and releasing something completelly built on yourself people will use is even harder
As long as you have an idea and motivation it's not hard
At your age you should focus on building cool projects you can show recruiters
I mean programming has big range
what are really interested to do in exactly, Waffle?
I'm really interested in lower-level stuff, compilers specifically
But I also have fun doing higher level stuff as a break from low level stuff
my problem is that my greatest accomplishments are closed source
ideas i capitalized off of
though i made an open source app recently
so that's something
working on doing a good 2-3 large open source projects to expand my portfolio with different stacks
anyone know how you can make a div ignore the styles of its parents?
yup that's a great thing to do
overwrite all styles
that the div inherits
that might take a while
Ideas?
you just style it with html?
an email is just a html web page
i cant attach a style sheet?
<style> </style>
dont know about that one
yeah that could work yeah
Only problem with this is that these types of projects are advanced and require a lot of time and effort that I can get burnt out of; there's always something more to learn about this
A programming language on your resume is pretty impressive
Yeah that would look quite good lol
I should learn llvm
all the stuff I've made so far is from scratch without any llvm
Honestly maybe I'll do that
Because llvm makes it 1000000 times easier
(From what I've heard at least)
Definitely easier than generating assembly yeah
i found the best solution to be using an iframe
its also sandboxed which is great for my email rendering feature
@tree.error
async def on_app_command_error(interaction: Interaction, exc: AppCommandError):
if isinstance(exc, commands.CommandOnCooldown):
await interaction.response.send_message(f'This command is on cooldown. Please wait {error.retry_after:.2f}s')
elif isinstance(exc, commands.MissingPermissions):
await interaction.response.send_message('You do not have the permissions to use this command.')```So when using the error handler I don't get anything back. But I also don't get an error inside of my side on my panel I'm using discord.py 2.0
don't use a program in the first place
learn a programming language and code it from the ground up
i can provide you with a list of reliable hosting providers, but i need to let you know none of those are free. you will never find good free hosting
Need to run your bot 24/7? Get a cheap VPS.
https://www.scaleway.com/ - Incredibly cheap but powerful VPSes, owned by https://online.net/, based in Europe.
https://www.hetzner.com/ - Germany-based VPSes, with prices starting from as low as €2.96
https://www.digitalocean.com/ - US-based cheap VPSes. The gold standard. Locations available world wide.
https://xenyth.net/ - A hosting solution made by Discord bot developers, aimed at a lower price range, starting from $2.49.
https://www.ovh.co.uk/ - Cheap VPSes, used by many people. France and Canadian locations available.
https://www.time4vps.eu/ - Cheap VPSes, seemingly based in Lithuania.
https://www.linode.com/ - More cheap VPSes!
https://www.vultr.com/ - US-based, DigitalOcean-like.
Self-hosting:
Any modern hardware should work 100% fine.
Free hosting:
No. There is no good free VPS hoster, outside of persuading somebody to host for you, which is incredibly unlikely.
...so it isn't good
what I've found out:
variables don't work
margin:auto doesn't always center it?
even a linear-gradient is considered an external image :/
hosting isn't free because it simply has maintenance fees just like your parents have to pay the electric bills
impossible without some investment
and the chance of your bot really growing big is extremely low
what you have built, someone built it better
used to
ages ago
There's some free options for hosting, but there is always a drawback to using free hosting services
cough Hetzner (Germany or USA)
i used to have a generic bot that was a mix of everything, it went nowhere and generated no profit because there's already bots that do that better. still, if you want to try to go big, you'll have to invest some money
example: heroku only has 550 free hours/month
You can use free hosts while your bot is small, but as it expands your needs will also likely expand
The hardware is generally the limiting factor
you could also get a pc wich will always be on and let your parents pay electric bills
wheres galaxygate >:(
although most parents probaly wont like that
Buy an rpi and host it on there 😉
i copypasted that tag from dapi 
i heard from people they go down like at least once every month and they get really hot
Well, no money means you're going to be limited
I hate it when people try to latch onto free stuff as much as possible, and then complain when something breaks or doesn't go as expected
get a job
if u add a credit card u can get 450+550 hours per month
in my country you can do newspaper from 13 y/o
sometimes, rpis are passive cooled iirc
I use Oracle's free tier VPS for hosting my bot. The hardware is limited, but my needs are limited. It works just fine for me, never been charged a penny.
someone made a cool list here but the mods wont pin it
only deliver, just to be clear
by the time you find a way to actually generate reliable income you'll grow out of your bot development phase
and from 14 you now can work stocking the supermarket cause they haven't got enough people so they lowered the minimum age lol
not in my country
14 years old is when you can start working in the US I believe
why dont you start freelancing
minimum working age in uk is 16
learn html & css and make websites for people online
fiverr idk
you live in the netherlands???
lol there is no easy solution the world isnt a fair place
you just have to get lucky and find something free or host yourself
worthy to note this is not everyone, you have to have natural talent for design and color theory to generate at least some clients
doesnt matter
online courses
or make discord bots for other people
and sell them
you made discord bots right?
true i dont have that sadly :(
youtube 🗿
bad idea in my opinion
you just have to figure out which tech stack works the best for you, and if it works at all
you'll only copy paste
some people are just not meant to be in the IT sector at all
The guides on YouTube are mostly outdated, which leads to deprecation or completely breaking behavior, which is why it's considered as a bad idea
w3schools might help
And it's like one of those Minecraft guides where the YouTuber says "I did some building off screen" and comes up with a giant walking redstone machine
So many steps skipped that you have no idea what even happened
well nothing really like that happened with me i mean i used latest packages and worked with them. if something was deprecated i read the docs
this is only valid in some cases though, for me there's two kinds of tutorial types - for masses and for ones who want to actually learn.
tutorials for masses are meant to be copypasted, tutorials for ones who want to learn will deep dive you into concepts and use a lot of buzzwords and try to explain to you. the latter will really only work for you if you're passionate about what you're doing
Well good for you, but many of the people hit a roadblock that way, and many important steps are skipped which leaves you with no option other than blindly asking people or trying out things without knowing what they do to fix it up, beginners don't tend to read the documentation, which is the main problem
most people click off the latter because they don't want to spend their time learning, god who would do that
Sad thing is i find it harder to find the ones for you that actually wanna learn versus the copy paste as that is what has taken over
😔
lucky me ig 😳
docs are sometimes hard to read to beginners
relatable to me
completely agree
but i eventually learned to read them
why doesn't it center in the email but it does in the browser??? https://cdn.luckiecrab.nl/i/chrome_IdlZebcfFK.png
pretty weird
Only person I found that actually taught me something was Traversy Media
same
the youtube algorithm sometimes blesses me with youtubers who know what they're doing, and it's always the small ones, because again, they're not meant for the masses
Web dev simplified is also pretty good tho
I learned my piss poor knowledge of react from em (mainly cause I was hardly paying attention)
Yeah, but most of them lead nowhere and skip many important parts of the thing you're trying to learn, which leaves you confused and just depart from what you actually want to learn, which is the main problem as mentioned
For most people it's just a deadend since they just don't want/tend to read the documentation or official guides
i learnt react from dev ed's 43 min video fr 💀 but continued to explore more things in it by reading docs and stuff
Traversy media finds a way to balance it out. He targets the masses but also teaches you something valuable
At least I myself have always managed to learn something from em
Ima take a break from this api for a bit and actually try and use some web dev stuff tbh
very good decision
departing myself from discord bots was the best thing i could do
It would be understandable if you want to rather watch YouTube videos to learn if the official documentation and guides of the thing you're trying to learn are too hard to read or too confusing
i learnt nodejs and js by making discord bots 💀
Such as Detritus' documentation 
some people just simply can't learn unless they see it for themselves in action voltrex
reading docs is cool but not everyone can learn that way
Too bad
its not too bad cause a lot of people make vids on it so
A lot of people making videos on it doesn't mean it's a good way to learn either, nor should be the preferred way even for beginners
it's better now that feud updated it
if there's still people in this convo interested in web dev i absolutely recommend these guys - https://youtube.com/c/DesignCourse & https://youtube.com/kepowob
New videos weekly from Monday to Thursday @ 10:30 AM ET!
Hi, I'm Gary. I've created close to 100 courses from graphic design to advanced frontend development. I've worked with Envato Network's TutsPlus.com, DigitalTutors.com, Pluralsight.com, LinkedIn Learning & Lynda.com.
I teach full stack development! Which means you ...
i cant remove embeds on the new android app
People spend more time writing good documentation and guides than those people who make janky videos on them
frontend too hard fr 😔 (designing in xd or figma and stuff)
this is pretty weird
the centering on the email works on mobile, but on pc it just is somewhere like 1/3rd on the screen
could it be the inbox?
like the email client
Again valid point, docs are good cool whatever, but you gotta understand there are different learning types
the worst part of frontend for me is using stacks to pack your code and actually make it work, the entire process of webpacking & using babel to polyfill is garbage and a dumpster fire
💀
I understand what you're trying to say, I'm just saying the latter, as watching stuff to learn is just not the sharpest tool in the shed, and should be avoided as much as possible even for beginners
i still do it though 
As I said, it's understandable if the documentation/guides of said thing you want to learn is janky
I mean it is bad if you don't do it properly
If you are trying to do what they are doing as they do it you aren't taking anything in as you're not paying attention to what they are saying you are just copying, if you wait for them to finish what they are saying then try it you will retain that knowledge better
making a design that works on multiple device screens is what truly sucks about frontend
one of the biggest turn-offs of frontend for me
Or you could say fuck you to people on mobile

i remove that weight by starting off with a ui library
all of the styles for responsiveness already done for me
Yeah, but most of them just doesn't provide a good way for the viewers to learn in videos either, as most of them just explain things in buzz words or ways you have no idea about which was already mentioned, which is the problematic thing, finding a good video guide on YouTube is like finding a shiny Pokemon
then from there start customizing your components
Valid point again, but videos in themselves aren't always completely useless, there are those who actually do explain things in the best way possible but the market for those videos are so flooded with people just copy pasting code from god knows where just to get a buck from views
And that is exactly my point
imagine making a design tho, i do it onspot
💀
who plans anything when doing frontend
same 💀 just brainstorming ideas and seeing what works the best
fr
The only coding videos I watch are the ones which benchmark tools which market themselves as BLAZINGLY FAST
everything else is a bore tbh
so, every npm lib ever? 
That reminded me of https://github.com/mTvare6/hello-world.rs
🚀🚀🚀🚀🚀
#1 LIBRARY FOR X, BLAZINGLY FAST
starred
rust 💀
few(1092) dependencies
"with a few(1092 🚀) dependencies", average Turkish Discord bot
XD
his cargo.lock really has like a lot of dependencies 💀
It has everything necessary to create a hello world
lmao
dependencies:
discord-js
discord-js-easy-commands
discord-js-easy-embeds
discord-js-make-entire-bot-for-me
tfw the only piece of your actual code in the bot is the token
Don't forget the infamous discord-buttons for extra bloat performance and express for no usage totally necessary web-server running in the background
the prophecy comes true
💀
ur mom is right next to node_modules
lmfao
The only thing heavier than the node_modules directory is a Turkish developer's will to write the most cursed code in humanity
lol
I bet I can write worse voltrex
eyo women are not just holes!!
ima not say what i wanted as i would probably get cancelled faster then trump
that's your opinion
An overview of an average Turkish developer's code:
https://github.com/top-gg/Luca
356 lines to write hello world
BLAZINGLY FAST
brainfuck moment
discord.bf fr
i don't know if it's just me because im not as active anymore, but i noticed a huge decrease in just absolute moron code in this channel
Hey I Have a discord bot with 141 cmd and i wanted to know if anyone wanted to help make 14 of them slash cmd
I am feeling bad for the poor chap that wrote that
no
Voltrex you call for turk turk comes
😔
is it paid?
It's because you not as active anymore, there still are a lot of nightmarish code
that indentation tho
auto
average day in python
that isn't the most cursed part
bruhga
The fucking code is trying to dodge bullets like in the Matrix
javascript 💤
lmao
bruh 💀
https://github.com/top-gg/Luca/blob/master/bot.js#L288-L315 worse part is this
code is dancing
https://www.youtube.com/watch?v=3-rfBsWmo0M
found this lovely gem in the code
I have a Patreon now if you feel like supporting my music and memes! https://www.patreon.com/functionalonawhim
I have a T-Shirt for that one egg meme if you want to buy one.
Buy the thing here:
https://teespring.com/anoddworldofmine
EDIT: WTF IS THIS OwO?
https://www.youtube.com/watch?v=jhO7nd5u8cs&lc=z23gcj4bk...
?
My nervous system when I stub my toe
will i get paid for my time helping you
what were the contributors/devs thinking 💀
they took molly
thought Tim's the only capitalist here
they thought they were funny
I am sorry man i am poor and it is only 14 cmd
sad thing is this code probably works
can't wait to delay entire application when call wait func
I doubt that is the actual code for luca
10 commands bot on fiverr is 10$
So I got a lot of the everything api done
If you're ever bored, take the code in that Luca repository and rewrite it to actually be optimized for fun
what commands
accepted
i was about to say node 18 supports async timers but then i remembered that is webdev
good lock soldier
Damn
I'd rather shoot my self
perhaps i should use reducer
a lot states eh
yeah
Node.js v16 already supports them
that is so original! where did you get the idea for those commands?
I need to learn more react
but idk what to make in react to actually use the features react offers rather then doing simple shit
🤔
those are simple and with a bit of knowledge you should be able to do them
we will help
but not code for you
Oof
since it's not a topic of this channel
Yet another kitchen sink bot what an awesome bot
i wish people came in here with more original ideas
Nope i found 12 different bot scr like GOOD well made bots and mashed them in
I don't think that will ever happen
it's so fun to work on a problem that stems from an original idea
fr
imagine not copying other people's stuff
That still doesn't invalidate the fact that it's a kitchen sink bot, a million bots out there have those commands
everytime i look for project ideas on net, every fucking website shows the same shit
WYM kitchen sink
Bro that is just info i wanted
i just dug up this absolute gem of a video
In this video (Part 1 of 932) we show you how to create an integer in C++.
Discord: https://discord.gg/td9RFwWf
Twitter: http://twitter.com/jombo
needs to be passed down the generations
Kitchen sink bots are bots that copy other bots' commands and the developers try to shove as many commands as possible to it with absolutely no originality
copy other bots commands as in ideas or the code
I've seen that video, amazing
. reply didnt work tf
As in the idea and concept
@earnest phoenix this code stucks in an infinite loop
I swear that voice is how I imagine the golden Indian apple guy (who got banned) sounds like
the top comment tho
Oh? Time to refactor it to stop it from being stuck 
Yes
🤝

seems like a lot of bots have those types of commands
did u get the stormbringer achievement?
Oh hell nah, that's like one of the hardest achievements ever in a video game
alright so
channelinfo -> Channel object (built-in API)
commandcount -> self
help -> self (all)
invitations -> Guild.fetch<Invites> (also built-in API)
level -> session database, key-value (small member count)
poll -> Interaction<(Button, Button)>, database <Message, Option[]> where Option is { text: string, count: num } and an action listener
roleinfo -> Guild/GuildMember (built-in API)
rolememberinfo -> EINVARG: what
severinfo -> Guild (built-in API)
uptime -> self
weather -> Fetch (runtime API) -> website
whois -> User/GuildMember (built-in API)
fr imagine defeating monsoon with no damage
MF no damage and get S rank on all ranked battles in the Revengeance difficulty where the enemies can almost one tap you
Most of the ranked battles requires you to get 5000 battle points, not just the no damage bonus
i am still not able to defeat armstrong on very hard (the fist fight)
man just explodes out of nowhere
this is fine right
Let's talk about that in #general though, it's off-topic here
for objects where its values are non-consistent or nested objects
Yes
wew
Any recommendations on what I should learn before diving into LLVM?
The only language parsers I've ever made are in C# and Java, so C++ might be a bit of a jump
remember my offer
20$ - 80h
got a lot of stuff to do
can't finish my construction site outsite
I don't know any PHP unfortunately
pants down and do what u have to to get my money
So my intuition was right, it was a joke lol
:D
🤨
I see that sounds weird in English
Just slightly 
yeah I noticed
got literally nothing to do for you then
can send u some cash just for fun like tim but that wont help you out, too
I'm gonna set a goal of making my own language this summer, whether I achieve it or not will be up to me
That'll at least look good for potential tech internships and such
hmm collecting experience or not
ok what the fuck llvm lmao
but do something you may can work with later on
following some long term goal
oh got what a syntax
intensely casting
Ill stay with php my gosh
guys discord doesn't approve of music bots anymore?
Nah, not really
Patience is hard fam 😛
🙂
regarding that bullshit quality on discord anyways
Ye, just something to fill the gaps xD
it's not discord that's the problem
it's the platforms that the bots stream from
tons of legal trouble
Copyright laws, YouTube/Spotify TOS etc
please wait patiently until your ban takes in place, listen some music meanwhile
back in 2017/2018 i actually used them to stream music while my phone screen was off lmfao
lol
youtube vanced wasn't a thing and spotify wasn't in my country yet
I could not live without YT premium. No ads + background play ❤️
iOS so no YT vanced for me
you can bypass ads even on ios by using blokada iirc
blokada sets up a vpn middleware that blocks all traffic to ads
Ye not going to route my traffic via a sketchy third part kek
I mean my pihole and adlists block most of them, too
it isn't third party
but so many new always
f bro
your traffic isn't going through another provider
vanced also got poofed from pc
which need to be added to the lists
it's a local vpn
😔
Ah
Wasn't there a browser on iOS doing that in the past?
Like puffin on however it was called
the only con is that since it's running locally, it drains battery a lot
i only use it when im reading articles on my phone
shouldn't be a big deal to host the vpn server on a system in your network
thing is im almost always running on data on my phone
even at home lol
unlimited + 5g makes it more ideal than my actual home internet speed
I run a pi.hole for all my ad blocking, pretty slick to have a network wide adblocker
yeah
especially when it comes to ad and service blocking on 3rd party devices like IoT devices, smart TVs etc.
I'm paranoid I guess
but i'm literally blocking any communication I don't like
well I see, I'm a little bit more paranoid than u
I could probably get the block % up a bit further with more strict rules
They get annoyed I break their facebook ads 
Got it enabled on my devices tho, but % is still low due to that
Ye
What I like the most is seeing when people go to bed on the network graph xD
Guess when we went on holiday 😛

i see you're spying
does your query log contain the domain names the people are requesting?
lol now I realize 117 clients are connected to your pihole
wtf
and I thought I'm a crazy nerd with 17 devices in my house
I got a... well... a connected home

How can I live without my WiFi connected RGB lights 

Probably sending all my data to China
ffs 1gig up and down
Upload is what pains me the most
I'm literally dreaming of 1gig upload Sir
I do a lot of large Git operations and Media uploads
So would be slick to have upload fast again
yeah got two servers running here and 50 mbit is not enough
Yeah, thats yeah, suffering
So Express.Multer.File.size says it returns the size of the file in bytes
But it doesn't seem to convert well when trying to calculate how big it is in megabytes
Bytes / 1024 / 1024 = megabytes
That would be way too large
lmfao
What the hell does the OS do to make it round up to 4.17 when I am getting a fuck ton of numbers after 4.17
It… rounds the fucking number you dingus
Idk what language you’re using
Ts?
<Number>.toFixed(2) for 2 decimal spots
new speedb update: you can now include select columns to return instead of returning everything and wasting unused resources and performance reading and sending it
i love using my database in my projects
when i need a functionality i just implement it
Yea ofc it rounds but I haven't touched the math library or fucked with numbers that much so I didn't know toFixed existed ya dingus
shameless ad? jk
my db is shitting itself rn
sucks
So I was just sitting here thinking about something, I was making a database table for images that is going to be saved to display later. But if I am saving the images to the disk and or a s3 bucket. What is the point of the table
🤔
Well, a table can hold important data.
It's hard to tell without context, but like ownership info, public/private settings, view counts, users who have permission to modify the image, titles, description, etc all can be in the database table.
All that can theoretically be stored as meta data. But a database table will be more stable and significantly faster.
I see, I didn't think about it that way
Thanks
This will be helpful if I ever think of adding permissions for images
I really suggest planning your database now even if you're not going to implement it in code yet.
I've backed myself into a corner by not properly planning databases
speedb update: fixed bug where fetching many records without specifying specific parameters would error the database causing timeouts and deadlocks for future queries
Yea I was planning on doing so
What?
a post request probably 
I don’t think Instagram has a public API for that. Sounds against ToS
It doesn't
you can packet sniff to see what endpoint the client is requesting and what the body looks like
or just route traffic through a proxy you own and can log data through
that's the easiest way to reverse engineer a client
if it offers a web client, you can use the networking tab of dev tools
I am getting this error when using minio to put an object to my bucket
BadRequestException: write EPROTO 305E0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:355:```
nice error 🗿
I severely underestimated the size of llvm
holy shit lmfao
took me 2 hours to install
Can someone teach me some basic bot coding tools?
visual studio code
ez
all you really need to start coding
and ofc knowledge of the lang you are using but that is implied when you start coding a bot
I am going to tell you now don't
it is living hell
Nah
I don't even know anything for mobile development
I have mimo app should be easy-
Anything you'll use won't likely have intellisense so it will be like coding blind
imagine using intellisense when coding
Shut up before I indent your code
ok so LLVM is fucking amazing why have I not been using this sooner
you are too small brained that is why
you watch xqc
xqc 👍
qvc 👍
true cocomelon good
cocomeelon 💀💀
let values = collect.values[0]
TypeError: Cannot read properties of undefined (reading '0')
is there a problem right here ?
seems like there is nothing at 0
console log collect.values to make sure there is anything in the array
values or values()
__values__()
OwO
await member.ban({reason: reason, days: 99})
if i want it DON't_delete_any
what should i do ?
in the days ?
Meh
Just don't set the days key maybe
when passing strings to a page in ejs, this is highly inefficient https://www.toptal.com/developers/hastebin/cevexafozo.js
how do i make it more efficient in length
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
You’ll have to set days to 0, it defaults to 1 I believe.
(I might be wrong though)
why do you say its inefficient?
because of the number of lines it uses
the number of lines doesnt really affect performance
i don't mean it in terms of performance
but if you want to make it shorter you can put everything in a loop
i mean it in terms of the length of the inevitable file
it would help if your keys are the same as the string youre sending to the translate funcion
then you can just do ```js
const items = ["abc", "xyz", ...]
const obj = {}
for(item of items) {
obj[item] = translate(lang, item)
}
but if you cant make them the same, then you need an object mapping them to each other
🗿
how do I get the banner from a person?
You can get it from the banner hash returned on the user object
https://discord.com/developers/docs/resources/user#get-user
https://discord.com/developers/docs/resources/user#user-object
To use the image hash look at the cdn structure https://discord.com/developers/docs/reference#image-formatting
💀
const collector = interaction.channel.createMessageComponentCollector({type: "SELECT_MENU"})
collector.on("collect", (collect) => {
let values = collect.values[0]
if(values === "4"){
const embed1 = new MessageEmbed()
.setColor("WHITE")
.setTitle("**Memes Commands**")
.setDescription(`
\`${prefix}am\` : **__Showing Arabic Memes__** \n
\`${prefix}em\` : **__Showing English Memes__** \n
`)
collect.reply({embeds: [embed1], ephemeral: true})
}
if(values === "5"){
const embed2 = new MessageEmbed()
.setColor("WHITE")
.setTitle("**Games and Fun Commands**")
.setDescription(`
\`${prefix}youtube\` : **__Watch youtube videos in a voice channel \n
\`${prefix}tictactoe\` : **__Tic tac toc game__** \n
\`${prefix}choose\` : **__Would Your Rather Game__** \n
\`${prefix}encut\` : **__English Question__** \n
\`${prefix}cut\` : **__Arabic Question__** \n
`)
collect.reply({embeds: [embed2], ephemeral: true})
}
if(values === "6"){
const embed3 = new MessageEmbed()
.setColor("WHITE")
.setTitle("**Memes Commands**")
.setTimestamp()
.setDescription(`
\`${prefix}timeout\`: **timeout a member from the guild__** \n
\`${prefix}nuke\`: **__Nuke a Channel From The server__** \n
\`${prefix}ban\`: **__Ban a member from the guild__** \n
\`${prefix}kick\`: **__Kick a member from the guild__** \n
\`${prefix}mute\`: **__Mute a member from the guild__** \n
\`${prefix}unmute\`: **__Unmute a member from the guild__** \n
The version in not completed in moderation
`)
collect.reply({embeds: [embed3], ephemeral: true})
}
})```
error
TypeError: Cannot read properties of undefined (reading '0')
how to fix it ?
collect.values is undefined
collect is simply an interaction
it has no values prop
so i need to do
No idea it is your code
collect.values === "4"
perhaps you should try reading the documentation
._.
I know this dude did not just try and use values after being told it does not exist
also, I'm not sure why you're doing type: "SELECT_MENU"
I'm surprised that even works
it should be componentType: "SELECT_MENU"
alright
the collect event on that collection returns an Interaction
this is what an interaction is
Technically the type is SelectMenuInteraction
So it does have a values prop
When it's undefined, there is no value selected. You need to check if it exists first, then you can do let values = collect.values[0]
k
Oh he's using a select menu?
use ur brain misty
yes
i think this incorrect
const collector = interaction.channel.createMessageComponentCollector({componentType: "SELECT_MENU"})
that's correct according to the docs
not what the docs say
unless you're using an outdated version of djs
i used it when i run /help

