#development
1 messages · Page 1055 of 1
./folder/folder/file
oh
im really trying not to spoonfeed, but this is rather simple

../
almost there, but not quite
not yet

i checked the first one to make sure it wasnt bs, but dude, its the first search you can find
bro i didn't even know what it was called
now i do so i can look for information
i was searching js path which didn't help me much
np
i should also mention, @stark abyss https://nodejs.org/api/path.html#path_path_relative_from_to
thank you i figured it out thanks to you 

:)
Confused which database to use :/ I'm using quick.db, and my bot has grown and the player base is increasing, so is database. I'm going to switch to some better database since quick.db is not working so good, and is not even good for larger applications. Which db would you recommend? 
Sqlite if you want portability/constant transactions/db-based cache system
Postgres if you want deep relationship between entities/heavy amount of simultaneous transactions
Mongodb for non-relational (?) storage system
I have a single database containing different players having further uservars (currently an object, including team, storage, inventory, etc.)
And there would be some commands user can use like for giving Pokémon an item, taking from it, depositing it to storage, and more
If it's something you're gonna be accessing all the time (like on every message), stick to sqlite
It's a lot faster for short transactions
Just note that it doesn't allow multi-write operations
Like, only one transaction can be happening at any given time
So don't use multi-threadded write
since its fast it shouldn't matter much?
Yep
It's just a note because it can get in the way if you try to open the same db file in two processes
It allows N read ops tho
So N processes can be reading it at the same time, but only 1 can be writing to it
Does it get affected by sharding? (I'm not sure if shards are multiple processes)
So, looks like sqlite3 implemented a way to get around that limitation
Hey im getting python in my vsc folder it promoted me to download pylint
It gave me this warning tho it installed fine:
WARNING: The scripts epylint, pylint, pyreverse and symilar are installed in '/Users/Library/Python/3.8/bin' which is not on PATH.
Is this bad since its not in path?
When I installed python it never gave me and option to add to path, i downloaded it for mac.
Please ping me if you have an answer
If it ain't on path then it'll not be recognized by any process
so it needs to be in path?
Yes
How do I add it? Since my installer itself never gave me an yadvanced options
to click add to path
For mac idk, but there should be somewhere called Environment Variables or something like that
In Ubuntu it's "/etc/environment"
hello peeps,, i just joined mainly bc i thought this would be a smart place to ask
so i'm a beginner who wanted a personal bot for a server just bc and i found a botkit starter thingy in glitch and decided to start from there
after reading the hears.js section and the comments in there i'm still kinda lost really
i'm not quite sure how to add commands (like how the bot should respond after hearing certain things)
please ping if you can help! i'm not asking for help to everything, just mainly how to do the controller.hears part and the let responses = part
@lost talon ok, hold on
Given the let keyword, I guess you're using javascript as your bot's lang
What library does that controller.hears belongs to?
Like, what library is that botkit using?
Btw, and I can't stress this enough, making bots is REALLY hard if you don't have prior knowledge with the lang you'll be using or have some general programming experience
i should probably learn some stuff before making a bot hhh
clearly i'm not ready for a bot
Js ain't that hard to learn, but expect about 1-2 months of daily exercise if you don't have any ps background
That in the best scenario
okay! thanks for the help anyway i'm just an idiot atm
Nah, you're just starting the wonderful (and stressful) path of programming
There ain't idiots in this path
Except people who steal code without permission, those are idiots
i'll check it out, thanks!
I will hire someone to code a discord bot in python, with a web panel, I need a developer partner.
Pay included.
can we ping roles in the title of a field in embeds?
because this doesesnt seem to work
-_-
well, there are more grammar typos, but just letting you know
you can mention them bit not ping them
how to mention?
ohh wait not in titles
ah ok
what?
need help?
yes
with?
dont think you can edit webhooks
it does
pretty sure you cant
bot is offline
not editing it
no token working
no
after its being sent, you cant edit it
what
though you cant edit the webhook
which token
@earnest phoenix post code
what labgauge
what am i looking at?
turkish
dude, code
we cant help you if you dont provide the code
your JSON is malformed
post it here
Package json?
idk, whatever you were trying to parse that error'ed
Wait wait
ok
bruh
copy pasto
send the code
not the error
const shit = your.head
const send = your code```
welp, good luck with that one
Wait i am uploading code to hastübin
İts a little big uwu
ok
how do you get data from a firebase doc?
did you read the docs?
Hey can someone who has a mac and codes discord bots in python help me? I can't figure out this error
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.
I installed python 3.8 from the website, but it always throws this error.
Please ping me if you have a solution thanks!
does it provide mac on the website
What did you try doing for this error to occur?
Two things:
In the python folder I opened this after looking at a tutorial, but showed that error
The error also showed up when trying to download discord.py with
python3 -m pip install -U discord.py
Are you running this command as a normal user?
If you've not already try pretending sudo
Wdym by that sorry, I don't know bash that well
Prepending *
Oh well there is a admin account
on my computer
Sorry, wdym my prepending sudo?
And how should I do that
sudo python3 ...
run with elevated permissions
^
essentially Run as administrator on windows
Yeah
yes
Cool
it'll ask you for your user password
gotcha
when you type it won't show because security™️
ah ok
And u need to run the certificate command right?
this file or can i ignore it
since some tutorials i saw didnt do that
others did
Idk maybe mac requires certs
ah okay
$nomention $title[Warn] $color[#00FCBB] $footer[Warned by $username] $description[$allowMention was warned for $message] $onlyAdmin[you don't have enough permissions]
I use that for warn
https://cdn.discordapp.com/attachments/385837258768515083/732476445812719707/unknown.png
is there any readability improvements i can make to this
no
@pale peak i can do research on the error and see if i can come up with a solution
bye the way have you got your bot online before
@pale peak shouldnt use glitch
dont edit libraries
if u dont know what are u doing
and are u hosting on glitch?
and are u hosting on glitch?
@restive pebble
Hy
what
Glitch is banned ping idk why
Hello
No ping is bad idea
u edited library now enjoy
Hello
whats up
(node:10740) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at Object.exports.run (C:\Users\arkan\OneDrive\Desktop\app\komutlar\korona.js:19:29)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:10740) 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)```
can someone help?
what
send code
what
could anyone suggest me a decent json schema verifier
joi is good but its bugging me and i want something a bit simpler
Wdym
uhh a json schema verifier
as in defining a schema and then verifying data against it
how to use that ._.
https://www.npmjs.com/package/ajv looks decent, uses doT, just unsure if there's anything better
@restive pebble
download button?
Hello. I got this error but I didn't found any mistake ;_;
And this is coming if I type a link after it ;_;
Ping (@) me if you know!
LOL
Okay, but I don't know what code is wrong @marble juniper
@restive pebble fixed error with adding '' xd
doesn't the stacktrace show you which line the error is at
Yea
k
Uhm
btw the last error is you don't have FFMPEG
btw the last error is you don't have FFMPEG
@marble juniper I installed it 5 times
k
the url is bad
are u using .getInfo?
@fringe axle u need to install ffmpeg-static
not ffmpeg
how do you make an e command, where you like can do that and code in a server and it will execute it... if that makes sense?
it does, he means eval commands
also don't make it public, limit it only to you
cause guys just can do (prefix)e client.token to get your token
and other things
i am confused how to make a translate command for discord.js so anyone help me or provide some docs with good info
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.
I am getting this error when running the Install Certificates command file, does anyone know how to fix this? please ping if you do.
I am on a mac btw
why
How to make custom prefix
._.
??????????//
So if I have mongoose collections for xp ( like the image ) how do I sort by level? (the collections are stored in an array)
@earnest phoenix use forward slashes
@fringe axle u need to install ffmpeg-static
@restive pebble oh, okay thanks
Hey guys
Question
Now I am going to host my bot using Heroku, does anyone what they mean with dyno?
Like the free one is 550 - 1000 dyno per hour per month
What does that mean>
you shouldnt host on heroku
Then?
type n.tag host in #commands or #265156322012561408
lol
550 means basic time
1000 hours will only be awarded of u verify ur credit card
No debit card
What is the best hosting service?
DO
Do what?
Digital ocean
Do you host your bot there?
?
this dood came into the wrong place I assume
i use the vultr $5/month vps and i run 3 discord bots & a few socket.io things on it easily
?? Wdym @marble juniper
why you use regex for that?
any alternative to quick.db?
@earnest phoenix yes. mongodb. keyv. sequelize. (most of i say are orms).
lemme try mongodb
@restive pebble
gtg run npm i mongodb
@fringe axle read the pins on the plexidev server
gtg run npm i mongodb
@earnest phoenix use mongoose as the npm package to connect to mongo I use it myself and it’s great
i found it a mess
ended up wrapping mongodb around my own functions
db.collection('users').find({ uuid: ... }) pretty fun
guys i cant install packages in VSC
run vsc as admin
schema#findOne({uuid: ...})
or use a proper console as admin
Is easier
i found the use of database reliant schemas too annoying
Just put them all in a folder
personal opinion though
ahyes
anyone making a coin system w/ mongodb because mines just not working
define the error(s), show code, etc
i have lol
i defined
but no errors when someone runs
but the command doesnt run only for mw
me
ill give the code 1 sec
step debugging
?
attach a debugger on your code @earnest phoenix
tf?
you use VSC i assume?
then attach a debugger on the command you running
this button here isnt there just for visuals
Bro
;-;
that'll help you see whats going wrong on your code
like always change
cuz you go each line with it
.setColor('RANDOM')
not "RAMDOM" ?
;-;
@earnest phoenix
how do i delete all the channels with the name ticket
not "RAMDOM" ?
@clever vector can you spell
for(channels in guild) filter => delete @pure lion
thanks
which database is best for big bots
made a massive oopsie
saving lots of data
there is not one best
depends on what you doing
MongoDB has easy Scaling with Shards, Mysql / Postgres have more forward querys
@earnest phoenix Thanks bro
np
that why my bot always like only black color
Discord Started with mongodb but then switched to Cassandra
Now it rainbow
🙂
yeah cassandra, maria and postgres are the big ones that companies use
mongodb is good for medium-small scale
as i said i use it on my fairly big bot and have never had an issue
it could do large scale the issue is that the sharding is not extremly stable
module.exports.run = async (bot, message, args) => {
const m = await message.channel.send("Pinging...");
m.edit(`🏓Pong... : ${m.createdTimestamp - message.createdTimestamp}ms.`);
}
Bro how do i set embed
if my ping is like that
create a embed?
read the docs
then create a embed?
you can store as a variable
I want to create an embed
so which one should i use
send({ embed: { ... } })
Hmm
database
@remote yacht how big is your bot
how do you not know how to make an embed thats the most easiest thing
unless it's 100,000+ servers i'd just use mongo
MongoDB is a little bit annoying in the beginning. Mysql is probably the easyest to setup in my opinion and Postgres is pretty stable but can be a pain in the ass to configure
its a pokemon bot
one day i'll have to move from mongo 😔
so users catch frequently
aa!eval let commandFiles = msg.guild.channels.cache.filter(channel => channel.name.includes('ticket'));
for (let channel of commandFiles) {
channel.delete()
}
HELP ITS NOT WORKING AND IM IN A REAL BAD SITUATION
user caching != related to db
100 catches per min is the avg maybe?
npm i ffmpeg
is it in your system's .bin
I WANT TO DELETE AAAAAAAAAAAA
how like everyone comes here at the same time with an issue
@pure lion stop using caps and read the docs
npm i ffmpeg
@remote yacht that is working but same error
im in a might die situation i dont have time to read docs
all ur channel ends with -ticket
why Dice?
and does not include just ticket
^
ok ty
learn javascript before making a bot
ye
strings are pretty basic
'' and "" also `` are strings
its a pokemon bot
so users catch frequently
100 catches per min is the avg maybe
@sick cloud
@fringe axle try installing ffmpeg-binaries or install ffmpeg to your os' .bin
Most Databases handle this easy @remote yacht
Okay
@remote yacht user caching != db use
don't ignore me then mention me
oh u meant that to me
user caching is handled in memory by your lib ie. djs
a database is for holding user data like prefixes etc etc
it's deleted anyways
i need to save user data
do you get what you're saying
you already said
so
Working but now this but he's connecting
You mean me?
user caching is where the user profile is requested from the discord api, and contains things like their id, etc.
user data is your custom data, such as pokemon in your db
use mongodb unless you're magically the owner of a bot with 100,000+ servers
caching is stupid for that stuff, just fetch from the database every single time and you'll be fine @remote yacht
which is reliable for big data
i'm not talking on it more and some other guy can point you in the wrong direction
i still cant install packages on VSC like i do npm install quick.db --save for example it installs it but then i keep getting the same error that its not install ect.
@earnest phoenix can i ask a question
Why? ;_;
i want to make custom command
@clever vector dont ask to ask
wrong person
@fringe axle read the error
OkayD:
@earnest phoenix can i ask a question
@clever vector sure
URL is undefined
But it it
the URL you're sending to .play or whatever is UNDEFINED
@earnest phoenix I want to make Custom Command
NO
but
idk how
@earnest phoenix I want to make Custom Command
@clever vector ok?
Should I send the code?
case 'play':
function play(connection, message){
var server = servers[message.guild.id];
server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
server.queue.shift();
server.dispatcher.on("end", function(){
if(server.queue[0]){
play(connection, message);
}else {
connection.disconnect();
}
})
}
if(!args[1]){
message.channel.send("You need to porvide a link!");
return;
}
if(!message.member.voiceChannel){
message.channel.send("You must be in a Voice Channel to play music!");
return;
}
if(!servers[message.guild.id]) servers[message.guild.id] = {
queue: []
}
var server = servers[message.guild.id];
if(!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
play(connection, message);
})
break;
Okay
it's a slow process called elimination
@sick cloud
@sand dock 3-4 Weeks
+-3-7 days
there's your problem right there @fringe axle
queue is empty
so queue[0] is undefined because there's no first elem of the array
And what I have to do? @sick cloud
can someone explain to this guy how elimination works
D:
i can't wrap my head around how painful this channel is
D:
learn how to code
Im new, okay? I don't know much about coding but I learn it atm
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.
I am getting this error when running the Install Certificates command file in the Python 3.8 folder, does anyone know how to fix this? please ping if you do.
I am on a mac btw
Just explain it to me please
if you don't know how to code why are you making a music bot
why are you even making a discord bot
you need to be able to logically make a conclusion what to do next, brain exercises, you being new has nothing to do with the fact that you're not able to do logical thought processing
I don't know much
@earnest phoenix i saw someone made embed color like a gif it rainbow
I only want do know what I have to change
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info' Consider using the `--user` option or check the permissions.I am getting this error when running the Install Certificates command file in the Python 3.8 folder, does anyone know how to fix this? please ping if you do.
I am on a mac btw
@cunning gorge
i have almost to no experience with py, however this error seems to be a permission error, run your command with sudo
this will elevate the command
ah ok thx
can discord add proper message quoting pls
when they said they were adding quoting i was hoping it was going to be an actual reference to the message like slack has
someone here who cache mongoose with redis?
No one? Okay ;-;
i've considered making a bot that tries to quote a msg if you send the message id or the message url
but it's probably useless lol
probably
would be so much more useful if proper quoting was baked in the client & api
@fringe axle your server.queue is empty, because you never added anything to it
you have a link supplied via args[1], add that link to the queue
But how?
Yes
array.push(something)
Okay?
that will add something to the array
And where I have to add it? (Like I said: Im new in coding)
server.queue is an array
Yea
@earnest phoenix so this is the command I run
cd /Applications/Python\ 3.8/
./Install\ Certificates.command
Does adding sudo do the trick so
sudo cd /Applications/Python\ 3.8/
./Install\ Certificates.command
server.queue.push(some url here)
you're running sudo on cd
-- pip install --upgrade certfi
server.queue.push(some url here)
@quartz kindle and in which line and whih url? ;_;
you can already cd into the dir, you don't need sudo on cd
oh ok
you need the sudo on the latter command ig
it auto prompts that tho
run them one by one
itsnotworking
When i run the first one it runs the second one
oh
so like
cd /Applications/Python\ 3.8/
then
sudo ./Install\ Certificates.command
?
should be
are the backslashes correct?
okie thxx
gotcha thc
aa!eval const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket'));
for (const chn of channels) {
chn.delete()
}
its returning undefined
hi im having this issue (node:12900) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined at new MessageEmbed (C:\Users\scltxn\Downloads\dogbot\node_modules\discord.js\src\structures\MessageEmbed.js:13:60)
have you tried reading the error
cry please help
i made an oopsie
const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket'));
for (const chn of channels) {
chn.delete()
}
its not deleting and i accidentally may have made 100 channels or so
if its in the message embed i dont know what todo cry
https://gyazo.com/720f9c70544e914d2678747db9b79c24 this is some error thing i get from installing a package
@earnest phoenix read it you have to download python correctly
and requires it
it clearly says what to do
it clearly says what to do
@earnest phoenix smh
i caught it in a gif, there's literally instructions
i sincerely doubt you cannot do the same
im not good at understanding things properly ok
no, you just do not want to do things yourself
because that is effort
they should be automatically cached when you receive the READY dispatch
tldr if there are any missing you can either fetch them with REST or just restart the bot
it did nothing
Any buddy have glitch.com premium membership

