#development
1 messages ยท Page 1445 of 1
That port doesn't exist, lol
literally the first thing I tried https://cdn.yxridev.com/u/VoAQIk3t.png
Does everyone have their own CDN ๐
is there any problem in it ?
HTML - <div class="best bot">
CSS - best bot{ position: 100px; }
its pointless trying to get help from this server
class="best-bot"
.best-bot
It's good to learn, I couldn't do big bot stuff without it
it creates a separate class
Absolutely great to learn. I work with it everyday, haha
basically applying two classes to your element, best and bot
netstat -aon | findstr 6379 @obtuse jolt
mongo db is better maybe
whats postgres ?
no its not
yes it is
no
okay pleb
guys, how do I load an image from a url to an embed?
it would'nt be better but it would be best

discord.js
when you send a message you can use the image property on the payload
if you scrubbing with d.js shitty embed builder, use setImage('url here')
<message>.attachment.cache.first() / <message>.attachment.first() not sure
FROM a url TO an embed
did what?
lmao
syntax looks fine to me
the mainEmbed is already defined
you sure that url is fine?
lol
maybe I mislooked
channel.send({embed: {image: {url: 'https://imgur.com/Ed2AqAr'}}})```
I reset the bot to double check
i'd highly recommend stoping using d.js embed builder btw
it's working fine
its absolutely garbage
but user-side looks the same, right?
correct
aight
check the pic for examples
but, what's the difference?
you calling constructors, methods, all that garbage just to make an object
fuck that, work with the object yourself, its much better
true, gotta rebuild this
not like you're ever gonna be making 1 million embeds
xD
its legit 15x worse
true
๐
150% more time needed for no reason whatsoever
my OCDs ask to get more and more
pokecord and those big botums probably got close ngl
since its not reliant on commands
whats wrong here <div class="best-bot"><h3>Discord's best utility bot</h3></div> .best-bot h1{ top: 350px; left: 500px; color: white }
its all just spam
fa fa-github w3-hover-opacity w3-hover-white w3-button"``` currently this shows a github icon
how do i get a discord icon?
use fa's discord icon?
anyone got an idea why this wont loop ~ baring a week of tryng to troubleshoot but fails everytime
const opus = require('opusscript');
const ffmpeg = require('ffmpeg')
exports.run = async (client, message, play, args) => {
if (message.member.voice.channel) {
const connection = await message.member.voice.channel.join();
const dispatcher = connection.play('beep.wav', { volume: 0.7 })
dispatcher.on('start', () => {
message.channel.send('Crystal Test Radio is now playing!');
console.log('Crystal Test Radio is now playing!');
});
dispatcher.on('finish', () => {
play(connection);
});
dispatcher.on('error', console.error);
}
}
define play
how ive tried defying as a function then it breaks it
how
im more comfortable with sql but i was wondering why mongo db is bettetr\\
[93, 48, 88, 50, 78, 76, 28, 21, 17, 5]
This is very sorted.
i want free vps
shouldnt you use something like this:
message.member.voiceChannel.join()
.then(connection => {
connection.play('beep.wav', { volume: 0.7 })
})
I'll be very happy to disappoint you that there are no proper VPS
.sort(a,b => a - b)
done
I'm supposed to write quick sort manually
you can do what i did for my mc server
you welcome
and just host it on an old desktop
imagine being fucked by indents
yea
I can't do that
python is ingrained in my brain
To keep pc 24/7
we have the clusterfuck of js libs while the py stuffies , while maintaining sanity @slender thistle
i never mess up indentation ๐
come to ts
you cant get a FREE vps unless you use a trial
py >>>
no
it costs money to run servers

unsure will givew it a shot new to trying to play local files lmao
js >>>>>
nah
YAY another one done
c++ > ruby/ts > rest
c++ is awfully usefull
actually that syntax is valid in python
smh smh
yes it is
just go with python or java
burn the sinner
for what
try c++
there are better structured languages
then why java
^^^^^^^^
because its better than c and their weird cluster fuck of syntax
LOL what
c isnt c++
do you really know c++ though
heap sort, here we go
who the fuck knows c++ and calls it c rather than cpp
watch them say they know c now
it was painful


