#development
1 messages · Page 1463 of 1
I'm using MongoDb and it isn't writing in schema
that took like 30 seconds when it when it's in 1 testing guild
Just writes _id and _v without info
isnt it better to do the standard way ghoul?
Erwin how do you make the main export in ts a class?
sorry I dropped my crystal ball
so sorry
wym standard way
fetch on startup, cache all => update on new entry + add to cache
export class
export default class
I don’t fetch all on start up
o

export default class ClassName?
I fetch and store as required
const mongoose = require('mongoose');
module.exports = mongoose.model('shopDATA', new mongoose.Schema({
itemName: { type: String },
itemID: { type: String },
itemPrice: { type: Number },
}))
i rather fetch all on startup rather than querying every time/checking
since discord takes a hot second to connect, i do my own startup before the ready event is even emitted
in discord.py doing anything in on_ready(startup) is not recommended
@next ridge can I see how you’re writing it?
let newEntry = {
itemname: itemnamex,
itemprice: itempricex,
itemid: itemidx
};
let newDB = new itemDB(newEntry);
await newDB.save();
This method works fine with other Commands
default defaults to the only one or explicity states in the default keyword
hmm
to put it bluntly
export class a
a = default
//////////////
export class b
export class c
export default d
d = default
/////////////
export class e
export class f
export class g
no default iirc
you dont, requiring that way is a bitch
import resolves on require, not the other wya around
import is require().default
@misty sigil You got problem in that code?
import { thing } = require().thing
is there any way to make requre().default just require()?
no, you gotta import everything and get default
transpile*
alr
It’s case sensitive
e.g. itemEntry, itemID, itemPrice
lol
tsc stands for typescript compiler iirc
typescript contains the word script in its name
and finally typescript transpiles down to js
^^
Wdym @misty sigil
using mongoose? show your schema
you need to keep it the same case between the schema and the entry
I have to write docs for my library but I'm so fucking lazy
hey
how can i make my bot add three 0
to that time
add these 0 to the var tiempo
but idk how
like, add 3 zeroes at the end of the string? Because tiempo is a string
How can I know which shard the server is in? (discord.js)
oh wait
that's the problem
THX!
i make this
message.guild.shard or something iirc
oh, btw
can someone explain what Shards do
i know I don't need them until 500+ servers or so
but I'd like to know how they work
Sharding is a nice way to split your bot to smaller, more manageable parts. It is recommended to only use this feature with big bots (1000 guilds or more).
Note that you are required to use this when your bot reaches 2000+ guilds.
Sharding also means connecting with multiple websocket connections to discord, with each websocket connection receiving events only from specific servers
How do I check if a member is deafened or not in voice chat with Discord.js?
Anywhere from 0 to 2500
Lmao
just like the movies
the sad part is that ive been working on this for like 2 hours
member.voice.deaf
o crap this is dev, sorry ;p
rm .git -rf
Suppose someone does this !pythoncode {pythoncode} how do i process that code and return what happens?
playingMessage = await queue.textChannel.send(🎶 Started playing: **${song.title}** ${song.url});
I want to embed this phrase. How do I do it
Discord.js
ohh

Suppose someone does this !pythoncode {pythoncode} how do i process that code and return what happens?
laughs in generated typescript files
Use eval()
playingMessage = await queue.textChannel.send(🎶 Started playing: **${song.title}** ${song.url});
I want to embed this phrase. How do I do it
discord.js
Use MessageEmbed or the embed object
Dafuq do you write in ts to have your generated code be 30k lines?
can you not
I want to put it in queue.textChannel.send()
Yes, put it normally
Target ES1990 and transpile your entire code to primitives
Can you get the format?
queue.textChannel.send(new Discord.MessageEmbed().setColor('ffeeff').setDescription(`🎶 Started playing: **${song.title}** ${song.url}`))
Oh
🥄
@quartz kindle suff like this
oh god
generated API types
What the fuck
not a single manual line
just TSC

