#development
1 messages ยท Page 1195 of 1
its suppose to run twice when debugging
pre-commit
the upper one is for the beta branch(my debugging session)
then commit
now it no work on the main branch

@opal plank soul ?
nah
i have my template
so i just copy and paste
that is
$3 best price
:))
lets see if that fixes it
this is a really odd bug ngl
i guess it was that little snippet up there
how come this is setting the whole message as empty?
ternary is somehow sending the whole message as empty
uhh
try ? `ur text` : `NOTHING`
then see what will happend
if it send ntohing
nah
it is useless
hmm
its definetly that bit screwing up
though compiles just fine on my end

yeah wtf
if u didnt realize thats me forcing it to be falsey
Ho do you get a bot to count how many servers it is in?
what lib
^
@dawn plaza
client.guilds.cache.size
Thank you!
oh no
twitch has been fucking my brain up cuz im calling them channels
i spoonfeeded
can
I do this so see if a message about to be sent is morn then 2000 characters
if (data.length >= 1500) return;
works once and then breaks wtf
djs docs are confusing
^^
module.exports.run = async (bot, message, args) => {
figlet(args.join(' '), function (err, data) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
if (data.length >= 1500) return;
message.channel.send(Embed)
})
}
can I do this to prevent message being to big and breaking my bot?
cache is also definetly there
93 channels in cache
wtf

OH SHIT

i see the issue now
if u didnt realize thats me forcing it to be falsey
@opal plank why not just use true
i mean false
no clue tbh
How would I make the bot say the answer to client.guilds.cache.size, if it needs a string to send?
Sorry I'm super new
@misty sigil discordjs.guild is better
no
yes
discordjs.guild is non-existent too :)
you shouldn't be a beginner to reading docs if you're making a bot
i would rather use discord.js.org than non-existent discordjs.guild, even discordjs.guide exists.
^^^
@restive furnace but it exist : /
thats the for dummies docs they got
its more a spoonfeed page ngl
@misty sigil LMAO
discord.js.org is always my choice of docs
not mr spoonfeed
LoL
at least discordjs.guide says to learn js
yes
My bot's response to client.guilds.cache.size is 0, when it's in a server

does .guild cheap ?
literaly big ass 'BEFORE YOU CONTINUE'
is there a reason?
well it istn cached
and probably 0.5 of 10 will lesrn js
lOL
who read that guide
does .guild cheap ?
cheap?
yes
discord.js.org best for discord.js, no debate
define cheap
the domain
@earnest phoenix .guild doesnt exist
wut
@misty sigil How do I cache it?
i dont think it exists either
.guild isnt a tld
abalhahababahahabahahaha.moe/eris is best for eris
thats guide you silly goat
but u understand what i ment
._.
not to bully, but are you kind of blind?
what we can do with discord bot list api's
@dawn plaza if youre using discord.js it should be cached
@prime glacier https://top.gg/api/docs and #topgg-api

remove the bugs

nobody likes them ๐
i hate this life

just wonderting:
Can i dm a mod and tell them to accept my bot ?
no
:))
if you wanna get baned? sure
LoL
do it
or maybe @everyone
No one:
Memleaks: ๐
Also memleaks: Haha, got you! I ate 12 GB of your ram.
omg its still joining the subscribed channels
to get the fastest attention

๐
indeed
ok

wdym 6 servers?
ur bot

in 6 servers
@opal plank
@opal plank u need to post data

setInterval(() => {
dbl.postStats(bot.guilds.size);
}, require("ms")("6h"));
:))
idk
imagine using dbl
and post 30mins not 6 hour


anyway, back to writing more spaghetettitteh code
take me to church
and ill worship like a dog EXECUTE MEH
there @opal plank you can take me and go home
for free
not sure if the weapon you use will cost
-bots @opal plank --noembed
Not Erwin#8753's bots:
@earnest phoenix
idk
just click me
ok
'le user casually doing their stuff'
ping
'le user thinking its some nice people to talk to'
'le user see its bot'
'le user mad'
'bad bot, 0/5 review on google'
Heyo, any idea how to change the long description background on your bot page with css? I've tried changing the background-color of .longdescription with no luck
Same with the text color of the library link, as well
Thanks in advance for any help 