do you tho
lol i was just about to say that
nah
people dont use languages based off of how fun they are

then maybe you should learn
sounds like a personal issue
this language is shit because i didnt have fun, some angry user, leaving a 1* review on google reviews
if you're having a headache, you're probably trying to do something far above your ability
you gotta start small
isn't this valid java
how dare you say i cant code a discord bot while not knowing js?

:ooooo
how dare u make me look at the requirements to do stuff
i started with a discord bot in py

lmao
spoonfeed
doubt
beaned

ye
but
like
its like saying capitalism bad and getting a job
u still believe capitalism bad
but u need money
Well, does the 'fun' thing get the job done well?
sounds shit
just like
i can hate a language
even if i might have to use it
to code in a job
uh huh
ok ur right
trust me you'll hate it absrage
well i mean i am intrested in ai development
so ill prob use a lot of puy
py*
anyway

no
?
ai development first language is math
1+1?
like ive written some simple ai programs
Can someone help me in html and css ?
and neural networks
i have a vague understand of html and css lol
^
https://tesladev.glitch.me/ open this website menu and teel me whats solution @outer zenith in mobile
Pls
for roblox?
TBF its probably easy with stuff like tensorflow
i mean
lmao
i once tried to hand code neural networks
it was a pain
and ill stick to pytorch
ok
ok
ok
ok
ah i see ur problem
maybe take off the T symbol
bruh momento
and then
AI development looks boring
just show the menu
@gilded olive mobile
when u open
what is tesla bot going to do
i mean kinda
buy a tesla?
but its useful
from discord
@gilded olive what does tesla bot do
And this is not menu @gilded olive
and dont try to cshow the T symbol
@outer zenith yes
the commands page gives me 404
its shinchans
Mine
what does it do
it says "or must be under development"
lmao
so i think its fine
@hollow sedge can u help me ? @gilded olive @outer zenith
idk, can i?
remove the Logo class when the size goes to mobile
Yes pls @hollow sedge
do this
Um
that's what I meant
although if you were doing mobile first development you could remove the logo class i believe
sounded wrong so my b
internal sharding or sharding manager?
lmao
manager
my only real experience with html is khanacademy
but i can do basic html
not html + js tho
Html is basic tho lol
css is the real thing
Yeah
and then you make animations
html is basic ye
Where to put display:none ?
you need to use a media query
process.exit() will restart the current shard
@hollow sedge i am using
otherwise you need to breadcastEval
Breadcast
@quartz kindle you develop djs light ?
ye
Noice
so how would i broadcast a message to only one shard?
Any ways.. i need help ๐
I sent you a link @earnest phoenix
@earnest phoenix u got ur code?
@earnest phoenix
broadcasteval(code, shardnum)
.broadcastEval("if(client.shard.ids[0] === yourShardIDHere) { do something }")
@outer zenith wanna join my glitch project ?
@gilded olive readed it
oh u mean
theres also .broadcastEval('code', shardNumber)
Ye @outer zenith
yes that will also work, forgot djs had that
join*
Wait what
@outer zenith glitch project
To help me
Can't you get help here?
or somethign?
No
@outer zenith no
then what
@outer zenith my hosting service project
wait ur making a hosting service?
NO
Glitch is a service that hosts web apps
Help me
Check that link already
ill help u after i finish transfering my leveling system to sql
never finishes leveling system
@outer zenith its 11:18pm in indai