a whole API documented under a single command with generated types
How big is the file?
1,09mb
Duckin hell
uhhh can i get linux system stats with subprocess in json form?
Im not gonna type anything that requires 1mb+ file size only for typings
if only you wrote stuff in ts and then transpiled

come to ts timmy
we got autogenerated code
🗿

yall does anyone know how to make a bot wait for the reply, or wait for cancel?
i mean why not use ts?
isnt it just better js?
Im am talking about autogen
discordpy
what lib
tell that to tim
oh great!
alr so u have the wait for function
@modest smelt just use jishaku
Im nt gonna give my users 1mb lib when i can give them a 5kb lib that does the same thing
yeah
and you can run a asyncio timer
jishaku is cool
and if it passes the time, it just cancells

but no time wasted on manually typing docs for 15h of your life while struggling to match js-ts
but i think he;s just dumb lmao
lol
etc with things like jishaku you can do -> @modest smelt https://i.imgur.com/XiruhOI.png
Contrary to popular belief, package file size matters
Why do you think request was deprecated
It was fucking 5mb
But isnt .d.ts in dist?
etc
you can do shell commands
and a lot of other cool stuff
would def recommend
OF COURSE IT IS
look at the name
wdym
@types is a different folder
you wanted a way to run python code
But when a user instals your lib
lmao
you implement it by load_extension('jishaku')
i want to run that on my bot
theres a shorter file in crate for them
Does .d.ts not get included in the download?
ok erwin ur brazilian 100%
they only get types when they --dev it
i mean its not "my dev" he's a dev for my bot
i either crack another version of windows or deal with favela language
Change it
lmao
@drifting wedge so this?
hm ok
no
cant even tim
that's not how you do it
windows is free tho
You can
why do you have to do that
enlighten me
why do you need cracked windows?
windows thought it was a great idea to do Windows Single Language Version
id think so but idk
yeah
where you cant change the system language
why do you need cracked windows
alr
Ive changed single language to pro several times
def check(m):
return m.content == "yes" and m.channel is ctx.channel```
just looked at my github profile
i have 2 public commits
alright then, tell me how
😦
you install it
Warez
its free
wdym Warez?
try:
await bot.wait_for('message', timeout=10, check=check)
except asyncio.TimeoutError:
pass```
actually nah
yep!
who even needs windows
record?
then define bot.wait_for
then you get the content of it
alr
i got the original version of windows though
Warez = pirate lingo for refering to cracked software, and also not allowed to talk about it here afaik
answer = await bot.wait_for('message', timeout=10, check=check)
answer = answer.content``` @little anvil
thats the point though
you could just proceed without a license
i dont wanna crack it, i got the original version
and have a fat watermark on your screen
oh my god what is this, 1998?
alr
Well you need to, but yoi dont need to format for it
this
oh
Does anyone know if I can tell which shards I am in (discord.js - mongodb)
no
thats mongodb
my oh my
yes
whats the connection between mongodb and sharding?
Yes
iirc its sharded over all of them
@hollow sedge Mongodb is already a shard
Tim, wanna gib feedbak?
@bot.command()
async def yes_ur_gay(ctx):
await ctx.send("are you gay")
def check(m):
return m.content == "yes" and m.channel is ctx.channel
try:
await bot.wait_for('message', timeout=10, check=check)
except asyncio.TimeoutError:
pass```
@little anvil
(likely not, but imma try anyway)
alr
On what?
missing a :
refactoring that library rn, if you can think of improvements
but i guess you found out
indenting 😩
Which one? Twitch?
e
no, the one i made yesterday
how can I parse this text as normal text
The essentials from songwriter <a href="https://artists.spotify.com/songwriter/4iWkoTP4d2RfIx2Om0lx5p%22%3EGregg Wattenberg</a>, all in one playlist. <a href="spotify:genre:songwriters">Discover more songwriters on Spotify</a>.
return:
The essentials from songwriter Gregg Wattenberg, all in one playlist. Discover more songwriters on Spotify.
Which one is it?
cHeErIO
lemme grab linkus
i fix
Im on the phone, but i ca try
ty
require("cheerio").load("The essentials from songwriter <a href="https://artists.spotify.com/songwriter/4iWkoTP4d2RfIx2Om0lx5p%22%3EGregg Wattenberg</a>, all in one playlist. <a href="spotify:genre:songwriters">Discover more songwriters on Spotify</a>.").text();
no
Also i need to fix one of my bota that apparently has been broken for 2 weeks
Lmao
the check function return is indented 4 spaces, the others are only 2 spaces
i swear i hate indent erros with passion
https://github.com/erwin1234777/teyvatdev-node-sdk current/original
https://github.com/erwin1234777/teyvatdev-node-sdk/tree/gts-cleanup wip/refactored
im writing it through discord
oh there's a genshin api?
100% relatable
😢
thx flaz.
no mercy
:(
yup, and i just finished the wrapper for it
what broke it?
I just scrape
was needed for spotify
telling that from experience
dont ping genshin api, they ratelimit you on the 3rd request per day
Nah I didn't
even with changed user agents
@earnest phoenix #development message
its an ip ratelimit
https://i.imgur.com/sNjsCcO.png @hollow sedge
I know. I did, thanks.

Not fucking with genshin's API
which i do
and proxies
which i also do
nice
didn't he make a pr or was that for something else
he did
merged?
and still not merged iirc
getting puppeteer and ipv6 rotation has been proving quite a hassle
loreum ispum tts
WHAT??
wdym what
@opal plank you pushed it 16 houra ago, and immediately started refactoring it?
Code
var playingMessage = await queue.textChannel.send(new Discord.MessageEmbed().setColor('ffeeff').setTitle("Every Music").setDescription(`🎶 Started playing: **[${song.title}](${song.url})**`).setImage(`https://img.youtube.com/vi/${song.url.split("v=").pop()}/maxresdefault.jpg`).setFooter("commands Prefix : ,"));
await playingMessage.react("⏯");
await playingMessage.react("⏹");
await playingMessage.react("⏭");
await playingMessage.react("🔁");
await playingMessage.react("🔇");
await playingMessage.react("🔉");
await playingMessage.react("🔊");
} catch (error) {
console.error(error);
}
const filter = (reaction, user) => user.id !== message.client.user.id;
var collector = playingMessage.createReactionCollector(filter, {
time: song.duration > 0 ? song.duration * 1000 : 600000
});
Error
abort(TypeError: Cannot read property 'createReactionCollector' of undefined). Build with -s ASSERTIONS=1 for more info.
(Use `node --trace-uncaught ...` to show where the exception was thrown)```
Why am I getting this error?
cuz there were quite a few people waiting for it, so i published a working version(and some pacthes after i got some issues being pulled)
Ah
ye
@pale vessel yes
yes
so now its gonna be standardised and improved for the next minor
yep
Thinking its a video ts file
wtf lmao
Lmfao
open as desktop
what browser do you use?
if tim says opera im quitting
why?
cuz ie and opera probably some of the shittiest browsers i can think of
Tim: IE
on his phone tho?
any of yall know how to make a discord bot write to a text file
fs.writeFileSync()
lol
nvm
wtf
.write()
im not gonna ask
the hell is that
ok @gilded olive ty
file_object = open("filename", "w") as f:
. . .```
In Python, there is no need for importing external library for file handling. Learn how to create, open, append, read, Read line by line, and Write,
you can take a look there for more info
write
Because when I tried the text wasn’t showing
o alr
it's called the mode
a must be append
correct
Cogs making my bot ping 📈📈📈
What does my bot secret client code do
# Python program to demonstrate
# writing to file
# Opening a file
file1 = open('myfile.txt', 'w')
L = ["This is Delhi \n", "This is Paris \n", "This is London \n"]
s = "Hello\n"
# Writing a string to file
file1.write(s)
# Writing multiple strings
# at a time
file1.writelines(L)
# Closing file
file1.close()
# Checking if the data is
# written to file or not
file1 = open('myfile.txt', 'r')
print(file1.read())
file1.close() ``` @little anvil quick example from google.com
@opal plank im not gonna look at it now, im at dinner with family and its too big to look at, besides fjck ts
does anyone know why 1 shard of my bot is using over 110 mb of memory on launch? it doesnt even cache anything except stuff that d.js caches; what can i sweep?
Idk
Btw isnt public default? Do you have to manually declare everything as public?
just consistency
I like doing it for better readability
but i dont think you need to declare public if you dont want to
Yea
👍
Just lime you dont have to add private to variables in, say, java
47373757363747284858286837(8629(629683638786353+8383(684(7367$;(8)847$;/‘iuirhenvjyiuhgnyituruejr = 1.3958385858
i remember tim sent this a while back and ive swept a good chunk of them, but its still consuming a ton of memory on launch and at a rapid rate post-launch
#development message
Hold up..
Bruh
This is with open and assigning it to a variable at the same time
@earnest phoenix there are already a lot of good moderation bots
Check out dyno
ah yea thats true
How much ram and how many guilds?
You can customize with dyno
i mean sure i can make one for you
If you're lazy then just add dyno
but hosting is your problem
just tell me what it will do precisely
Enjoy your nitro ghoul >:(
Pog
lol
using my dad's old host, and i believe its 24gb of ram. bot is in 80,748 guilds. i have 80 shards rn
I don't understand why he wants someone else to make a bot that he will host instead of just using dyno
Error
abort(TypeError: Cannot read property 'on' of undefined). Build with -s ASSERTIONS=1 for more info.
Y’all like pros while I’m here just starting without hosting
unless you mean how much ram its consuming; in that case its about 12gb on launch and within 3-4 days it climbs to about 20gb
try block
everyone starts small, just takes some time
@earnest phoenix you realize hosting is a monthly expense right?
How often do you clear caches?
every 30 min
@quartz kindle error pass
Ok
What is the best cheap bot hosting?
Heroku
omg
I use heroku
"'answer' referenced before assignment"
Show the interval code
actually it's free
If you just host 1 thing you should get enough each month
I’m not using heroku
Vultr has very good disks
Cool
but Vultr gets expensive if you're european 😔
I’m not
Do they charge vat?
anyone know how to fix this:
Code?
def check(m):
return m.content == "yes" and m.channel is ctx.channel
try:
answer = await bot.wait_for('message', timeout=5, check=check)
answer = answer.contnet
except asyncio.TimeoutError:
pass
heres the part causing it i think
@quartz kindle testing some stuff rn so it doesnt have all of it, but right now it will sweep all users from cache that arent currently using my bot
yeah
def check(m):
return m.content == "yes" and m.channel is ctx.channel
try:
answer = await bot.wait_for('message', timeout=5, check=check)
answer = answer.content
except asyncio.TimeoutError:
pass
Try that
USA?
8€ = 10USD
for USA u only pay 5USD
When you clear users, also clear them from guild.members
In all guilds
oh
so run through all the guilds my bot is part of and clear the members?
a thing I should be aware
Yes
What i do is this
clear users;
for each guild, clear members that do not exist in client.users
perfect, thanks so much man 🙏 ill lyk if it works out
🙏
The content of the error varies as follows.
abort(TypeError: Cannot read property 'on' of undefined). Build with -s ASSERTIONS=1 for more info.
I send the code to solve it. Can you upload files here?
If you have an indentation error and don't know how to fix it, you need to learn python
@def check(m):
return m.content == "yes" and m.channel is ctx.channel
try:
answer = await bot.wait_for('message', timeout=5, check=check)
answer = answer.content
except asyncio.TimeoutError:
pass
file_object = open("filename", "w")
file_object.write(answer +", " + "<@" + {user.id} + ">")
file_object.close()
embed = discord.Embed(title="**Information Recorded**", color=0xfb821d)
embed.set_footer(text=f"ID: {user.id}" + " · Made by Mr.dootdoot#6972")
embed.set_thumbnail(url='https://cdn.discordapp.com/attachments/788451731221905499/789220518237962300/PemThumbnail.png')
embed.add_field(name=":white_check_mark: Record Successfully!", value=f"thanks")
await ctx.send(embed=embed)
Well then you should fix the formatting before sending
yea
That still doesn't justify the @
me..?
i meant the other guy 
@little anvil can you take a screenshot of your code and post it here
It's not..in a function?
whats that pass doing there tho
Yes..?
It honestly seems like you're missing a basic understanding of Python @little anvil
Might want to read up for a bit before making a discord bot
How
bruh where’s the @mighty sapphireient.command()
async def check (m)

Lol
Shouldn’t it be m.channel?
No
Yeah
I prefer client more then bot
is there a way to get the bot username from its userid?
It’s possible but idk also what type of code?
well i want to assign role to different bot
Yea
So
oh no
well i can get the user id from client user
They deserve it for having that username
No no you said mention
yeah so something like this
if i user client.get_user(36...226) then i get a user (me)
You still need to remove the @<!>
and i just parse it to a dictionary
yeah i did that
and it work for a normal user
but its not working for a bot user
user1 = client.get_user(int(x[3:-1]))
And what are you trying to do
I mean idk
@drifting wedge he says hes legit
For what
why were you so rude tho lol
?
just managing in general?
and curious
i intend this to be run on normal people user but i was testing on bot account
what
@gilded olive
:monkaToS:
imagine theyres just a fat guy that works for botghost that does the bot stuff
like not even the bot, its jsut a guy typing the messages
I have give people nitro
ok
Your body shamimg people?
lmao
fat guy
"imagine there's some"
How is that body shaming


I was never here 
Hi target
hi slave
HEY IM YOUR STALKER AND YOU ARE MY UH UHHH TARGET
What
Error
abort(TypeError: Cannot read property 'on' of undefined). Build with -s ASSERTIONS=1 for more info.
Error appears but I can't understand ㅠㅠ Please help me
https://drive.google.com/file/d/1VByWr_XRFPfRYUOD35SWVOz4JhYX17Nr/view?usp=drivesdk
Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.
Remove some code that you just wrote debug yourself to the code and you got the solution
I tried running that command and it only got an error. I tried many times.
@pure lion bat cmd pipenv shell pipenv install --dev pipenv install aerich init -t tortoise_configs.default.TORTOISE_CONFIG aerich init-db python main.py
i need these commands
to be run after the other
mhm?
but i got no idea how
it opens cmd
but after that
nothing lol
idk how shit works 🗿
pipenv shell
pipenv install --dev
pipenv install
aerich init -t tortoise_configs.default.TORTOISE_CONFIG
aerich init-db
python main.py```
just that
the cmd command just opens the windows terminal
bruh momento
🗿
@everyone
Nice try
I wasn’t even trying -_-
like discord tries to troll us by making us think we can ping @everyone
how do i put an iframe in my markdown descripton
yeah :c
that makes sense
Wdym. Y certified
Certified can use javascript iirc
I can’t even do a button
CSS === Certified Stupid Shit
thats just ur problem cause I can use css fine
@earnest phoenix qtqtqtqt
@zenith terrace qt
yeah any bot can use css
its another thing if you know how to make something good out of id 
Imagine being good at CSS
@modern sable pretty sure non cert bots can use iframe yea?
Man
Yes
for non-certified bots?
Yea
Free hosts are usually either a scam or too low performance to host a bot
I ain’t on some budget
I personally use Vultr, they're the cheapest VPS's I could find and they work pretty well
Bot ping?
About 100ms
With cogs?
Ye
does anyone know how too fetch something from the audit log?
like i want too get the user that added a role
if ygm
So basically logs?
discord.js btw
yeah but not for that purpose
because on my server i have a role called legend and i dont want it so my mods can add the role and the user get the same reward
just dont know fully how too fetch audit log
yes
just do
body {
background-color: #000000;
}
lol I suck at css
(dont do that it'll make everything black)
@Alp#0820
body {
background-image: url(**image url here**);
background-color:#464646;
}```
You either die a bug, or live long enough to see yourself become a feature.
laughes in errors
laughs in "ill fix it tomorrow"
how come the users handling is all wrong? i did js client.users.cache.size
use this
client.guilds.cache.reduce((total, guild) => total + guild.memberCount, 0);
Because cache
doesn't work. it's zero
Erm.
const Discord = require('discord.js');
const client = new Discord.Client();
module.exports = {
name:"stats",
execute(message, args){
const statsEmbed = new Discord.MessageEmbed()
.setTitle(`:command: Photon's stats`)
.setDescription(`These are Photon's Stats all around the world.`)
.addFields(
{name:"Ping 🏓", value: `${Date.now() - message.createdTimestamp}`, inline:false},
{name:"Servers Handling 👀", value: `${message.client.guilds.cache.size}`, inline:false},
{name:"Users Handling 👤", value: `${client.guilds.cache.reduce((total, guild) => total + guild.memberCount, 0)}`, inline:false},
{name:"Bot ID 💡", value:`779130889565110343`, inline:false},
{name:"Channels Handling 🔗", value: `${message.client.channels.cache.size}`, inline:false}
)
.setTimestamp()
message.channel.send(statsEmbed)
}
}```
my whole code
Okay
It's 0 because you made a new client and tried using that
okay
when it has no relation to the client you're currently using
oh
so i remove the new client
yes
Use your existing client, like you did with message.client.guilds.cache.size
when you create the client for first time it's not necesary to create a new one
ok
no
It worked! Thanks @earnest phoenix @sudden geyser !
np
♥️
with the embed .addFields how do you make the add fields go 2 by 3
in a organized position?
like this
not like this
123456 --> 123.456
yea
font = ImageFont.truetype('PTSansCaption-Bold.ttf', 37)
OSError: cannot open resource
python
How do you have the bot check how much memory is in the bot? (in MB)
What would I use for an and in a if in Node.js?
Like if (owner == true and mod == true) {}
&&
&& is and
yeah
why doesn't my memory look right? im sure it has to be over 20
what is this for?
btw, i got the script from this | #development message
MB
is it a bot? a webserver? what?
node modules be like https://million.is-a.computer/files/7EVy0mzO7D6PP33.png
A bot
do you use sharding or discord.js-light?
idk whats sharding and when you say discord.js-light i think about discord light theme XD and yes, i have light theme on lol
okay
how do i measure shards in my bot then?
wait
nvm
lol
i think the number is right
discord.js-light is Tim's lib that is light on memory
ok
how do you find out how much data or the total size of files you have uploaded to github
how do you track the amount of messages sent all together in every server? i tried js message.client.messages.cache.size
do you want to save it, or just cache it?
cache it
Yw
LIke the ammount of servers but instead messages
do you want to save it, or just get the cached ones?
https://million.is-a.computer/files/WOZQxCktmv6HSgb.png I was wondering where the 300mb came from
Woah
now I remember that I once pushed my fucking test uploads
There's a 1 GB repo limit I think
cache
how did you see that
get the cached ones
https://github.com/settings/repositories @summer torrent
add the message.guilds.cache.messages together should work
ok
I hate how I can't delete files from gh
I thouht it just makes a new commit
It does
i did this. is this right?
@crimson vapor why do you need to do that anyway
you're gonna want to add them all together
and no thats not
I made a mistake
how?
What did you do
message.client.guilds.cache.messages
Okay
pushed 300mb worth of .png(s)
lol
will that remove from gh tho?
@crimson vapor erm it's undefined
i did js message.client.guilds.cache.messages
@crimson vapor did that work
Why
whoa
how
Size: 309mb
Why are you putting it on read-only tho
wdym
Wait was it already there
its like long ago
Nvm I'm just dumb
nah the command didn't work
font = ImageFont.truetype('PTSansCaption-Bold.ttf', 37)
OSError: cannot open resource
py
I don't understand how you accidently committed that
idk tbh
I think you can remove those
hmm
^ that shows you too
yea
and theres gh desktop
well yeah
its good for its purpose..which is pretty simple
that kinda makes sense
you cant manage stuff on their though

Anyone good with css responsivness willing to assist me with getting some certain things correct as responsivness is busted
Perfered in dms
https://scs.twilightgamez.net/rWygN.png
I remember leaving my node modules folder on my desktop so it would upload and download.
ended up spending like 20-30 minutes waiting for it to download, big mistake
what theme?
of windows terminal
o
Why this command is not working?
@client.command()
async def ping(ctx):
await ctx.send(f'Pong! Your ping is `{client.latency * 1000} ms`!')
You tell us. What isn't working about it?
Yes
Pls help
hey
how can i get a server list of where my bot is in?
on discord.js
??
@sudden geyser are you there?
I can help.
Omg
[
{
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
},
"href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
"id": "5a2w2tgpLwv26BYJf2qYwu",
"name": "SOPHIE",
"type": "artist",
"uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
}
],
"duration_ms": 188520,
"episode": false,
"explicit": false,
"external_urls": {
"spotify": "https://open.spotify.com/track/18yTgk0VgjB9XDj8h2q6Td"
},
"href": "https://api.spotify.com/v1/tracks/18yTgk0VgjB9XDj8h2q6Td",
"id": "18yTgk0VgjB9XDj8h2q6Td",
"name": "JUST LIKE WE NEVER SAID GOODBYE",
"popularity": 34,
"preview_url": "https://p.scdn.co/mp3-preview/d5790004de973f83756311075125ffc965e522c8?cid=a46f5c5745a14fbf826186da8da5ecc3",
"type": "track",
"uri": "spotify:track:18yTgk0VgjB9XDj8h2q6Td"
}
]```
I want to get the artist's name
so If I do array.artists
it gives this
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
},
"href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
"id": "5a2w2tgpLwv26BYJf2qYwu",
"name": "SOPHIE",
"type": "artist",
"uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
}
]```
${client.guilds.cache.size} @earnest phoenix
How can I get the name
why would you want a list...
ok
<client>.guilds.cache.forEach(guild => {
<msg>.channel.send(guild.name)
})```
@earnest phoenix
i already made it
Oh ok
but thx
Mention not
Yess
Ok
[
{
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
},
"href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
"id": "5a2w2tgpLwv26BYJf2qYwu",
"name": "SOPHIE",
"type": "artist",
"uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
}
],
"duration_ms": 188520,
"episode": false,
"explicit": false,
"external_urls": {
"spotify": "https://open.spotify.com/track/18yTgk0VgjB9XDj8h2q6Td"
},
"href": "https://api.spotify.com/v1/tracks/18yTgk0VgjB9XDj8h2q6Td",
"id": "18yTgk0VgjB9XDj8h2q6Td",
"name": "JUST LIKE WE NEVER SAID GOODBYE",
"popularity": 34,
"preview_url": "https://p.scdn.co/mp3-preview/d5790004de973f83756311075125ffc965e522c8?cid=a46f5c5745a14fbf826186da8da5ecc3",
"type": "track",
"uri": "spotify:track:18yTgk0VgjB9XDj8h2q6Td"
}
]```
I want to get the artist's name
so If I do array.artists
it gives this
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
},
"href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
"id": "5a2w2tgpLwv26BYJf2qYwu",
"name": "SOPHIE",
"type": "artist",
"uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
}
]```
Aight who's good with timestamps?