const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket')).forEach(e => e.delete())
Any buddy have glitch.com premium membership
![]()
@earnest phoenix no and never would buy
@earnest phoenix didnt work aaaa please help
what do i do?
literally install python
stop being a help vampire
@pure lion are you sure channels are missing

you probably need to enable channel caching then
wait nvm this was d.js-light
can i ask why this is doing this in message embed code (node:3516) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined at new MessageEmbed
im using djs light
const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket')).forEach(e => e.delete())
@pure lion -ticket 
then enable channel caching @pure lion
how
read the docs
just fetch the channel bruh
ccsdcs
@astral yoke looks like your client is not defined
i dont have time to read the dopcasdvcd
[jk
he want to delete 100 channels
i need the ID and i cant get it
they don't know the id at runtime
i dont have time to read the dopcasdvcd
@pure lion so leave it
so fetching them is stupid

k
@lusty quest but how would i define it? its in discord.js node module its self
@astral yoke your code?
@quartz kindle no error but he is connecting to the Voice Channel and leaves instantly
like
whyd you ping tim
Because he helped me before
w8-2903df0-24-
you can shitpost in #memes-and-media
@fringe axle sure there is no error?
error
@earnest phoenix node? if yes did you added python to the path?
who needs mongodb when you fixed quick.db without scrolling through stackoverflow 😎
did you install windows build tools?
@earnest phoenix
npm install -g windows-build-tools
@earnest phoenix i still prefer mongodb. just added a redis server for caching the results
He thinks its 0 i think and thats why he's disconnecting
But how can I fix it? ;_;
i cant fix it without knowing the code
Wait
Coming
case 'play':
function play(connection, message){
var server = servers[message.guild.id];
console.log(server)
server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
server.queue.shift();
server.dispatcher.on("end", function(){
if(server.queue[0]){
play(connection, message);
}else {
connection.disconnect();
}
})
}
if(!args[1]){
message.channel.send("You need to porvide a link!");
return;
}
if(!message.member.voiceChannel){
message.channel.send("You must be in a Voice Channel to play music!");
return;
}
if(!servers[message.guild.id]) servers[message.guild.id] = {
queue: []
}
var server = servers[message.guild.id];
server.queue.push(args[1]);
if(!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
play(connection, message);
})
break;
@fringe axle are you using that one youtube tutorial?
ok yes this is that youtube tutorial
just to inform
that is outdated
and doesnt work
in discord.js 12
I don't use 12
its the exact ssame code as the gvideo tutorial by code lyon
how can y ou say you arent copying
I didn't say that I don't copy it
And thats not #development anymore
@lusty quest and? Do you know the problem?
v11 will stop working soon btw
need to read the code first
you have to change to v12 anyway
october
there is just a agressive caching behavior
v12 is different
and some smaller changes to how some stuff works
but the discord.js guide got a good explanation in what changed
Anyone?
@fringe axle you are getting a undefined function error?
what error are you gettinhg
did you install windows build tools?
@quartz kindle no
@earnest phoenix then it will still fail
do what i said
k
npm install -g windows-build-tools
;_;
ok
@fringe axle remove your shift function it will remove the first item in your array
Okay
thats not the issue tho, the code is correct from what i can see
UHM
array.shift() removes the first item in the array, i guess this could be a issue
the removal is intentional there, since he already used queue[0] in the playStream
ohh right makes sense
now i get why its there
the problem is the end event being fired imediatelly
maybe the song is invalid or something like this
Means?
try a different url?
@fringe axle if you make the code work then dm me ..
how to steal code 101
how to make like have time at the buttom of the embed box
Still the same problm
setTimestamp
@quartz kindle
try adding this
Okay?
server.dispatcher.on("error",console.log)
Where?
.setTimestamp?
Ur in v11?
Nope
Where I have to add it?
Not u
Yes
right before the .on("end"), add the .on("error")
Okay
@twilit rapids
uhm
.setTimestamp?
@clever vector yes
@quartz kindle
huh
and put back the .shift() if you removed it
and put back the .shift() if you removed it
@quartz kindle I already putted it back
it automatic creates a timestamp. but you can supply one
Same problem Tim
any logs?
server.dispatcher.on("error",console.log)
server.dispatcher.on("end", function(){
No
try .on("debug") instead of error
.on(end , reason=>console.log(reason))
Instant disconnect
any logs?
No
Epic
then try what boeing said
Rip
what is that
spam
but from what
Reason
xD
"end" not end
Oh
end it
If it's stopped on song end it is undefined
idk, something is wrong with the stream or with ytdl
oof
So it's problem with stream
whats your ytdl version?
I did npm i ytdl-core:0
why are u playing connection
What is connection
its a recursive function
he joins the channel then sends the connection to the function
but its all copied code anyway
.play(ytdl(some random url))
he doesnt now what he is doing he is copying it from a youtube video
K
connection.play('./peepeepoopoo.flac')
i did the same but at most parts i know what im doing and my code wass still wrong
doesnt youtube have a point system for daily quota too?
nvm
not sure why people use those libs since they'll get limited rather quickly
@fringe axle music feature in a bbot isnt that important most people have music bots.
and i recommend you to properly learn
instead of copying
Log the url
the yt api is a nightmare this is why its easyer to use a lib
Well if it was bad link ytdl would throw error
not what i meant super, its more about, why use youtube rather than something else
their limitations on queue is quite strict
@fringe axle music feature in a bbot isnt that important most people have music bots.
@earnest phoenix but I wanted to make musci D:
a spotify wrapper seems more resonable than youtube
Ok
@fringe axle you wanted to create a music bot/
Yes
just for yourself?
It's only a test to learn it ;_;
read the docs
or did yoiu wanted to puiblish i t as a bot
try this
i have the docs for musci bot
let stream = ytdl(url here, {filter:"audioonly"})
stream.on("info",console.log)
stream.on("progress",console.log)
connection.playStream(stream)