i used to do that when i didnt like people
"oh i'll help you when i finish this"
never finishes
Lol
11:18pm? lightwork
:(
Figure it out yourself if you don't have time to wait
with all my other commands
Not you
oh
@lone palm what exactly are you trying to change?
join messages were a pain to make tho
@rustic nova
Nop
?
i hope hope hopes people hope to hope hope
ok ok ok
I try the vote button and the invite bot change the color when the mouse is on it
im 25% done
dude it took me 3 months to rework my bot from json to sqlite
most easiest thing i did https://i.imgur.com/9785IF7.gif
of course i reworked everything not only the storage
Yes, but it doesn't work
then I do something 100% wrong
yes
because you're not using the proper css selector
inspect element is your friend
i am so boring any one here chat with me then add me
we started out with 23
if you are boring, people wont chat with you. also, wrong channel
but it doesn't work
you're not selecting the proper thing, use inspect element on one of these buttons
show me what you called it
try around with the rules section
when i do larger changes i ctrl+F a bunch of stuff to re-learn what my code is doing
The what?
of inspect element
imagine not organizing
or your style tag on your long description is wrong
i do TODO' comments on specific parts of the code, but i also have a separate file for ideas and bigger changes
i try to organize my code by making the code itself clean and readable
in your long description field in your bot settings @lone palm
that's where you need to set them
if you were to use Ts for example, its good to add //TODO this for example like using :any in a returned type from a database call
before you finalize the shape of it
//TODO add interface for table blah
Set what and where?
You're trying to mess around with the css and do not know how to actually apply it to your bot page?
I know how css works, only if you make things more complicated than it is, it is possible that I have not yet learned something but what you have learned @rustic nova
yeah use inspect element
if you're using github, i think there's a board to organize stuff like this
that i never use
but i want to
ah
it's the thought that counts
no
That's the inspect element: .entity-header__button-text
๐ฎ
that was a bad pun ๐ฅถ
but not the correct one for the hover, now please stop pinging me as i need to still do my assignments that are due in like 2 hours thank you
how do fix https://cdn.yxridev.com/u/glqPE7fH.png
that moment when you comment the answer in SO and someone steals that and makes their own answer
Thank you for not even trying to help or teaching me, but the only thing you've done is to stimulate me

I literally told you what to do: Play around with inspect element. It is the most accurate thing you can use to get the css selectors for your design
Inspect element is way more informative than i can explain it.
Well, when you can't explain better
Although you already have the solution to the problem 
lmao
i was thinking of adding a plugin to my bot
thats basically the free to play model x econ
simple fix: dont use phpmyadmin or what ever is that
lmao yea
its not too hard to get the play funcitonallity although it is a bit hard
but dude
ive been trying to fix my queue functionallity
since early noveember
AHHHHHHHHHHHH
which is why my music plugin is still in dev
patience is key
how about i just y'know dont listen to whitenames, sounds like good advice to me tbh
I mean... they're not wrong, mysql itself is bad and phpmyadmin along with it.
Evie rate my code```js
const { MessageEmbed } = require('discord.js-light');
module.exports = {
name: 'ping',
requiredPermissions: undefined,
owner: false,
run: async (message, args) => {
let embed = new MessageEmbed()
.setAuthor(message.author.tag, message.author.avatarURL())
.setTitle(Pong!)
.setColor(message.member.displayHexColor)
.setFooter('Developed by MILLION#1321')
.setTimestamp();
let m = await message.channel.send(embed);
let embed2 = new MessageEmbed()
.setAuthor(message.author.tag, message.author.avatarURL())
.setTitle(`Pong! (${Math.round(Math.random() * 100)}ms)`)
.setColor(message.member.displayHexColor)
.setFooter('Developed by MILLION#1321')
.setTimestamp();
m.edit(embed2);
}
};```
there we go
it is?
yes
Here's my justification:
TL;DR: MySQL is a bad database. Don't use it unless you have literally no other option.
Why shouldn't I use MySQL?
- MySQL has no transactional DDL. This means that if you fuck up creating a table in the middle of a migration, you cannot rollback easily.
- MySQL has a lot of security issues. New zero-day vulnerabilities are found regularly.
- MySQL is owned by Oracle.
- MySQL is slow. It beats Postgres etc at some things, but once you move beyond basic queries it begins to slog.
- MySQL disconnects you randomly. Unless you setup your connection specially, it will break regularly.
- MySQL allows all kinds of insane data to be inserted. '0000-00-00' is valid in MySQL.
- MySQL is not ANSI compliant. You have to turn it on; even then it isn't fully compliant.
- MySQL has no feature advantage over other databases; PostgreSQL has many more useful features (such as RETURNs).
There is no reason to use MySQL over PostgreSQL, or even sqlite3. See also:
https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/
https://grimoire.ca/mysql/choose-something-else
embed.setTitle() , you don't need to make two embeds, you can just edit the existing one and then edit the message with the edited embed. ๐
im not swapping any time soon https://cdn.yxridev.com/u/LVJeAyWG.png
63ms
i dont need to
using atlas or something?
You still calculate in MS and not in nanoseconds? lol
thats mysql
so slow
nanoseconds or microseconds?
its a select * query
nothing, sqlite is fine
its interesting how you all bully my query speed also but dont touch the db ping
the only downside of sqlite is that it's filebased and can't natively receive multiple "client" connections from different machines
^ if you want to do that use mongo or postgres instead (well there's others too, like mariadb but these are most used)
yeah postgresql is superior to mysql in every significant way
i keep telling them pg is the way to go but its too good for them

i guess
but like
for a discord bot
it should be fine
right?
yea
Yeah absolutely, sqlite is great for discord bots since it's better for "query often, write rarely" systems, which is usually what discord bots do (like, getting a prefix every message, only writing when someone edits it, for example)
ugh i hate frontend ngl
well my leveling is constant editing
but im changing that
to writing to a dict
then every so often updating the db
honestly just use enmap ๐ ยฏ_(ใ)_/ยฏ
literally has an example for you in the docs. https://enmap.evie.dev/complete-examples/points
Imagine thinking sqlite isn't a real db. smh.
huh
How to hide css in ejs while inspecting?
@outer zenith no need of your help
I fixed ๐
hey
Yeh
Does someone know this error:
Error parsing info: Unable to retrieve video metadata
Is from a Play Command Its Js
@earnest phoenix google knows everything
discord.js
how can i console.log only the guild id and owner name?
I know but this Google don't know :)
@jovial nexus <guild>.id and <guild>.ownerID i am not sure
all my bot guilds
Can someone help me and tell me why :hover with the votebutton does not work for me?
Code:
.entity-header__button-text:hover {
background-color: black;
}
@jovial nexus ah thats against tos
Caps off
logging the guild owner information? that's not against ToS, why would it be? It's public information if you're on the server.
no, discord tos allows it if you have an inogranic grow

how would i go around making an interactive cmd, for example:
;setup
what's your prefix?
;
db.set("prefix", answer1)
what's your channelid
idhere
like that
i think it has to do with message collectors?
message collectors or simply awaitMessages if using discord.js
How to make add prefix command ?
What I do is this handy little function: ```js
exports.awaitReply = async ({
message,
question,
limit = 60000,
returnFullMessage = false,
}) => {
const filter = m => m.author.id === message.author.id;
await message.channel.send(question);
try {
const collected = await message.channel.awaitMessages(filter, { max: 1, time: limit, errors: ["time"] });
return returnFullMessage ? collected.first() : collected.first().content;
} catch (e) {
return false;
}
};
so I get a single question, single answer
if you want to have a per-server prefix you'll need to have a database to start with. check out https://enmap.evie.dev/complete-examples/per-server-settings, I have a full example using enmap.
lmao
anytime someone mentions needing a db you link enmap?
oh no absolutely not
only when they're my target audience - when they are beginners and not able to use bigger databases.
so most people that mention that they need a db
but not all since some are just upgrading
It's situational
Just like anything else I say here, I just try to be as helpful as I can .
const answer = await message.channel.awaitMessages(res => res.author.id === message.author.id, {
max: 1,
time: 480000,
})
if(!answer.size){
return
}
const reply = answer.first().content
message.channel.send(`${reply}`)
``` @umbral zealot
mmmkay?
I feel it
looks like a "not as good" version of what I sent ๐
That is clearer
clearer but not as useful, imho.
xd ok
what is cleaner?
imo cleaner means looks nicer and does its job
Evie's function pretty hot
that collector isnt that hot
what is =>
in js it signals an arrow function
ES6 functions. Check out https://js.evie.dev/functions#es6-functions
blog post?
more of a tutorial/documentation
oh do u have a youtube channel or somethin
I like when devs do that
?
I do but what's on my channel isn't up to date anyway
i forgot to upload the db to the dict on start
What's the best way to get icons of all the users within a guild??
Its actually a bad idea to do that imo, but rather get it the first time you need it. @outer zenith
For each item in the db
well i regularly update it so...
on regular intervavls
since updating it everytime a message comes in
This is your leveling system right?
yes
just do guild.members
for loop
don't its api abuse
Yeah, so if someone deletes their discord account or stops using it, your caching that data in memory still
just cache the entire db
ah makes sense
ok ima be helpful now
nah i need to change that
Should I fetch the prefix on every message?
Can someone help me and tell me why :hover with the votebutton does not work for me?
Code:
.entity-header__button-text:hover {
background-color: black;
}
Hi
right
What does this error mean.
whats the issue
but it keeps getting blocked by cors
anyone know how i can fix that
the api is based in express btw
https://www.techrepublic.com/article/why-the-shift-from-centos-to-centos-stream-is-a-big-mistake/
Looks like centos shot itself in the foot
If youโre on it time to move to another distro
I got an email today from cPanel saying theyโre withdrawing support for centos from next year
Theyโre moving to ubuntu as a base
beaned
@earnest phoenix message payload comes with the mentions already
dunno how to do it in py, but its in the message structure
Same question as before: What do you mean by "Float"
just add water under it
Hey guys my bot is not showing the members for each category, any help?
No but you see the profile picture of the bot I saw on the profile pictures of the bots on "top.gg" that we could float them and I would do the same but I do not know how to do it
In order to see presence data you need to turn on the "Presence intents" in the bot's page on the developer portal.
we still have no clue at all what you mean by "Float"
Show us an example
OK 2 s
Okey*
frThere's been more since the last top.gg update
.-. @umbral zealot
That doesn't answer the question.
"there's a lot of them" doesn't tell me what it is
He and more there.
If there's so many of them, show us one.
I can't show you what it is if he's there anymore.
Then we cannot help you, unless you're able to give us more information what you mean by "Float" because we literally have no clue what you're asking, still.
.catch() still logs โ
if you make it log yes
says it wasn't handled
does anyone have a annoucement bot
when I pass a value to module.exports and change them , wll they change is globally?
cuz, when someone doesn't give a certain permission to the bot in a certain channel for example, the error gets logged and says it wasn't handled. but, doesnt' the empty catch handle it without logging?
would querying your db every min a big brain idea
yes. things that you require() are cached so if you export a class or something, changing from one file changes in others.
oh
does anyone have a annoucement bot
wow , will try it , thx!
there are hundreds of bots with this feature. https://top.gg/search?q=announcement
๐
if you can provide your full code and error message we can maybe try to figure it out
@umbral zealot i mean with the code with it so i can change it up
I mean, an announcement command is literally "tkae the message and send it to another channel"
not exactly something that requires thousands of lines of code y'know ๐
so what do i type in
sounds like you need to learn programming and read the docs, tbh.
i am
2020-12-11T19:48:11.205415+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
2020-12-11T19:48:11.205431+00:00 app[worker.1]: at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
2020-12-11T19:48:11.205432+00:00 app[worker.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-12-11T19:48:11.205521+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
there you go
is that a announce bot
Go use something.host
this mean ur bot doesn't have that permission
you can't just stop that from logging
or you have to change the source file from discord.js
I have no money
in node_modules
You can, just check that the bot has permission to do whatever it is trying to do and ignore it
Hey, so how can I delete the specified object without deleting the whole thing?
are you using the libary mongoose?
yes
if i made a command like ;prefix ! how would i make it overwrite a .env file
either set it with assignment (process.env.x = y) or (recommended) check if the prefix exists first and use that if it does.
honestly for anilsit compatitbility
ill just keep the same commands
and have a command to switch from mal to anilist for each user
the api is easy to use
how to convert two emojis with twemoji
const twemote = await twemoji.parse(ax[0].trim())
const twemote2 = await twemoji.parse(ax[1].trim())
const regex = /src="(.+)"/g
console.log(regex.exec(twemote))
console.log(regex.exec(twemote2))
[
'src="https://twemoji.maxcdn.com/v/13.0.1/72x72/1f602.png"',
'https://twemoji.maxcdn.com/v/13.0.1/72x72/1f602.png',
index: 46,
input: '<img class="emoji" draggable="false" alt="๐" src="https://twemoji.maxcdn.com/v/13.0.1/72x72/1f602.png"/>',
groups: undefined
]
null
no it's not xD
is it 100% free and 24/7 up? cuz heroku shuts down after 550h
So I've got this paginator, listens for reactions for a minute before timing out. Works exactly as intended when I run it on my test bot account.
When I run the exact same code on my real bot account (in ~3k guilds), it times out after like 5 seconds. Anyone got a clue what's going on?
Yes
Product temporarily out of stock
how to do you splice objects in a array with mongodb
do u mean add/remove certain objects stored in mongodb?
yh
are u using mongoose?
i want it to remove the object the user specified
yh
but how im confused
If I am using cloudflare on my site, will people still be able to get the raw public IP address by pinging it?
actually you can get 1000 hours/month with heroku just by entering your payment info
wat
I checked
aw
now I know
i was about to define each word
do you know what's MB Way?
megabytes?
nah, forget
ok
it's like a Credit Card manager
you can create a temporary credit card with only 5โฌ
i mean
with this app
what if I enter the temporary credit card?
will they check if it's expired?
with a temporary, they won't get any info form my Credit Card
what are they going to do with that info
and that way, they can't charge me for whatever reason
who knows
they cant just do that
wdym who knows
who knows that amazon wont charge you for no reason
I've attached my CC to Heroku before
and some other services as well
Can my laptop revive itself please
how can i get program uptime, and ram usage, and like cpu usage etc with pm2?
like i want to take pm2 data
and show on my website
not a single cent gone without my explicit knowledge
yeah because that would literally be illegal
i think you'd have to send that info via webhooks
ye but how can i get the info
like they have a website
and im pretty sure there is a way
but im not exactly sure
I'm not very knowledgeable of mongoose myself, but this is an example you could possibly do:
model.find({
data: variable
}, function (err, result) {
if (err) throw err;
// Alter whatever data here
model.replaceOne({
data: variable
}, {
data: newData
}, function (err, result) {
if (err) throw err;
// Success
}).catch(err => console.log(err));
}).catch(err => console.log(err));
Again, this may not be the best method or the most-suited method to what you're trying to do.
not that I have any OCD or so, I am just outsmarting
outsmarting who?
Outsmarting who or what lol
imagine if they try or happens something
i think you should use psutil not pm2
if what happens
I don't have time to lawsuit anyone
class action
I haven't lost a single cent from any service I use 
and that's great
Mhm
๐๐ป
Yeah I won't bother trying to reassure you here
you wouldnt have to
since when has a company done that
these are multi-billion dollar companies that we're talking about
The Unlicense license would like to offer you a deal
uhhh
using pm2, how can i get the like program data
like how can i get the data from pm2 of a program's uptime for example
thxs will try juss now
can anyone help? like with pm2 how can i get proccess data?
@green kestrel u use pm2 right?
highly doubt he does
i looked into it a bit and im getting the feeling that pm2 isnt the right tool for what you want to do
i said you could try psutil
does it allow like getting program stats?
"psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. It is useful mainly for system monitoring, profiling, limiting process resources and the management of running processes."
from inside the program or from outside?
well both would work
like its for a stats page
from outside you would use tools like task manager on windows or top on linux
from inside you would use whatever libraries there are for obtaining system data and process data
im pretty sure the best way to do that is to use psutil with webhooks
usually building a fully featured monitoring system involves using a time series database and a data collection server such as prometheus
get it to where?
like into the database
pm2 has a cli and libraries to interact with it
does pm2 have a python library?
you can run some kind of exec command to call pm2's command line utilities
oh that makes sense
still dont understand why you NEED pm2 when there is already a module for this
there seem to be many libraries as well
it gives me processes
but i need to get the output
i have multiple programs
so i need to get their stats
lol i dont think any of those libraries will work
pm2 is npm
pm2 jlist outputs everything in json format
bc it works
i mean if hes already using pm2 as a process manager for other things, it makes sense to access data from pm2
i dont think he is