:((
@solemn leaf embeds dont mention users
-bots
just screenshot
that emans ur bot isnt here
but it did ping it
its client, its nothing related to discord
how can I do that
it didnt
okay
how can I do name
if the bot is cached on your client, it'll resolve, if not, it wont and will just show the id
idk how you're coding your bot
ยฏ_(ใ)_/ยฏ
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(c => c.displayName.toLowerCase() === args.join(" ").toLowerCase()) || message.member
bot is
client
resolve by name
?
all of those have users accessible on member
access user then user_name iirc
either name or user_name
i think its name though
i should stop doing snake case for my twitch lib

this is what i get for doing that crap non standartized
wdym cleared?
mad*
@opal plank
what
its undefined then
can i do this
user = message.mentions.users.first() || message.guild.users.cache.get(args[0]) || message.guild.users.cache.find(c => c.displayName.toLowerCase() === args.join(" ").toLowerCase()) || message.author
yes i suppose
'cache' of undefined
undo what you did
message.guild.members
.setAuthor(user.user.name)
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(c => c.displayName.toLowerCase() === args.join(" ").toLowerCase()) || message.member
not your user
wai
there was a third one somewhere
i dont recall

slow clap
@opal plank erm
.setFooter(user.displayName, user.user.displayAvatarURL({ dynamic: true }))
whats wrong with that?
ik
then?
ohh

perhaps a variable is incorrectly used
i got what you mean but idk how the f that happened
its really confusing that you calling your var user when its a member though
just induces confusion
console.log variables and the variable's name lol
im pretty sure its not suppose to to.string() it
?
okay
but
why does the pfp work not the name
.setFooter(user.displayName, user.user.displayAvatarURL({ dynamic: true }))
doesnt make sense
try user.user.username
@misty sigil thank but I want it to be the nick on the server>
does it matter
I prefer it
I don't like how the variable name is user lol. Especially since it has a property with the same same
oh ffs
anyone got a good icon for spotify
straight outta my task bar
I tried too
hmmmmmmmmmm

aparently that bug isnt over
and its such a pain in the ass to debug on ubuntu host
pull the branch to windows and develop on there
Can anyone explain this one to me
guild id/channel id?
hmm nope
guild_id/channel_id/message_id
Oh, msg id probably
Bot id?
thats attachment id iirc
Is there a way to get that?
msg id is probably one of them
if you delete the media its proxy fucks up
send message
then edit payload without image
try the link again
even if message exists its proxy gets removed iirc
that last id is the attachment id iirc
dont quote me on that though, its been a long as time ive fucked with attachments
hmm so send message then edit it?
send message with pic
grab the attachment url
edit the SAME message without image in it
then check link(reload)
i think it'll say not found iirc
cuz that message no longer has any attachments on it
Well I need it for a command
if a user deletes the message its gg
Is there a way to do it on discord.js
angry*
angery
the act of being angered
cache still booting
but the fact that it replied means whatever the fuck was going on fixed

this is trust issues 101
the amount of conditional chain is insane

if if if
elif```

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? ?
not my fault ubuntu doesnt have a gui
or as shivaco once said
bruv moment

@slender thistle https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/748629964173082674 seen this level of trust issues before?
you cannot trust the twitch api
its not even twitch, thats my code(but yes, dont trust twitch api, its jankier than my code)
and THATS saying something
indeed
lmao
they dont even do sharding

im having to do cluster node processes to handle that many users
well, i will, not rn
if(command === 'test'){client.commands.get('test').execute(message, args);
} else if(command === 'insult'){
client.commands.get('insult').execute(message, args);
How would I turn this into a switch statement?
You could go a step further and make it more dynamic by not using ifs or switches.
How?
but if you wanted to do switches, just do switch (command) and each case being the command name string
To go dynamic, save client.commands.get(...) to a variable and give the first argument command (which is what the user entered)
If a command was found, you'll have something. If nothing was found, you'll get undefined. Check if it's not equal to undefined and run it (.execute(message, args)) if it exists.
Okay, thank you!
use a@dawn plaza command handler
what they're doing is a command handler
dynamic command handler
not a slighlty better if chain

im so about to regret doing this too
Personally, as long as the logic is separated from the event handler, it's fine
||JS devs: muh command handler||
Wassup guys
@low shard Is there something development related you had a question for?
im trying to add a welcome message but these keep showing up
C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\index.js:24
const channel = member.guild.channels.find(channel => channel.name === "welcome");
^
TypeError: member.guild.channels.find is not a function
at Client.<anonymous> (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\index.js:24:43)
at Object.onceWrapper (events.js:422:26)
at Client.emit (events.js:315:20)
at Object.module.exports [as GUILD_MEMBER_ADD] (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\discord.js\src\client\websocket\handlers\GUILD_MEMBER_ADD.js:16:14)
at WebSocketManager.handlePacket (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (C:\Users\karin\OneDrive\Desktop\Discord VA-Mods\node_modules\ws\lib\websocket.js:797:20)```
should I try to make a bot in JS instead of dotnet...? ๐ฌ
im trying to add a welcome message but these keep showing up
@calm junco ?
who u tlkin to
you
now it does dis
PS C:\Users\karin\OneDrive\Desktop\Discord VA-Mods> .cache.find
.cache.find : The term '.cache.find' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ .cache.find
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.cache.find:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException```
<your guild channels thing>.cache.find
hey guys
so currently i made a bot that actually shows the weather of a given place
how can i actually search places BY the weather?
so if i do: weather sunny
find an api that supports it
^ that or scrape some website
@eternal osprey check the docs for these to see if they include a query by current weather or something
https://rapidapi.com/blog/access-global-weather-data-with-these-weather-apis/
Anyone else use nano as an editor for coding?
Anyone else use nano as an editor for coding?
@quartz jewel if I'm in a linux terminal, yeah.
I used it for bash scripting mainly
I use it for all coding on Linux and never code on anything other than Linux.
Nano is literally the only thing ive been using on linux tbh
But only when needed
Vsc > nano
Vscode is easier to use
My main reason for using it is because can code faster.
nano > Visual Studio Code
lies
It's preference though @golden condor
nano > Visual Studio Code
@quartz jewel They are pretty different, so it's not a very good comparison
Isn't that paid software?
@faint prism Yeah one has a graphical interface and the other doesn't.
yeah
or am I thinking of atom
but u just press ok and nothing happens
Sublime is free.
hmm i can't find an api where you can actually search by weather type.
anyone that knows one by chance?
hmm i can't find an api where you can actually search by weather type.
@eternal osprey What would that even return with?
its like, download it, and then it says ur free trial has expired and that bs, just press ok and nothing happens, auger
its like, download it, and then it says ur free trial has expired and that bs, just press ok and nothing happens, auger
@digital ibex like WinRAR
You get asked now and then to buy a license but not required to continue using it.
if i type like, !weather sunny
it gives me a list with a couple of countries that have the same weather type
atm
so a way to implement that would be to have an array of top 50 popular cities or something and filter it by weather
Why not just use one that does it by country and filter it yourself.
i already have one that actually responds with the weather information
but you have to give a country/place first
Use the information from each country/place/town/city and filter the weather types.
yeah i will search a tutorial for that
as i have no clue on how to do that right now
hiii
https://support.discord.com/hc/en-us/community/posts/360055383032-Ability-to-change-bot-discriminators is it possible to change the bot's discriminator??
alright
hey guys
how do i use this site
to make a command like !weather sunny
and it gives me all the countries with sunny weather?
it depends on the site you use
some sites might have that functionality
others might not
Is there a way to unreact? I've added await m.react('X') but I'd like to remove the reaction. Anyway I can? Using Discord.js.
how do i use this site
@eternal osprey https://openweathermap.org/api
Simple and fast and free weather API from OpenWeatherMap you have access to current weather data, hourly, 5- and 16-day forecasts. Historical weather data for 40 years back for any coordinate. Weather maps, UV Index, air pollution
and historical data
?
can't i do something like this:
fetch(
"https://api.openweathermap.org/data/2.5/forecast?q=" +
this.state.userInput +
"&units=metric&APPID="
)
.then(results => {
return results.json();
})
.then(data => {
let days = data.list.filter(day => {
return day.dt_txt.endsWith("15:00:00");
})
.map((day, index) => {
return (
<CardComponent
i={index}
flip={e => {
let card = document.getElementById(index);
card.classList.toggle("is-flipped");
}}
date={day.dt_txt.slice(5, 11)}
temp={Math.round(day.main.temp)}
/>
);
});
this.setState(() => {
return {
days: days,
userInput: ""
};
});
})
.catch(error => {});
but then filter it with the keyword sunny?
and make different databases for each weather type?
and connect that database to the actual keyword used in the command. So if you type !weather sunny, it would trigger the sunny database?
or is this the most shit that you guys have heard?
@eternal osprey Use code block for it.
What is a "DM System". If you can come up with what it is, you'll probably be able to fill in the logic on how it goes (but can refer here if you run into trouble).
DM SYSTEM= Where if you run a command "-dm @sand skiff You have been fired.
-Sent from the Team" and this DM system has a cooldown
and the mentioned person gets that dm
You have been fired.
-Sent from the Team
dont allow people to dm thru ur bot
but with a specific role
can be used for bsd reasons
oh
ok
ill make sure
i want it to be a role setup so that
after i mention the role
like
even with a specific role someone can send something that is against the TOS (child porn, cub, etc.) and get your bot terminated
mass dms likely
oh ok
thsts againsf tos
mass dming is api abuse, so yes
You'd want to restrict the command and think of all worst case scenarios and prevent them from occurring.
ok
whats the code of hex colors?
0x000000
Yes.
what's your code
oh my god
Remove () it isn't a function.
how do i make a command -uptime and it will say respond with something like I have been online for: 0 days, 10 hours, 53 minutes, 39 seconds.
no
it also isn't a property either
?
how do i make a command -uptime and it will say respond with something like I have been online for: 0 days, 10 hours, 53 minutes, 39 seconds.
@drifting wedge it's not a property of the discord.Colour class
?
It's literally converted into an integer as-is from 0x......
so remove discord?
@sand skiff Record how much time has passed since the ready event has been emitted.
remove discord.Colour
what
Because a hexadecimal number is an object
not a property of anything by default
It's a Python object
@sand skiff Record how much time has passed since the ready event has been emitted.
@quartz jewel what is the code tho
That hex color isn't a property.
ok
@earnest phoenix
It exists on its own and not as a property of anything
hey guys how do i filter information of openweathermap?
What is your library?
i want it to only show sunny countries
hey guys how do i filter information of openweathermap?
@eternal osprey use json
Oh
Idk
if i type !weather sunny
it gives me a list of all the countries that have sunny weather at that moment
python
Wdym?
@earnest phoenix discord py, js, cpp
colour=0x......
@eternal osprey you could look through all countries, that would be long tho
yeah i could create a database for that and manually put that in
but that wouldn't update
Okay
@eternal osprey You can update it using ajax.
const Discord = require("discord.js");
module.exports.run = async (bot, message, args) => {
let color = '#' + ("000000" + Math.random().toString(16).slice(2, 8).toUpperCase()).slice(-6)
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(c => c.displayName.toLowerCase() === args.join(" ").toLowerCase()) || message.member
let role = message.guild.roles.fetch(args[1])
user.roles.add(role.id)
const Embed = new Discord.MessageEmbed()
.setColor(color)
.setTitle('Roled:')
.setAuthor('Moderation Command')
.setDescription(`${user.user.username} with ${role.name}`)
return message.channel.send(Embed);
}
module.exports.help = {
name: "role"
}
what am I doin wrongs
what is the error
Aki for the record, you can just pass "RANDOM" instead of trying to generate a random color yourself.
What is your exact error though? I see that you tried using .fetch(...) on the roles manager, which returns a promise, which could be your issue since you don't resolve it.
@sudden geyser wait what
What what
i need helppp
embed = discord.Embed(
colour = 0x3498DB()
)
saying not callable
int not callebled
@sudden geyser what do i do then
You don't call it
It's as it says: int is not callable.
0x3498DB that isn't a function.
So remove the ()
@sudden geyser what do i do then
@solemn leaf you resolve the promise first. Either withawaitor.then
I also recommend you read this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
@drifting wedge Use something like sololearn or codeacademy to learn the language first.
Man setting up a bot in JS is dead EZ lol
await looks cleaner tbh.
especially with that template lol
?
You make a lot of typos on mobile.
Yeah using JS isn't that hard but it's also a weakness
I've used JS that long that dislike the language.
@sudden geyser okay the role id works I think
good
nvm
it is undefined
let role = await message.guild.roles.fetch(args[1])
console.log(role.name)
how do i filter info from openweatherapi?
@sudden geyser it didnt
By using the .filter method.
You would have to read the documentation to find that out.
@solemn leaf log the value of role to the console and see what you got
Or use a debugger and breakpoints
^
how do i have a command that adds a field to a mongodb document
That doesn't sound too difficult
Doesn't sound difficult at all.
how do i have a command that adds a field to a mongodb document
@worthy glacier I'd start by looking for how to add a field with your library
whatsup gamers
Then just add that into a new command
Create a command that takes an argument for naming the field, connect to the database and run an sql query on it.
whatsup gamers
@earnest phoenix 24hrs later
nevermind
sql query
hi does anyone know how to check if a message pinged the bot
which library
discord.js
message.mentions.users contains all the mentions in the message
i tried using if(message.content) but it does not work
so
if
?
would that work?
nope
huh
message.mentions.users is a collection
oh
you can use collection.has()
doesnt work i think id have to edit the schema everytime i added or deleted a field
How to update nodeJS ? Debian 9 linux
how can i add the ffmpeg thing to github?
and to heroku?
or should i add it as a requirement?
lol
Hm, so in JS
to construct an object you'd do something like: const obj = new MyObject() yeah?
And then you can reference it's methods via obj.someMethod()
i'm in vps linux debian 9
i have a error for my discord bot
is requessted update nodejs
either install the package from the nodejs website or install and use nvm (node version manager)
how do I get apt
You get it by using a debian based Linux distro.
apt is built in depending on your linux distro
I dont have linux
then why do you need apt?
for lifecycle for color thief
Windows sucks.
If I have an event listener for every command (I know, not a good thing, I'm gonna rewrite it), will that cause problems? Or will it just be slower?
You could have conflicts, just create a command handler instead of using more than one event listener per event.
Okay, sounds good. Thanks!
@wheat mesa And if you don't want the command handler to look messy make the commands external.
.net and node working together is so beautiful https://youtu.be/9rVZ1nyiG8g
Hmm, so I have a base64 encoded gif. I want to send it as an embed as a reply to a command
But the output is a bit odd. I feel like I'm missing an important step
I'd think I should be able to attach it
Relevant snippet. It's probably garbage, first time writing JS
client.on('message', async msg => {
if (msg.content.startsWith(wolframPrefix)) {
var result = await waApi.getSimple(msg.content
.split(wolframPrefix)[1])
.catch(console.error)
var resultBuffer = new Buffer.from(result, 'base64');
var embed = new Discord.MessageEmbed()
.attachFiles(resultBuffer)
msg.reply(embed);
}
});
well if you want to test if your encoding works save it to your local disk
good idea
if you can view it then youre on the right track
if you can view it then youre on the right track
@plush magnet I scrapped that approach. I found a simpler API call that returned text lol
Well, done developing that bot. Took only an hr. EZ
@faint prism how does one invite wolfram alpha?
it's a private bot
it isn't anything revolutionary it just scrapes wolframalpha i believe
No, I actually use their API.
@faint prism how does one invite wolfram alpha?
@static trench give me a few minutes to get back home, I'll make it public and give you an invite if you want.
Currently, it only works for short answers
oh they have an api?
Yeah and a library too
Although their library is pretty simple
But then again, their API is just get requests anyways
So you really wouldn't need a library TBH
Relevant snippet. It's probably garbage, first time writing JS
@faint prism - Look intodiscord.js-commando. Making your own command handlers, it'd be silly to re-invent the wheel.
@faint prism - Look into
discord.js-commando. Making your own command handlers, it'd be silly to re-invent the wheel.
@paper phoenix ty, but I'll probably come up with my own solution when I learn how to use classes
Can u make it public?
Ye 1m I'll DM you
Like I said though, he currently only supports questions that can be answered as a "short answer".
If that does not exist I don't have the "full answer" implemented yet
wolfram alpha have a free API? nice
mhm
d.js can I create a category on a server in V12?
message.guild.channels.create("name", "category") it didn't work. This code created a text channel.
is there any way to react to a specific message in a specific channel?
If you have the message ID or store it in cache you can react to it (assuming you have Add Reactions permissions).
if (command == "react"){
if (!args[2]) message.channel.send("?react <ChannelID> <MessageID> <Reaction>")
var channelid = args[0]
var messageid = args[1]
var emoji = args[2]
var react = client.channels.cache.get(channelid).messages.fetch(messageid);
message.react(emoji)
}
```This is what i got so far
but even if all syntax are correct
it reacts to the latest message
look at what you're calling react() on
take a guess
react.react()?
correct, however fetch() is a promise and you need to either await it or use the promise pattern (.then())
var react = await client.channels.cache.get(channelid).messages.fetch(messageid);
?
try it and see
thanks
@earnest phoenix you'd cry if you saw what I was doing in JS
ngl the rapid deployment and short dev time was kinda nice. But boy is not maintainable
Do I dare share code? I'd probably embarrass myself
as you wish lol
my brain is all over the place
i've been working with node and c# for the past two weeks
communicating via pipes
that's a yikes
is it possible to define a embed on the top that every command can use without const it in the command code?
There's no point. If you use the original embed you will make changes to that embed in one command and the next command will have the changes that the first one did so either way you're still going to use the new keyword
you can create a helper function to generate the embed if the design is the same all the time to cut yourself some slack
using proper functions is a bit nicer
still violating DRY principle with that repeated msg embed though
could do what cry said above though ^
maybe a date formatter
JS?
how can I have this not be so long
@solemn leaf https://www.w3schools.com/js/js_date_formats.asp
can I use something like moment?
Pretty sure you can construct it with a string. That link is exactly what you're looking for though
What is a "dat"?
.createdAt
Ah
also
can I not do
.setDescription(<@${ment.id}>, ment.displayAvatarURL({ dynamic: true }))
for profile in profilesData["profiles"]:
print(profile["cute_name"])
``` is there a way for every "cute_name" in every "profile", it can be (speaking js here) mapped to an array? i tried variable.append(profile["cute_name"]) but it only got 1
i think it doesn't save
i'm taking most of this knowledge from js lmfao
i've done something like this in discord.js for every role a user has that isn't everyone it would push it to an array
actually I wasn't wrong
Tfw fruit are cute
fruit == cute? pog
===
funny thing is
the non cute name is like 0fghhjjkcvvdffgjj45ksd so yeah
anyways
Python only takes into account scopes for functions, so that syntax is correct. What I think you're doing wrong is the fact you're assigning the variable an empty list every time in the loop then appending it, so you're always resetting it for every interation.
You could try declaring the list above the loop then only doing .append(...) in the loop, then log the list after the loop
OHHH
thank you
that was a small brain moment
it just redeclares it every single time
Sun, Sep 2, 2018 9:39 PM
how can I have it format like that not this
Sun Sep 02 2018 20:39:20 GMT-0500 (Central Daylight Time)
Using the link I sent earlier
didnt help lmao
Then regex it or something
okay fixed
thanks
but it says my status is this
presence.status
and how is there a difference in these
just a passable question in python what does f"sdfkljs" do?
So you want to format the date so it looks like that instead of the default correct
is it the same as doing `sdfkljsdf` in js?
it's an f string so it's like that in js
a few differences but you use {} instead of ${} in js
ye
but what it says
i got that
isnt when I created my account
the top is
this is what I did
${moment.utc(ment.createdAt).format('dddd, MMMM Do YYYY, HH:mm:ss')}
@sudden geyser
const streamingRole = message.guild.roles.cache.find(role => role.name === 'temp');
this causing error...
let streamingRole = message.guild.roles.cache.find(role => role.name === "temp");
if that doesnt work
then temp isnt a role
yes
ok i have a decently hard python question here
if i have an object like this (its from an api so im just assuming) json { "profiles":{ "fdsjaflksdjflkajsdf":{ "cute_name":"Lime", "veryImportant":"Value 1" } "aaaaaaa":{ "cute_name":"Pomegranete", "veryImportant":"Value 2" } } } and i have gotten all "cute_name"s by doing ```python
for profile in profilesData["profiles"]:
cuteNames.append(profile["cute_name"])
specifiedProfile = input(f"What profile out of {cuteNames} would you like?")
that's probably a terrible explanation
yes
@solemn leaf it just says that message isnt defined
then you didnt do your thing righ stop pingign
what thing
that's probably a terrible explanation
@karmic compass why not just store an integer instead
?
@faint prism can I add images to fleids?
btw Auger that's an API i can't change that
need help
https://hastebin.com/cemurojari.js











